[pve-devel] [RFC stable-4 corosync-pve 0/2] fix upgrade behaviour

Fabian Grünbichler f.gruenbichler at proxmox.com
Tue Mar 7 15:39:10 CET 2017


current versions of our corosync package have a problematic behaviour when
upgrading, especially when lots of other packages are upgraded at the same
time:

* the prerm script stops the corosync
* service the postinst script starts it again

on upgrade, the following happens

1.) old prerm is called
2.) new preinst is called
3.) packages are unpacked (can take quite long)
4.) old postrm is called
5.) new postinst is called

since step 3 potentially includes a lot of other packages which are upgrade at
the same time, this downtime of the corosync service is quite problematic
(potentially even leading to fencing).

I propose to instead:

* only stop in prerm if removing the package altogether (-r)
* restart in postinst (--restart-on-upgrade)

the one upgrade to get to this state is unfortunately unavoidable, and will
again cause potential outages.

since we already bumped the version once in master for stretch, we need to
branch a stable-4 branch (the last PVE 4.x version was built from
2507e204a59e736a5b1ad71d78142f9850a00bf8) and pay special attention to the
version numbers used there:

the current stretch version is 2.4.2-2 , I propose 2.4.2-2~pve4 (which is in
the attached patch), or 2.4.2-2~pve4+1 (if we expect further updates in PVE 4.x
which should sort before 2.4.2-2 in stretch).

Fabian Grünbichler (2):
  restart on upgrades instead of stop-wait-start
  bump version to 2.4.2-2~pve4

 Makefile         | 2 +-
 debian/changelog | 6 ++++++
 debian/rules     | 4 ++--
 3 files changed, 9 insertions(+), 3 deletions(-)

-- 
2.1.4





More information about the pve-devel mailing list