--systemd=true auto-detection should consider /usr/local/sbin/init #7287
Labels
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
podman run
defaults to--systemd=true
. With--systemd=true
podman checks whether the command is either/sbin/init
,/usr/sbin/init
, orsystemd
.podman/pkg/specgen/generate/container_create.go
Lines 166 to 170 in a90ae00
The check was introduced in podman 1.6.2. Previously podman only checked that the command ended in
init
orsystemd
. The change broke FreeIPA container. Our containes uses a custom shell script at/usr/local/sbin/init
that prepares the system and then execs systemd at/sbin/init
. The container used to run fine with older versions of podman. It took our team a while to realize that more recent versions of podman no longer active systemd support with--systemd=true
for our container. We thought that--systemd=true
always activates systemd support. At first it didn't occur to us that it merely activates systemd detection mode. @frasertweedale eventually connected the dots when he saw a BZ comment with--systemd=always
.Steps to reproduce the issue:
sudo podman run --rm --name freeipa-server-container -ti -h ipa.example.test --sysctl net.ipv6.conf.all.disable_ipv6=0 -v /var/lib/ipa-data:/data:Z -v /etc/machine-id:/etc/machine-id:ro --read-only --systemd=true freeipa-server
Describe the results you received:
Container fails to start with error message:
Describe the results you expected:
FreeIPA container should start and work.
Additional information you deem important (e.g. issue happens only occasionally):
The container starts correctly with
--systemd=always
.Please extend systemd auto-detection to include
/usr/local/sbin/init
. It would also be helpful to print a debug message whether podman has detected systemd or not.Output of
podman version
:1.6.4 is also affected
Package info (e.g. output of
rpm -q podman
orapt list podman
):Additional environment details (AWS, VirtualBox, physical, etc.):
n/a/
The text was updated successfully, but these errors were encountered: