-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Can’t run systemd in Debian container from Debian host #15965
Replies: 3 comments · 14 replies
-
Please include a full |
Beta Was this translation helpful? Give feedback.
All reactions
-
Hi, Thanks for the answer. Here it is:
|
Beta Was this translation helpful? Give feedback.
All reactions
-
Not the image, but a container created from the image, please. I need to see if the created container is detecting systemd is in use. |
Beta Was this translation helpful? Give feedback.
All reactions
-
My apologize, I had read too fast. Sorry but how can I inspect the container if it can not be started? In doubt, here is the result of
|
Beta Was this translation helpful? Give feedback.
All reactions
-
The container has detected systemd is present and enabled systemd handling - so from Podman's perspective, the container is good to go for systemd init. I am wondering if this isn't an issue with how systemd is being invoked in the container, but I'm not sufficiently familiar with the specifics of the systemd init to say for sure what that might be. |
Beta Was this translation helpful? Give feedback.
All reactions
-
If I understand properly, the container has detected systemd only because I ran it with |
Beta Was this translation helpful? Give feedback.
All reactions
-
Could you try FROM docker.io/library/debian:bullseye |
Beta Was this translation helpful? Give feedback.
All reactions
-
The problem is we do not interpret the sh -c /usr/sbin/systemd the same as /usr/sbin/systemd. If you change the Containerfile to FROM docker.io/library/debian:bullseye It should fix your problem. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks, it works! And sorry for the time you spent on this… Regards, |
Beta Was this translation helpful? Give feedback.
All reactions
-
@rhatdan, can you, please, suggest - how to gracefully stop container with |
Beta Was this translation helpful? Give feedback.
All reactions
-
podman stop ? Systemd containers expect to be sent a special stop signal.
|
Beta Was this translation helpful? Give feedback.
All reactions
-
I I shall use image built from Docker(Container?)file snippet above, how I can send signal denoted by you? Via podman exec? |
Beta Was this translation helpful? Give feedback.
All reactions
-
BTW This looks like I fixed it in podman 4. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks for the link. |
Beta Was this translation helpful? Give feedback.
All reactions
This discussion was converted from issue #15954 on September 27, 2022 18:30.
-
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
From a Debian testing host running Podman 3.4.7, running systemd in a Debian stable container fails with error
Trying to run as user instance, but the system has not been booted with systemd.
, but it works if I append/lib/systemd/systemd
to thepodman run
command.Steps to reproduce the issue:
podman run localhost/my_image:latest
.Describe the results you received:
It fails with error
Trying to run as user instance, but the system has not been booted with systemd.
. Note that usingsystemd=always
does not help.Describe the results you expected:
The container should be able to run.
Additional information you deem important (e.g. issue happens only occasionally):
However, if I run the same image with
podman run localhost/my_image:latest /lib/systemd/systemd
then it works perfectly. Also, runningpodman run registry.access.redhat.com/ubi8-init
works as intended.Output of
podman version
:Output of
podman info
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
I first asked on podman@lists.podman.io, where I was told to report the issue upstream.
I did not test with latest upstream version (4.2.0) because it is still in Debian experimental and I would prefer avoid messing with my system if possible.
I have read the troubleshooting guide, but could not find anything related. I have also read changelogs from 3.4.7 to 4.2.0 and could not find something related to my issue, but I maybe I just missed it.
Additional environment details (AWS, VirtualBox, physical, etc.):
It is a physical host.
Beta Was this translation helpful? Give feedback.
All reactions