I've seen this a couple times (i.e., it's not new to rc5), but I haven't been able to reproduce it reliably. From what I can tell, if an apt-get upgrade of the package fails, it can sometimes result in the loss of the symlink from /var/aegir/config/apache.conf to /etc/apache2/conf.d/aegir.conf. Bear in mind, this after the the .deb thinks it's properly installed, and results in the default 'It works' page from Apache.

I'm marking as 'critical' since this breaks Aegir entirely, including all hosted sites. However, if we still can't reproduce it, I don't think we should block the release.

The work-around is quite simple:

/etc/apache2/conf.d# ln -s /var/aegir/config/apache.conf aegir.conf

Comments

anarcat’s picture

I have seen this on a failed upgrade, but once the upgrade completes, this works again. It was on an upgrade from 1.x, FWIW - I am not sure this would happen on minor upgrades.

ergonlogic’s picture

Most recently, I saw this on a rc4 to rc5 upgrade.

ergonlogic’s picture

Issue summary: View changes

It looks like we do this explicitly in aegir2-provision.postrm:

remove|upgrade|abort-install|disappear)
         # unregister apache config
         ( rm /etc/apache/conf.d/aegir.conf > /dev/null 2>&1 && invoke-rc.d apache force-reload ) || true
         ( rm /etc/apache2/conf.d/aegir.conf > /dev/null 2>&1 && invoke-rc.d apache2 force-reload ) || true
     ;;

I've attached a patch that moves this bit into 'purge|abort-install|disappear', and does nothing for 'remove|upgrade'.

ergonlogic’s picture

Assigned: Unassigned » anarcat
Status: Active » Needs review

Sorry, 'needs review', @anarcat :)

AlfTheCat’s picture

I just had this issue. I removed postfix and re-installed it. I ran apt-get update and apt-get autoremove in the process.
Re-creating the symlink solved the issue that resulted in the "It works!" message appearing in my browser instead of my websites.

anarcat’s picture

Issue summary: View changes

@ergonlogic - there's no patch attached here... furthermore, the name of the symlink needs to be specified otherwise you'll end up with dupes, updated issue summary accordingly.

anarcat’s picture

Status: Needs review » Fixed

yet i see what you mean and committed a fix

commit 52f0ff0311dfd98c948a7bc38d0993c129ed329b
Author: Antoine Beaupré <anarcat@koumbit.org>
Date:   Wed Nov 20 17:33:54 2013 -0500

    don't go around destroying apache configs on upgrades or removal

    the rationale for upgrades is obvious: even if the next package will
    restore the link, the upgrade may fail and then all sites go
    down. even if it doesn't fail, sites go down for the duration of the
    upgrade: bad. this affects 1.x to 2.x upgrades.

    the rationale for remove is that we don't completely destroy the data,
    so the sites are expected to remain.

    we also cleanup after ourselves in special corner cases
    (abort-install, disappear) as well.

diff --git a/debian/aegir2-provision.postrm b/debian/aegir2-provision.postrm
index 8f46306..b94db20 100644
--- a/debian/aegir2-provision.postrm
+++ b/debian/aegir2-provision.postrm
@@ -23,7 +23,7 @@ if [ "$DPKG_DEBUG" = "developer" ]; then
 fi

 case "$1" in
-    purge)
+    purge|abort-install|disappear)
         # delete the aegir user
         # http://wiki.debian.org/AccountHandlingInMaintainerScripts
         if which deluser >/dev/null 2>&1 ; then
@@ -35,14 +35,13 @@ case "$1" in
         # unregister sudo config file
         ucf --purge /etc/sudoers.d/aegir
         rm -f /etc/sudoers.d/aegir
-        ;;
-    remove|upgrade|abort-install|disappear)
+
         # unregister apache config
         ( rm /etc/apache/conf.d/aegir.conf > /dev/null 2>&1 && invoke-rc.d apache force-reload ) || true
         ( rm /etc/apache2/conf.d/aegir.conf > /dev/null 2>&1 && invoke-rc.d apache2 force-reload ) || true
     ;;

-    abort-upgrade|failed-upgrade)
+    remove|upgrade|abort-upgrade|failed-upgrade)
         # nothing to do here, especially: don't remove the configs!!
         true
     ;;

Status: Fixed » Closed (fixed)

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