-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ActiveState=failed after running "systemctl --user start podman.service" #15927
Comments
If I create the new user like this
then everything works for both alternatives
I wondered if this issue is a general problem related to socket activation and not having the user namespace set up, so I tried out socket activation of containers.
Interestingly the command I tried the same echo test again but now with I tried the same echo test again but now with Conclusion: This issue seems related to socket activation and not having the user namespace set up. |
New test with Fedora CoreOS. Podman version 4.2.1. test: "podman system service" (via "systemctl --user start podman.service")test.sh
test_unshare.shIs almost the same as test.sh but with an additional line --- /tmp/test.sh 2022-09-25 08:41:05.148456553 +0000
+++ /tmp/test_unshare.sh 2022-09-25 08:40:38.141553130 +0000
@@ -11,6 +11,7 @@
set -o nounset
systemctl --user start podman.socket
+podman unshare /bin/true
systemctl --user start podman.service
sleep $seconds
systemctl --user show -P ActiveState podman.service
When using a sleep-value of 0 seconds, the service is active. I guess the service has not yet failed.
test: socket activation of containerssocketactivation.sh
socketactivation_unshare.shIs almost the same as socketactivation.sh but with an additional line [root@asus ~]# diff -u /tmp/socketactivation.sh /tmp/socketactivation_unshare.sh
--- /tmp/socketactivation.sh 2022-09-28 21:00:48.704516815 +0200
+++ /tmp/socketactivation_unshare.sh 2022-09-28 21:01:00.028254794 +0200
@@ -11,6 +11,7 @@
set -o nounset
systemctl --user start podman.socket
+podman unshare /bin/true
systemd-socket-activate -l /home/${username}/sock podman run --rm --name echo --network=none ghcr.io/eriksjolund/socket-activate-echo > ~/stdout 2> ~/stderr &
sleep 1
echo hello | socat -t 100 - unix:/home/${username}/sock The reply hello can not be seen when running socketactivation.sh:
The reply hello can be seen when running socketactivation_unshare.sh:
About the system
|
[NO NEW TESTS NEEDED] Fixes: containers#15927 Signed-off-by: Erik Sjölund <[email protected]>
[NO NEW TESTS NEEDED] Fixes: containers#15927 Signed-off-by: Erik Sjölund <[email protected]>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
The systemd user service podman.service is failed after running
systemctl --user start podman.service
.(I think this explicit starting of podman.service with socket activation should be supported although it is not the standard way of how to start podman.service).
A sidenote: Interestingly even when starting podman.service the standard way (i.e. a client connects to podman.socket), the log shows
and
and
Steps to reproduce the issue:
Create a new user and log in to it
Start the systemd user service podman.service with socket activation. Note, often socket-activated services
are started by systemd when the first client connects. In this case systemd starts podman.service with socket activation without waiting for the first client connection.
Run
systemctl --user show -P ActiveState podman.service
Check the podman.service log
Describe the results you received:
At step 3:
Describe the results you expected:
Either
or
The service should be active at first but then becoming inactive after the inactivity timeout (that can be set with the
podman system service
option --time)Additional information you deem important (e.g. issue happens only occasionally):
If I start podman.service (the standard way) by running
instead of running
I also see the error messages
Error: failed to start API service: accept unixgram
:and
podman.service: Failed with result 'exit-code'.
andThe unit UNIT has entered the 'failed' state with result 'exit-code'.
See the log
If I run
systemctl --user show -P ActiveState podman.service
after the curl command, it first shows active and after some seconds inactive:Output of
podman version
:Output of
podman info
:Package info (e.g. output of
rpm -q podman
orapt list podman
):The text was updated successfully, but these errors were encountered: