Merge ~paelzer/ubuntu/+source/haproxy:bug-1848902-hang-on-exit-143-BIONIC into ubuntu/+source/haproxy:ubuntu/bionic-devel
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Christian Ehrhardt on 2019-11-18 | ||||
Approved revision: | d0d17a603b126f2c2239d8903a5713b529cc4c81 | ||||
Merged at revision: | d0d17a603b126f2c2239d8903a5713b529cc4c81 | ||||
Proposed branch: | ~paelzer/ubuntu/+source/haproxy:bug-1848902-hang-on-exit-143-BIONIC | ||||
Merge into: | ubuntu/+source/haproxy:ubuntu/bionic-devel | ||||
Diff against target: |
91 lines (+69/-0) 3 files modified
debian/changelog (+7/-0) debian/patches/lp-1848902-MINOR-systemd-consider-exit-status-143-as-successful.patch (+61/-0) debian/patches/series (+1/-0) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Bryce Harrington | 2019-11-12 | Needs Fixing on 2019-11-16 | |
Canonical Server Team | 2019-11-12 | Pending | |
Canonical Server packageset reviewers | 2019-11-12 | Pending | |
Review via email:
|
Christian Ehrhardt (paelzer) wrote : | # |
Bryce Harrington (bryce) wrote : | # |
- [√] changelog entry correct, targeted to correct codename
- [√] no major upstream changes to consider
- [√] debian changes look safe
- [√] update-maintainer has been run
- [-] changes forwarded upstream/debian (if appropriate)
- [-] nothing else to drop
- [√] patches match what was proposed upstream
- [√] patches correctly included in debian/
- [√] patches have correct DEP3 metadata
== Testing ==
$ lxc launch ubuntu:18.04/amd64 bug-1848902-haproxy-hang
$ lxc exec bug-1848902-haproxy-hang -- bash
== Existing (broken) case ==
# apt-get install haproxy=
# systemctl status haproxy | grep Active:
Active: active (running) since Sat 2019-11-16 20:41:51 UTC; 1min 32s ago
# pkill -TERM -x haproxy
# systemctl status haproxy
Active: active (running) since Sat 2019-11-16 20:43:52 UTC; 1s ago
# for x in {1..100}; do pkill -TERM -x haproxy ; sleep 0.1 ; done
# systemctl status haproxy | grep Active:
Active: failed (Result: exit-code) since Sat 2019-11-16 20:44:53 UTC; 18s ago
== PPA Version ==
# add-apt-repository ppa:paelzer/bug-1848902-haproxy-hang
# apt install haproxy
# apt-cache policy haproxy | grep Installed:
Installed: 1.8.8-1ubuntu0.
# systemctl status haproxy | grep Active:
Active: active (running) since Sat 2019-11-16 20:46:52 UTC; 29s ago
# pkill -TERM -x haproxy
# systemctl status haproxy | grep Active:
Active: active (running) since Sat 2019-11-16 20:49:10 UTC; 917ms ago
# for x in {1..100}; do pkill -TERM -x haproxy ; sleep 0.1 ; done
# systemctl status haproxy | grep Active:
Active: failed (Result: start-limit-hit) since Sat 2019-11-16 20:50:18 UTC; 9s ago
---
I think the test case would be clearer if the end result was haproxy remained actively running, rather than fail just for a different reason, however it is failing for the documented reason (start limit hit) instead of the original problem (exit code), so technically seems to be correct and behaving as designed, so +1.
Bryce Harrington (bryce) wrote : | # |
Figured out a way to hackaround the rate limiter in the test case for the SRU template:
for x in {1..100}; do pkill -TERM -x haproxy ; sleep 0.1 ; systemctl reset-failed haproxy.service; done
With that, the test case should result in success with the fixed case.
Otherwise, once you hit x==6 in the loop systemd just kills off the service and you don't exercise the test coverage for the remaining 95 steps of the counter. I couldn't find a way to configure this per-service (I experimented with StartLimitBurst=101 and StartLimitInter
Christian Ehrhardt (paelzer) wrote : | # |
Thanks for the modified test bryce, but with it also the old code remains an active service.
I extended the steps in the SRU template.
I admit the test isn't perfect at all, but that is the nature with races.
At least the fix is accepted upstream and in addition fact that active users already run the accepted RC in the field convinces me to go forward.
Christian Ehrhardt (paelzer) wrote : | # |
To ssh://git.
* [new tag] upload/
$ dput ubuntu ../haproxy_
Checking signature on .changes
gpg: ../haproxy_
Checking signature on .dsc
gpg: ../haproxy_
Uploading to ubuntu (via ftp to upload.ubuntu.com):
Uploading haproxy_
Uploading haproxy_
Uploading haproxy_
Uploading haproxy_
Successfully uploaded packages.
PPA: https:/ /launchpad. net/~paelzer/ +archive/ ubuntu/ bug-1848902- haproxy- hang