The relevant bits appear to be:

Enabling hosting-queued daemon
The drush command '@hostmaster pm-enable hosting_queued' could not be[error]
found.  Run `drush cache-clear drush` to clear the commandfile cache
if you have installed new extensions.
A Drupal installation directory could not be found                   [error]
dpkg: error processing aegir-hostmaster2 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of aegir2:
 aegir2 depends on aegir-hostmaster2 (>= 2.0~rc2); however:
  Package aegir-hostmaster2 is not configured yet.
dpkg: error processing aegir2 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
                                                                                                                            Errors were encountered while processing:
 aegir-hostmaster2
 aegir2
E: Sub-process /usr/bin/dpkg returned an error code (1)

This is on a relatively recent Ubuntu LTS:

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.2 LTS
Release:        12.04
Codename:       precise

Here's the full install log: http://pastebin.com/4YYHDGGB

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ergonlogic’s picture

It looks like the mysql server may have been corrupted, since I couldn't manually assign aegir_root privileges (missing system user table.) So I re-installed mysql-server too. Now the install appears to get further along, but still fails.

Updated log: http://pastebin.com/mqWFp7Lc

anarcat’s picture

Status: Active » Postponed (maintainer needs more info)

we need the same trace, but with DPKG_DEBUG=developer enabled so we run drush with full debugging. alternatively, try to change /var/lib/dpkg/info/aegir-hostmaster2.postinst to add the --debug flag to the hostmaster-install command.

Finally, it may be that aegir is actually installed. Try drush @hostmaster status and friends, try drush @hostmaster pm-enable hosting_queued, try to flush the drush commandfile cache (drush cc drush) and so on.

Sorry i can't be of more help.

ergonlogic’s picture

Status: Postponed (maintainer needs more info) » Active
anarcat’s picture

thanks!

15:03:40 <@anarcat> Undefined index: db_type Settings.php:33 [44.33 sec, 13.59 MB]          [notice]
15:03:40 <@anarcat> Undefined index: db_user Settings.php:33 [44.33 sec, 13.59 MB]          [notice]
15:03:40 <@anarcat> Undefined index: db_passwd Settings.php:33 [44.33 sec, 13.59 MB]        [notice]
15:04:11 <@anarcat> it looks like the db creds get lost at some point
15:10:33 <@anarcat> Granting privileges to apostleswingonin@ on apostleswingonin [44.33     [notice]
15:10:44 <@anarcat> i am ready to bet there's something wrong with the db there
15:10:51 <@anarcat> Created apostleswingonin database [44.33 sec, 13.56 MB]              [success]
15:10:51 <@anarcat> Dropping database apostleswingonin [44.33 sec, 13.56 MB]                [notice]
15:10:51 <@anarcat> Revoking privileges of apostleswingonin@ from apostleswingonin [44.33   [notice]
15:10:51 <@anarcat> sec, 13.56 MB]
15:11:04 <@anarcat> that is the weirdest thing
15:11:06 <@anarcat> line 1821
15:11:15 <@anarcat> this may be related with the drush packet stuff

so it seems that the passwords/credentials get lost at some point. furthermore, we fail to see the error before the Created and Dropped notices, which is weird. i suspect this would be clearer with the dev release of drush... try to untar the latest 5.x on top of /usr/share/php/drush...

ergonlogic’s picture

More data:

Running drush hostmaster-install manually resulted in :

[...]
Platforms path /var/aegir/platforms is writable.                                                                                            [success]
Changed permissions of /var/aegir/.drush/hostmaster.alias.drushrc.php to 640                                                                [success]
Generated config Drush configuration file                                                                                                   [success]
Changed permissions of /var/aegir/.drush/hostmaster.alias.drushrc.php to 440                                                                [success]
Dummy connection failed to fail. Either your MySQL permissions are too lax, or the response was not understood. See http://is.gd/Y6i4FO for [error]
more information. ERROR at line 1: Unknown command '\('.
Dummy connection failed to fail. Either your MySQL permissions are too lax, or the response was not understood. See http://is.gd/Y6i4FO for [error]
more information. ERROR at line 1: Unknown command '\('.
Created apostleswingonin database                                                                                                           [success]
Dummy connection failed to fail. Either your MySQL permissions are too lax, or the response was not understood. See http://is.gd/Y6i4FO for [error]
more information. ERROR at line 1: Unknown command '\('.
Dummy connection failed to fail. Either your MySQL permissions are too lax, or the response was not understood. See http://is.gd/Y6i4FO for [error]
more information. ERROR at line 1: Unknown command '\('.
Could not find a Drupal settings.php file at ./sites/default/settings.php.                                                                  [error]
Created directory /var/aegir/hostmaster-6.x-2.0-rc2/sites/apostle.swingon.in.                                                               [success]
Generated config Drupal settings.php file                                                                                                   [success]
Changed permissions of /var/aegir/hostmaster-6.x-2.0-rc2/sites/apostle.swingon.in/settings.php to 440                                       [success]
Change group ownership of /var/aegir/hostmaster-6.x-2.0-rc2/sites/apostle.swingon.in/settings.php to www-data                               [success]
Platforms path /var/aegir/platforms exists.                                                                                                 [success]
Platforms ownership of /var/aegir/platforms has been changed to aegir.                                                                      [success]
Platforms permissions of /var/aegir/platforms have been changed to 755.                                                                     [success]
Platforms path /var/aegir/platforms is writable.                                                                                            [success]
Drush was not able to start (bootstrap) the Drupal database.                                                                                [error]
Hint: This may occur when Drush is trying to:
 * bootstrap a site that has not been installed or does not have a configured database. In this case you can select another site with a
working database setup by specifying the URI to use with the --uri parameter on the command line. See `drush topic docs-aliases` for
details.
 * connect the database through a socket. The socket file may be wrong or the php-cli may have no access to it in a jailed shell. See
http://drupal.org/node/1428638 for details.

[...]

I suspect it's still a problem with the mysql server.

ergonlogic’s picture

Status: Active » Closed (works as designed)

aha! so after re-installing mysql-server, I hadn't run 'mysql_secure_installation'. Manual installation worked, as does a package-based install.

ergonlogic’s picture

Version: 6.x-2.0-rc2 » 6.x-2.x-dev
Priority: Major » Normal
Status: Closed (works as designed) » Active

Actually, come to think of it, we're throwing an error in hostmaster-install that's not making its way up to the user, so that's a bug. Let's see if Drush 5.10 fixes it, since this looks like lost stderr packets or something.

Assuming Drush begins to report it again, is this something the .deb package can catch and suggest a solution for? After all, it was our infamous 'failed to fail' that was at the root of this.

ergonlogic’s picture

Priority: Normal » Major

This affects Wheezy too

ergonlogic’s picture

Status: Active » Needs review

Maybe we can run the check for anonymous mysql users directly in the .deb scripts, and thus fail gracefully and early, rather than depend on getting feedback from the install much later in the process.

Setting to 'needs review' to validate the approach.

anarcat’s picture

Yeah, it seems to me this could be done straight in the hostmaster-install script too, as a hook_validate() step...

ergonlogic’s picture

Project: Hostmaster (Aegir) » Provision
Component: Debian package » Install process
Assigned: Unassigned » ergonlogic
FileSize
1.45 KB

Patch attached.

ergonlogic’s picture

Status: Needs review » Fixed

I tested this and it appears to work well. Fixed in ef408bbb.

BTW, I think a cleaner way to do this would be to move setting all the drush defaults into the pre_validate, and then do this check in the validate. But it works fine as is.

ergonlogic’s picture

Status: Fixed » Postponed (maintainer needs more info)

Actually, I'm not sure what effect this'll have on the .deb install... Since that's the real problem here, I'm setting to 'needs more info' until we have .debs to test this with.

anarcat’s picture

Status: Postponed (maintainer needs more info) » Needs work

let's assume the .debs will be fixed properly - i believe the same problem will occur with a manual process where you skip the mysql_secure_install thing.

could we make sure we don't use an URL shortening service that we don't know the availability of? we shouldn't depend on that, or even outside documentation if possible - just mention the mysql_secure_installation thing straight there.

eft’s picture

I also got caught by this issue on a new install of Aegir 2.0-rc5 on a fresh Wheezy VM. Once I manually hardened MySQL with mysql_secure_installation and ran drush hostmaster-install, I got the front end installed. Thanks for the suggestions @ergonlogic.

So, for future reference, are you guys saying it's an issue with the Debian Aegir packages that should be resolved with next Aegir 2 release?

  • Commit ef408bb on dev-drupal-8, 6.x-2.x, dev-ssl-ip-allocation-refactor, 7.x-3.x, dev/2048653, dev-subdir-multiserver, 6.x-2.x-backports, dev-helmo-3.x by ergonlogic:
    Issue #2048653: Ensure mysql is secure before proceeding with hostmaster...

  • ergonlogic committed ef408bb on
    Issue #2048653: Ensure mysql is secure before proceeding with hostmaster...

  • ergonlogic committed ef408bb on 7.x-3.x-1966886-context-to-entity
    Issue #2048653: Ensure mysql is secure before proceeding with hostmaster...

  • ergonlogic committed ef408bb on 6.x-2.x-1995506-profile-option
    Issue #2048653: Ensure mysql is secure before proceeding with hostmaster...

  • ergonlogic committed ef408bb on 2358795-provision-save-on-verify
    Issue #2048653: Ensure mysql is secure before proceeding with hostmaster...

  • ergonlogic committed ef408bb on 7.x-4.x
    Issue #2048653: Ensure mysql is secure before proceeding with hostmaster...
helmo’s picture

Status: Needs work » Closed (outdated)

The 6.x-2.x branch will go EOL along with Drupal this week. So I'm closing
this issue. If it remains a confirmed issue in 7.x-3.x, feel free to re-open,
or better yet, create a new issue referencing this one.