-
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
podman.service: use sdnotify #7312
Conversation
@martinpitt @goochjj PTAL |
9bb10d3
to
dc12ec7
Compare
/hold |
This looks good to me now. Podman will now be stopped as systemd knows it's PID. Also systemd is not complaining about old conmons hanging around but it actually reports them. Below you can see what I'm referring to. I ran a bunch of containers, waited for the service to timeout and then did an
|
/lgtm |
LGTM |
Please wait with merging until we have more acks on it. |
I thought you had two. But you have control anyways. |
why do we have conmon processes in the podman.service cgroup? I thought we moved them to a separate cgroup |
Could it be because we're unsetting NOTIFY_SOCKET? |
that should not happen (at least I don't see we are using it internally in Podman). I don't think the issue is introduced with this change. Or are those old containers that are configured with --cgroup-mode=split? |
They are created with the remote client. Maybe we're missing that in the remote code paths? |
this patch seems to do the trick:
|
Commit 2b6dd3f set the killmode of the podman.service to the systemd default which ultimately lead to the problem that systemd will kill *all* processes inside the unit's cgroup and hence kill all containers whenever the service is stopped. Fix it by setting the type to sdnotify and the killmode to process. `podman system service` will send the necessary notify messages when the NOTIFY_SOCKET is set and unset it right after to prevent the backend and container runtimes from jumping in between and send messages as well. Fixes: containers#7294 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Tested successfully, thanks @giuseppe ! |
Allright, now as we've ironed out the last remaining fart, I am good to merge. Thanks all! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: giuseppe, vrothberg The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
LGTM |
The change LGTM, but it looks like you may have encountered a real error in the tests. |
F31 looks like one of our remote flakes... /lgtm |
yes, it's the #7195 flake |
/hold investigating something. Please do not merge yet. |
All clear. The problem I was looking at turned out to be caused by something else. |
/hold cancel |
Commit 2b6dd3f set the killmode of the podman.service to the
systemd default which ultimately lead to the problem that systemd
will kill all processes inside the unit's cgroup and hence kill
all containers whenever the service is stopped.
Fix it by setting the type to sdnotify and the killmode to process.
podman system service
will send the necessary notify messageswhen the SDNOTIFY_SOCKET is set and unset it right after to prevent
the backend and container runtimes from jumping in between and send
messages as well.
Fixes: #7294
Signed-off-by: Valentin Rothberg rothberg@redhat.com