systemd ignores TimeoutStopSec when rebooting server and kills container #21631
Replies: 5 comments 10 replies
-
Isn't this an issue with systemd, don't see how Podman can control what systemd is doing here? |
Beta Was this translation helpful? Give feedback.
-
Should I add something to what Podman systemd generate so that the behaviour of systemctl stop container.service also applies to reboot? |
Beta Was this translation helpful? Give feedback.
-
No idea, but I would be more interested on how this is handled with Quadlet, since we are encouraging people to use it rather the podman systemd generate. |
Beta Was this translation helpful? Give feedback.
-
If you run the containers rootless then they are part of the system user session. So I think it is likely that your user session runs into the default 90s timeout and then all user processes are killed AFAIK. |
Beta Was this translation helpful? Give feedback.
-
I have the following unit.
Stopping with systemctl stop is fast.
Stopping with reboot podman stop keeps running
after the reboot looking at the journal I see a 90 second timeout between stopping and killing which is consistent with DefaultTimeoutStopSec=90s.
Worth metioning the fact that the container has system running inside it. If I run the ExecStop command the container closes cleanly after a few seconds.
Somehow my container doesn't understand SIGTERM if the podman stop is sent by systemd. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Issue Description
Systemd kills container with SIGKILL while systemctl stop waits for container to shutdown.
Steps to reproduce the issue
Steps to reproduce the issue
Describe the results you received
systemctl stop container-my app.service waits until container shuts down(~173 seconds)
reboot kills the container after 90 seconds.
Describe the results you expected
reboot waits until container shuts down
podman info output
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
No response
Additional information
No response
Beta Was this translation helpful? Give feedback.
All reactions