Skip to content
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

Add per command cgroup manager option #1504

Conversation

mgjm
Copy link
Contributor

@mgjm mgjm commented Jul 12, 2023

What type of PR is this?

/kind feature

What this PR does / why we need it:

The CgroupManager option is only used inside createContainer and execSyncContainer.

This PR moves this option from the global config to the respective command options.

For backwards compatibility the go client keeps the global option and only uses the per command option if the global ConmonServerConfig.CgroupManager is set to CgroupManagerPerCommand.

This allows existing users like CRI-O to keep working with old and new conmon-rs servers and will allow new users like podman to use the per command option with new conmon-rs servers.

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

This PR depends on #1499 because capnp fields are numbered sequentially. Merged

Clippy complained about too many arguments to the generate_create_args and generate_exec_sync_args functions. Therefore I moved the common arguments to the new GenerateRuntimeArgs struct and implemented the create_args and exec_sync_args methods.

Does this PR introduce a user-facing change?

Add option to specify the cgroup manager per command

Signed-off-by: Martin Michaelis <code@mgjm.de>
@mgjm mgjm force-pushed the create-container-cgroup-manager branch from 95f0b90 to d394dc4 Compare July 18, 2023 18:39
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 19, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mgjm, saschagrunert

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@haircommander
Copy link
Collaborator

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jul 19, 2023
@openshift-merge-robot openshift-merge-robot merged commit 4b5f901 into containers:main Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants