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 support for pause #908

Merged
merged 1 commit into from
Jan 26, 2023
Merged

Conversation

saschagrunert
Copy link
Member

@saschagrunert saschagrunert commented Nov 17, 2022

What type of PR is this?

/kind feature

What this PR does / why we need it:

This experiment adds support for running a global shared pause instance side by side to conmonrs. The idea is that this instance keeps the required namespaces open and provides them as part of the container creation response to the consumers.

Which issue(s) this PR fixes:

Refers to #871

Special notes for your reviewer:

None

Does this PR introduce a user-facing change?

Added support for `pause` (the `pinns` functionality)

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 17, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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

@saschagrunert
Copy link
Member Author

saschagrunert commented Nov 17, 2022

@haircommander @rphillips do you think this would work? The main idea is that conmonrs calls it self via conmonrs -p to have something similar like pinns. Now we also fork to have a new PID namespace at hand. We can then inherit the namespaces by the pause PID in some later iteration.

@saschagrunert saschagrunert changed the title WIP: Add support for pause Add support for pause Nov 21, 2022
@saschagrunert
Copy link
Member Author

Ready for review. PTAL @rphillips @haircommander

@haircommander
Copy link
Collaborator

if conmon-rs exits, are we making sure the pause processes are stopped? I think otherwise they'd leak

@saschagrunert
Copy link
Member Author

saschagrunert commented Nov 21, 2022

if conmon-rs exits, are we making sure the pause processes are stopped? I think otherwise they'd leak

Yes, there: https://github.com/containers/conmon-rs/pull/908/files#diff-5d1350be7d73e8dfd3f43f70d9d71838500a7c04b2ee5ee19f1c4521f9df7d12R224-R226

conmonrs pause is also a child of conmonrs.

This experiment adds support for running a global shared pause instance
side by side to `conmonrs`. The idea is that this instance keeps the
required namespaces open and provides them as part of the container
creation response to the consumers.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
@saschagrunert
Copy link
Member Author

Gave it a rebase.

@rphillips
Copy link
Collaborator

This looks ready to me. Nice job... @haircommander ?

@haircommander
Copy link
Collaborator

/lgtm

@haircommander
Copy link
Collaborator

well done here!

@openshift-merge-robot openshift-merge-robot merged commit 2e123a1 into containers:main Jan 26, 2023
const PAUSE_PATH: &str = "/var/run/conmonrs";

/// The file path for storing the pause PID.
const PAUSE_PID_FILE: &str = ".pause_pid";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to run this as a systemd unit instead?

Copy link
Member Author

@saschagrunert saschagrunert Jan 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I'm not sure about the resource overhead we add when using systemd here. We can definitely give it a try and see how it behaves. Opened #1041 for tracking.

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.

5 participants