-
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
An official way to send signals into a container for ExecReload= #22036
Comments
A friendly reminder that this issue had no activity for 30 days. |
+1 need this |
@ygalblum @mheon @alexlarsson @cgwalters WDYT? Should we just do this by default? |
I don't think so; SIGHUP isn't really universal. |
Then |
How would that work? Thing is some daemons (like samba and nginx) support being sent SIGHUP for them to reload their configuration data without stopping and restarting, and others do it differently |
I was thinking it would just add ExecReload=/usr/bin/podman kill -s SIGHUP --cidfile=%t/%N.cid |
Sure For the non default users you can just add the But for the most common case, we can make it easy to discover the --cidfile... option. |
@rhatdan maybe so... is that already available? |
Hmm
I think just documenting the correct way to do this in the |
Please open a PR. |
How about adding two mutually exclusive options:
while
An example for an application that could use I believe these options would cover most container workloads. |
Seams reasonable. |
Feature request description
Where
foo
is a Podman Quadlet.container
service, I'd likesystemctl reload foo
to send aSIGHUP
to the container's main process.I'm currently doing this:
I got the
--cidfile=%r/%N.cid
construct by looking at theExecStart=
directive in the generatedfoo.service
unit. But it feels a bit non/obvious & like I'm relying on an implementation detail of Quadlet. Not one that's likely to change, but it would be nice if there was a more documented/obvious way to be able to send signals into the container.This would also work:
... but it relies on the user not also specifying
ContainerName=
.Suggest potential solution
Quadlet could introduce its own specifiers that it expands during
.container
file processing. Something like:However it would probably be too confusing for Quadlet and systemd to both be doing their own expansion processing on directives with differently defined specifiers.
Have you considered any alternatives?
Document
--cidfile=%t/%N.cid
inpodman-systemd.unit(5)
and add it to thetest.container
example withinpodman-systemd.unit(5)
. But this will make it an interface promise, so if you wanted to put Quadlet's cidfiles somewhere else in the future you'd break people's.container
units.Additional context
No response
The text was updated successfully, but these errors were encountered: