Detection of systemd breaks building in docker
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apache2 (Ubuntu) |
Fix Released
|
High
|
Bryce Harrington |
Bug Description
apache2ctl detects if systemd is in use by looking at the owner of /proc/1/exe.
Under docker, however, this cannot be relied on and may simply be the command being run:
$ docker run --rm --name "apache2-test" 26ff08910bcd ls -l /proc/1/exe
lrwxrwxrwx 1 root root 0 Feb 23 22:07 /proc/1/exe -> /usr/bin/ls
This is seen as causing OCI build failures, with an error such as:
...
Enabling site 000-default.
update-rc.d: error: no runlevel symlinks to modify, aborting!
dpkg: error processing package apache2 (--configure):
installed apache2 package post-installation script subprocess returned error exit status 1
Processing triggers for libc-bin (2.33-0ubuntu2) ...
Errors were encountered while processing:
apache2
...
[Proposed Fix]
Another way to look for systemd is [ -d /run/systemd/system ], which may be worth having as a fallback to check if /proc/1 is not systemd.
Related branches
- Christian Ehrhardt (community): Approve
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 2522 lines (+1869/-34)14 files modifieddebian/apache2-bin.install (+1/-0)
debian/apache2-utils.ufw.profile (+14/-0)
debian/apache2.dirs (+1/-0)
debian/apache2.install (+1/-0)
debian/apache2.postrm (+1/-0)
debian/apache2.py (+48/-0)
debian/apache2ctl (+33/-18)
debian/changelog (+1697/-2)
debian/control (+4/-2)
debian/index.html (+19/-12)
debian/perl-framework/t/apache/expr_string.t (+4/-0)
debian/source/include-binaries (+1/-0)
debian/tests/check-http2 (+41/-0)
debian/tests/control (+4/-0)
description: | updated |
Changed in apache2 (Ubuntu): | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Bryce Harrington (bryce) |
This bug was fixed in the package apache2 - 2.4.46-4ubuntu1
---------------
apache2 (2.4.46-4ubuntu1) hirsute; urgency=medium
* Merge with Debian unstable, to allow moving from lua5.2 to utils.ufw. profile, dirs}: Add ufw profiles. apache2- bin.install: Add apport hook. ubuntu- logo.png, d/apache2.postrm: replace include- binaries: add Ubuntu icon file expr_string. t: Avoid test suite failure due to timing framework/ t/modules/ allowmethods. t: disable reset test. This
lua5.3 (LP: #1910372). Remaining changes:
- debian/{control, apache2.install, apache2-
apache2.
- debian/apache2.py, debian/
- d/index.html, d/icons/
Debian with Ubuntu on default page.
+ d/source/
- d/t/control, d/t/check-http2: add basic test for http2 support
- d/p/t/apache/
issue reading error log too quickly after request, by adding a sleep.
(LP #1890302)
- d/apache2ctl: Also use systemd for graceful if it is in use.
This extends an earlier fix for the start command to behave
similarly for restart / graceful. Fixes service failures on
unattended upgrade.
* Drop:
- d/perl-
was re-added by mistake in 2.4.41-1 (Closes #921024)
[Included in Debian 2.4.46-3]
* d/apache2ctl: Also use /run/systemd to check for systemd usage
(LP: #1918209)
-- Bryce Harrington <email address hidden> Tue, 09 Mar 2021 00:45:35 +0000