Merge ~kstenerud/ubuntu/+source/php7.0:restart-after-upgrade-1819033 into ubuntu/+source/php7.0:ubuntu/xenial-devel

Proposed by Karl Stenerud
Status: Rejected
Rejected by: Christian Ehrhardt 
Proposed branch: ~kstenerud/ubuntu/+source/php7.0:restart-after-upgrade-1819033
Merge into: ubuntu/+source/php7.0:ubuntu/xenial-devel
Diff against target: 33 lines (+14/-0)
2 files modified
debian/changelog (+8/-0)
debian/rules (+6/-0)
Reviewer Review Type Date Requested Status
Christian Ehrhardt  (community) Approve
Canonical Server Pending
Review via email: mp+364241@code.launchpad.net

Description of the change

Enable --restart-after-upgrade for both dh_installinit and dh_systemd_start to minimize downtime.

Fixes issue https://bugs.launchpad.net/ubuntu/+source/php7.0/+bug/1819033

Cherry-picked from ee74f97a368a45eb8254ae9a26cb001732b85b6f by Ondřej Surý

PPA: https://launchpad.net/~kstenerud/+archive/ubuntu/xenial-php7.0-restart-after-upgrade-1819033

Install test:

lxc launch ubuntu-daily:xenial tester && lxc exec tester bash

apt update && apt dist-upgrade -y && add-apt-repository -y ppa:kstenerud/xenial-php7.0-restart-after-upgrade-1819033 && apt install -y php7.0 &&
echo "<?php echo \"Test successful\\n\"; ?>" | php

Upgrade test:

lxc launch ubuntu-daily:xenial tester && lxc exec tester bash

apt update && apt dist-upgrade -y && apt install -y php7.0 &&
echo "<?php echo \"Test successful\\n\"; ?>" | php

add-apt-repository -y ppa:kstenerud/xenial-php7.0-restart-after-upgrade-1819033 && apt dist-upgrade -y &&
echo "<?php echo \"Test successful\\n\"; ?>" | php

Package Tests:

autopkgtest -U -s -o dep8-php7.0-ppa --setup-commands="sudo add-apt-repository -y -u -s ppa:kstenerud/xenial-php7.0-restart-after-upgrade-1819033" -B php7.0 -- lxd autopkgtest/ubuntu/xenial/amd64

autopkgtest [10:29:09]: @@@@@@@@@@@@@@@@@@@@ summary
cli PASS
cgi PASS
mod-php PASS
fpm PASS

To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Misses the bug reference in the changelog.

Also you'd want to "upgrade" the bug 1819033 description to have all the SRU Template entries that you will need.

Optional: shorten the hash referencing the cherry pick to e.g. 8 chars.

review: Needs Fixing
Revision history for this message
Karl Stenerud (kstenerud) wrote :

Updated changelog, and modified bug 1819033.

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

+ [Impact]
+
+ Upgrade processes that take too long will result in the service not
+ being restarted.

The problem is not being "not" restarted (except unrelated worst cases) but already it is a problem that it will be down for all the time the overall updates need.

+ [Test Case]
+
+ The test case is difficult to reproduce, because it requires the upgrade
+ process to take a long time.

Actually it is not that hard, the log will either show
stop
remove
unpack
start

or with fix
remove
unpack
restart

You can find the proper wording from the logs

+ [Regression Potential]
+
+ These changes have already been applied in other releases, but were
+ missed on xenial for some reason.

Some reason being that Xenial was branched before this hit Debian, see my explanations in the bug.

+ The changes are designed to address
+ this particular issue, and so shouldn't cause a regression.

Compare the new generated code in pre/post-rm/inst files.
I'd assume that it now calls restart in postinst but no more stop on prerm.
The regression potential could be that e.g. restart in general could have an issue (e.g. server doesn't shut down fast enough and then start fails). Unlikely but possible.
Always think what the most likely regression will be (no matter how unlikely it is on absolute terms). That shows the SRU Team that you didn't just skip it and said "no"

---

The MP itself seems good now, but lets use it to fixup the SRU Template as well ...

review: Needs Fixing
Revision history for this message
Karl Stenerud (kstenerud) wrote :

OK, I've updated the SRU

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

LGTM now +1

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

Tagged and sponsored to xenial-unapproved

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

This was essentially by SRu review in https://bugs.launchpad.net/ubuntu/+source/php7.0/+bug/1819033/comments/3

Rejecting this MP as-is to reflect that.

Unmerged commits

bd7721b... by Karl Stenerud

changelog

ff6f0c3... by Karl Stenerud

  * d/rules: Enable --restart-after-upgrade for both dh_installinit and
    dh_systemd_start to minimize downtimes. Cherry-picked from
    ee74f97a368a45eb8254ae9a26cb001732b85b6f by Ondřej Surý
    <email address hidden>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 9b72314..5ac2d81 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+php7.0 (7.0.33-0ubuntu0.16.04.3) xenial; urgency=medium
7+
8+ * d/rules: Enable --restart-after-upgrade for both dh_installinit and
9+ dh_systemd_start to minimize downtimes. Cherry-picked from
10+ ee74f97a by Ondřej Surý <ondrej@debian.org> (LP: #1819033)
11+
12+ -- Karl Stenerud <karl.stenerud@canonical.com> Fri, 08 Mar 2019 14:11:32 +0100
13+
14 php7.0 (7.0.33-0ubuntu0.16.04.2) xenial-security; urgency=medium
15
16 * SECURITY UPDATE: invalid memory access in xmlrpc_decode()
17diff --git a/debian/rules b/debian/rules
18index 6cb3982..d8a3131 100755
19--- a/debian/rules
20+++ b/debian/rules
21@@ -512,6 +512,12 @@ endif
22 fi
23 ln -sf /usr/bin/shtool $(PHPIZE_BUILDDIR)/shtool
24
25+override_dh_installinit:
26+ dh_installinit --restart-after-upgrade
27+
28+override_dh_systemd_start:
29+ dh_systemd_start --restart-after-upgrade
30+
31 override_dh_apache2:
32 for sapi in apache2 cgi fpm; do \
33 $(SAPI_PACKAGE) \

Subscribers

People subscribed via source and target branches