(I suggest that we add "packaging" or something, as a component for issues with .debs, and eventually rpms, &c.)

I've been running lots of test .deb installs lately to build Vagrant-based Aegir VMs (Vaegirant?). Anyway, I've come across some kind of bug that ends up eating all the VM's memory during the hostmaster install, and so the install never completes. That is, the only thing in /var/aegir is the config/ directory. I suspect this is due to challenges with preseeding the Aegir .debs (for which I'll post another issue) and/or the recent flakiness of the d.o FTP servers.

Regardless of the reason, the .deb shows 'installed' despite the failure to install hostmaster. Is there any way for aegir-hostmaster to return an error in such situations, or possibly for the aegir meta-package to check that aegir-hostmaster is actually installed?

root@HostMaster:/var/aegir# ls -la
total 12
drwxr-xr-x  3 aegir aegir 4096 Oct  5 08:45 .
drwxr-xr-x 15 root  root  4096 Oct  5 08:45 ..
drwxr-xr-x  2 aegir aegir 4096 Oct  5 08:46 config

root@HostMaster:/var/aegir# aptitude show aegir
Package: aegir                           
New: yes
State: installed
Automatically installed: no
Version: 1.4-1
Priority: optional
Section: admin
Maintainer: Antoine Beaupré <anarcat@koumbit.org>
Uncompressed Size: 32.8 k
Depends: aegir-provision, aegir-hostmaster
Description: mass Drupal hosting system
 [...]

Comments

anarcat’s picture

Status: Active » Postponed (maintainer needs more info)

We have another issue reported that looks something like the symptom you are describing here: #1128844: "Out of memory and no killable processes" during installation. Can you look if you suffer from the same problem (which eventually exhausts the memory and crashes)?

As for the package being mistakenly marked as installed, that is strange, because the 'aegir' package is a meta-package (which shouldn't really exist - i should just make it a virtual package) and anyways, it shouldn't be marked as installed if the dependencies failed. Specifically here, the aegir-hostmaster package should have failed installing. Can you double-check that the aegir-hostmaster package is installed? In this case it would really be a bug, in which case maybe we'd need to test bootstrapping the site with drush again to double-check it installed properly...

ergonlogic’s picture

Status: Postponed (maintainer needs more info) » Active

I agree that #1128844: "Out of memory and no killable processes" during installation may well be at the underlying problem. However, after install fails like that, aegir-hostmaster reports being installed.

ergonlogic’s picture

I believe this can be simulated/reproduced by killing this process after running `aptitude install aegir`:

php /usr/bin/drush hostmaster-install --yes --backend HostMaster

The installation appears to proceed, and both packages (aegir & aegir-hostmaster) show `State: Installed` with an `aptitude show`

ergonlogic’s picture

I discovered that drush_make wasn't being installed, and this is confirmed when installing with debugging on (env DPKG_DEBUG=yes apt-get install aegir):

Setting up aegir-hostmaster (1.4-1) ...
installing the Aegir frontend (Drupal with the hostmaster profile), please wait...
Unable to download drush_make-6.x-2.3.tar.gz to                      [error]
/tmp/drush_tmp_1318513929 from
http://ftp.drupal.org/files/projects/drush_make-6.x-2.3.tar.gz
The drush command 'make                                              [error]
/usr/share/drush/commands/provision/aegir.make
/var/aegir/hostmaster-6.x-1.4' could not be found.
A Drupal installation directory could not be found                   [error]
Could not download platform using drush make. No platform present    [error]
ergonlogic’s picture

... and installing drush_make manually appears to allow the install to proceed normally.

As for the bug that this report is actually about, that is the the .deb thinks it's installed when it really isn't, installing with env DPKG_DEBUG=yes apt-get install aegir appears to partially fix this. That is, memory isn't exhausted, and aptitude recognizes that the package isn't installed, but rather shows it's status as "unpacked".

anarcat’s picture

Status: Active » Needs review

I have made a change to the way the package works. Now it will check to see if the site can be bootstrapped after upgrade, and fails if not. This will make sure that the package will not be marked as installed if the frontend can't be bootstrapped, which doesn't solve the underlying issue but should be enough for this bug report.

I have pushed this to the debian branch and Jenkins just built a test package for this.

The problem is that the hostmaster-install pipeline ends with drush backend-parse, which always returns true. Even if that was changed, I suspect that the hostmaster-install command doesn't actually return proper error codes, although #638536: Return a non-zero exit status on errors seems to say this was fixed in drush a long time ago, so maybe we should also fix the pipeline.

ergonlogic’s picture

I've tested this, and it appears to be verbose (as if I'd added env DPKG_DEBUG=yes) by default. Not sure if that was intended.

But either way, the aegir package now shows a status "unpacked", whereas aegir-hostmaster is in status "partially configured"

ergonlogic’s picture

Status: Needs review » Fixed

This has, I believe, since been fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.