Comment 1 for bug 1819033

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Odd, in a quick repro I haven't seen any delay.

There are prerm/postrm/postinst steps in this package.
In addition as we have seen with other packages it has sysV and systemd units which sometimes can cause double actions in maintainer scripts.

Prerm of the old version will stop it (sysV)
  invoke-rc.d php7.0-fpm stop
Postrm will do nothind on upgrade
Postinst of the new version will then start it
  invoke-rc.d php7.0-fpm start

I checked - even 7.2.15 in Disco fixed it as it correctly adds
  dh_installinit --restart-after-upgrade
  dh_systemd_start --restart-after-upgrade
Which will make the stop in prerm only happen if you are removing the package.

Without that if the upgrades take long (for whatever reason overload/slow-disk/...) the described issue can happen. That was the main point when introducing --restart-after-upgrade.
Although there has to be taken extra care as the behaviro of dh_installinit and co changed in different compat levels.

That said - the fix seems clear, lets check when it was added [1].

Hmm that is pre-xenial for sure 7.0.6-13~2 to be specific.
And latter 7.1 / 7.2 hold it as well.

What happened to our 7.0?
E.g. the version we had in Artful had this for sure
+php7.0 (7.0.6-12) unstable; urgency=medium
+
+ * Enable --restart-after-upgrade for both dh_installinit and
+ dh_systemd_start to minimize downtimes

Xenial was originally on 7.0.4-7ubuntu2 and since then got only security updates.
That means the fix from 7.0.6-12 isn't in there.

IMHO One would need to pick and package [2] for Xenial.

[1]: https://salsa.debian.org/php-team/php/commit/8e34b064ccdcb9736668dec2e184a577a202880f
[2]: https://git.launchpad.net/ubuntu/+source/php7.0/diff/debian/rules?h=import/7.0.6-12&id=ee74f97a368a45eb8254ae9a26cb001732b85b6f