Merge ~bryce/ubuntu/+source/apache2:sru-lp1832182-graceful-revert-impish into ubuntu/+source/apache2:ubuntu/devel

Proposed by Bryce Harrington
Status: Merged
Merge reported by: Bryce Harrington
Merged at revision: 5d247d82fae4129f1b7977bc4f3bdd57b9325d97
Proposed branch: ~bryce/ubuntu/+source/apache2:sru-lp1832182-graceful-revert-impish
Merge into: ubuntu/+source/apache2:ubuntu/devel
Diff against target: 98 lines (+25/-33)
2 files modified
debian/apache2ctl (+18/-33)
debian/changelog (+7/-0)
Reviewer Review Type Date Requested Status
Christian Ehrhardt  (community) Approve
Canonical Server Pending
Review via email: mp+412058@code.launchpad.net

Description of the change

This reverts an SRU fix that was reported to have a performance impact reported by focal users when supporting large numbers of vhosts. We reverted this in focal a few weeks ago and there's been no feedback regarding problems, so it's probably worth doing the same revert to the other releases.

After that, the plan will be to focus on a fix just for jammy, and then also get it accepted into Debian. After that we can evaluate whether or not to try SRUing again.

PPA: https://launchpad.net/~bryce/+archive/ubuntu/apache2-sru-lp1832182-graceful-revert

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

Also filed against ubuntu/devel instead of impish, but by chance they still match so LP view is ok.
I checked git to be sure, just as I said in the Hirsute MP I can confirm that this is the exact revert of that old change.

Also I agree with taking it back given what the discussion in the bug revealed.

+1

review: Approve
Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks, uploading:

$ dput ubuntu ../apache2_2.4.48-3.1ubuntu3.1_source.changes
D: Setting host argument.
Checking signature on .changes
gpg: ../apache2_2.4.48-3.1ubuntu3.1_source.changes: Valid signature from E603B2578FB8F0FB
Checking signature on .dsc
gpg: ../apache2_2.4.48-3.1ubuntu3.1.dsc: Valid signature from E603B2578FB8F0FB
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading apache2_2.4.48-3.1ubuntu3.1.dsc: done.
  Uploading apache2_2.4.48-3.1ubuntu3.1.debian.tar.xz: done.
  Uploading apache2_2.4.48-3.1ubuntu3.1_source.buildinfo: done.
  Uploading apache2_2.4.48-3.1ubuntu3.1_source.changes: done.
Successfully uploaded packages.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/apache2ctl b/debian/apache2ctl
2index 02f3bca..404b9f9 100755
3--- a/debian/apache2ctl
4+++ b/debian/apache2ctl
5@@ -143,21 +143,6 @@ mkdir_chown () {
6 fi
7 }
8
9-need_systemd () {
10- # Detect if systemd is in use and should be used for managing
11- # the Apache2 httpd service. Returns 0 if so, 1 otherwise.
12- if [ -z "${APACHE_STARTED_BY_SYSTEMD}" ]; then
13- case "$(readlink -f /proc/1/exe)" in
14- *systemd*)
15- return 0
16- ;;
17- esac
18- # With Docker, /proc/1 is not necessarily an init system,
19- # so fallback to checking in /run.
20- [ -d /run/systemd/system ]
21- fi
22- return 1
23-}
24
25 [ ! -d ${APACHE_RUN_DIR:-/var/run/apache2} ] && mkdir -p ${APACHE_RUN_DIR:-/var/run/apache2}
26 [ ! -d ${APACHE_LOCK_DIR:-/var/lock/apache2} ] && mkdir_chown ${APACHE_RUN_USER:-www-data} ${APACHE_LOCK_DIR:-/var/lock/apache2}
27@@ -168,38 +153,38 @@ start)
28 # (this is bad if there are several apache2 instances running)
29 rm -f ${APACHE_RUN_DIR:-/var/run/apache2}/*ssl_scache*
30
31- if need_systemd; then
32+ need_systemd=false
33+ if [ -z "$APACHE_STARTED_BY_SYSTEMD" ] ; then
34+ case "$(readlink -f /proc/1/exe)" in
35+ *systemd*)
36+ need_systemd=true
37+ ;;
38+ *)
39+ ;;
40+ esac
41+ fi
42+ if $need_systemd ; then
43 # If running on systemd we should not start httpd without systemd
44 # or systemd will get confused about the status of httpd.
45- echo "Invoking 'systemctl start ${APACHE_SYSTEMD_SERVICE}'."
46- echo "Use 'systemctl status ${APACHE_SYSTEMD_SERVICE}' for more info."
47- systemctl start "${APACHE_SYSTEMD_SERVICE}"
48+ echo "Invoking 'systemctl start $APACHE_SYSTEMD_SERVICE'."
49+ echo "Use 'systemctl status $APACHE_SYSTEMD_SERVICE' for more info."
50+ systemctl start "$APACHE_SYSTEMD_SERVICE"
51 else
52 unset APACHE_STARTED_BY_SYSTEMD
53- ${HTTPD} ${APACHE_ARGUMENTS} -k "${ARGV}"
54+ $HTTPD ${APACHE_ARGUMENTS} -k "$ARGV"
55 fi
56
57 ERROR=$?
58 ;;
59 stop|graceful-stop)
60- ${HTTPD} ${APACHE_ARGUMENTS} -k "$ARGV"
61+ $HTTPD ${APACHE_ARGUMENTS} -k "$ARGV"
62 ERROR=$?
63 ;;
64 restart|graceful)
65 if $HTTPD ${APACHE_ARGUMENTS} -t 2> /dev/null ; then
66- if need_systemd; then
67- # If running on systemd we should not directly restart httpd since
68- # systemd would be confused about httpd's status.
69- # (See LP: #1832182)
70- echo "Invoking 'systemctl restart ${APACHE_SYSTEMD_SERVICE}'."
71- echo "Use 'systemctl status ${APACHE_SYSTEMD_SERVICE}' for more info."
72- systemctl restart "${APACHE_SYSTEMD_SERVICE}"
73- else
74- unset APACHE_STARTED_BY_SYSTEMD
75- ${HTTPD} ${APACHE_ARGUMENTS} -k "${ARGV}"
76- fi
77+ $HTTPD ${APACHE_ARGUMENTS} -k "$ARGV"
78 else
79- ${HTTPD} ${APACHE_ARGUMENTS} -t
80+ $HTTPD ${APACHE_ARGUMENTS} -t
81 fi
82 ERROR=$?
83 ;;
84diff --git a/debian/changelog b/debian/changelog
85index 0dbb7c5..7a81cb0 100644
86--- a/debian/changelog
87+++ b/debian/changelog
88@@ -1,3 +1,10 @@
89+apache2 (2.4.48-3.1ubuntu3.1) impish; urgency=medium
90+
91+ * Revert fix from 2.4.46-1ubuntu2, due to performance regression.
92+ (LP 1832182)
93+
94+ -- Bryce Harrington <bryce@canonical.com> Sun, 14 Nov 2021 23:49:31 +0000
95+
96 apache2 (2.4.48-3.1ubuntu3) impish; urgency=medium
97
98 * SECURITY REGRESSION: Issues in UDS URIs (LP: #1945311)

Subscribers

People subscribed via source and target branches