-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Add default runtime flags in config #26892
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
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: CowRules The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
Added a way to define default runtime flags in config. Fixes: https://github.com/containers/common/issues/715 Default runtime flags should be defined as shown below: [engine.runtimes_flags] runsc = [ "net-raw", ] crun = [ "debug", ] Signed-off-by: Rosvaldas Atstupėnas <[email protected]>
9d2be93
to
ff6ef7c
Compare
@CowRules Your config field change should be updated in podman already, so if you rebase this it should work now without the vendor changes. |
@@ -453,6 +454,12 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *Buil | |||
runtimeFlags = append(runtimeFlags, "--systemd-cgroup") | |||
} | |||
|
|||
configIndex := libpod.RuntimeNameToConfigIndex(podmanConfig.RuntimePath) |
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.
you cannot import libpod into the remote client, this function would need to live elsewhere but really I would say just inline this
configIndex := libpod.RuntimeNameToConfigIndex(podmanConfig.RuntimePath) | ||
|
||
for _, arg := range podmanConfig.ContainersConfDefaultsRO.Engine.OCIRuntimesFlags[configIndex] { | ||
runtimeFlags = append(runtimeFlags, "--"+arg) |
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.
I don't think this is right, compared to podmanConfig.RuntimeFlags this will always append. I would assume if we set --runtime-flag on the cli it should overwrite the config file and not always add as append?
Added a way to define default runtime flags in config.
Default runtime flags should be defined as shown below:
Fixes: containers/container-libs#91
This PR depends on containers/container-libs#281
Does this PR introduce a user-facing change?