Comment 30 for bug 1740892

Revision history for this message
Victor Tapia (vtapia) wrote :

1. Xenial+:

- Overriding dh_installinit[1] would still fail the first time it's upgraded because of the old corosync.prerm file [2], that contains:

# Automatically added by dh_installinit
if [ -x "/etc/init.d/corosync" ] || [ -e "/etc/init/corosync.conf" ]; then
        invoke-rc.d corosync stop || exit $?
fi
# End automatically added section

- After the change, the same file will stop only for removal:

# Automatically added by dh_installinit
if ([ -x "/etc/init.d/corosync" ] || [ -e "/etc/init/corosync.conf" ]) && \
   [ "$1" = remove ]; then
        invoke-rc.d corosync stop || exit $?
fi
# End automatically added section

I still prefer this fix instead of changing how pacemaker and corosync unit files relate to each other.

2. Trusty:

- corosync and pacemaker use sysv scripts (however, upstart files are present in the source for both coro&pace).
- Switching pacemaker to upstart with the respawn stanza should be enough to fix this issue.

[1]
override_dh_installinit:
        dh_installinit --restart-after-upgrade

[2] https://www.debian.org/doc/debian-policy/#details-of-unpack-phase-of-installation-or-upgrade