-
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
Quadlet - add support for global arguments #20253
Conversation
pkg/systemd/quadlet/quadlet.go
Outdated
@@ -72,6 +73,7 @@ const ( | |||
KeyExec = "Exec" | |||
KeyExitCodePropagation = "ExitCodePropagation" | |||
KeyExposeHostPort = "ExposeHostPort" | |||
KeyGlobalOptions = "GlobalOptions" |
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.
We use PodmanArgs
for flags to the command. To have a symmetric name, could name this GlobalArgs
or RootArgs
?
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.
Since both you and @Luap99 suggested GlobalArgs
, I went with that.
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.
That was super quick, thanks!
I think that both, --module
and the other root flags need to be added to all invocations of Podman. That includes the ExecStop{Post}
as well. Podman may be pointed to a completely different graph root, so the podman rm
s won't work without sharing the flags.
Ephemeral COPR build failed. @containers/packit-build please check. |
1 similar comment
Ephemeral COPR build failed. @containers/packit-build please check. |
Cockpit tests failed for commit c33bf3f2e51cf296dde886ea16322f3a91410623. @martinpitt, @jelly, @mvollmer please check. |
All kinds of test unhappiness |
|
c33bf3f
to
addefec
Compare
You're right, thanks. I've updated the code and tests accordingly |
@TomSweeneyRedHat @lsm5 yes I've seen this error, though, I don't know how to fix it. It's not the first time this happens but I don't remember how I fixed it before as it was the result of trial-and-error cycles. The issue is caused by the table line added for
So, I was wondering if you know what needs to change in order to fix this error. |
Ephemeral COPR build failed. @containers/packit-build please check. |
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.
To pass the docs build, the 1.conf
needs to be escaped to 1\.conf
. The error is quite misleading
Maybe replace it to |
e07ce99
to
752c9c6
Compare
@vrothberg Thanks for your help (and I've changed to |
752c9c6
to
515277b
Compare
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
Linter isn't happy yet |
515277b
to
941337e
Compare
Code LGTM |
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
/hold
Restarted the flaked jobs; transient errors on Quay.
pkg/systemd/quadlet/quadlet.go
Outdated
service.Add(ServiceGroup, "ExecStopPost", "-"+podmanBinary()+" rm -v -f -i --cidfile=%t/%N.cid") | ||
serviceStopCmd.Args = append([]string{"-"}, serviceStopCmd.Args...) |
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.
This change does not look right, it will result in - binary
not the old (correct) -binary
, notice the extra space.
The fact that none of the test catches that worries me, testing locally I see
Empty path in command line, ignoring: '- /usr/bin/podman rm -v -f -i --cidfile=%t/%N.cid'
as warning in the journal so it is not accepted by systemd.
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.
Thanks for finding this.
The issue was in the regex being checked as it was not forcing non white space after the -
sign. I've fixed it and the code.
Add support for adding podman level arguments before subcommand Add specific key for Containers Conf Modules Global arguments are added for both start and stop commands Adjust testing environment Add tests Add to man page Signed-off-by: Ygal Blum <[email protected]>
941337e
to
d321d42
Compare
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: Luap99, vrothberg, ygalblum 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 |
Add support for adding podman level arguments before subcommand Add specific key for Containers Conf Modules
Adjust testing environment
Add tests
Add to man page
Does this PR introduce a user-facing change?
Yes
Resolves: #20246