libcontainer: Add support for the "pausing" status#1704
Closed
wking wants to merge 1 commit intoopencontainers:mainfrom
Closed
libcontainer: Add support for the "pausing" status#1704wking wants to merge 1 commit intoopencontainers:mainfrom
wking wants to merge 1 commit intoopencontainers:mainfrom
Conversation
4122464 to
2f8ae9c
Compare
The freezer controller distinguishes between freezing and frozen [1]. We've had a "Pausing" since dbb515f (Update api proposal, 2014-07-08), but had never implemented it. This commit adds the missing implementation. I haven't updated libcontainer/cgroups, which has used a blocking freeze change since 3e8849f (implement wait on freeze, 2014-06-04). The cgroups interface doesn't distinguish between blocking and non-blocking sets, so there's no way to say "I want to start freezing, but don't need to block until completion". I haven't added integration tests either. All of our current tests (state.bats and pause.bats) assume a complete transition to 'paused'. That makes sense because 'runc pause ...' is based on the blocking libcontainer/cgroups implementation. The only way to see 'pausing' would be to have a parallel state call during the pause call. Here's how the timing could work out: 1. Call 'pause'. 2. Call 'state', which reads THAWED and outputs 'running' (or 'created', or whatever). 3. 'pause' starts freezing the controller. 4. Call 'state', which reads FREEZING and outputs 'pausing'. 5. 'pause' finishes freezing the controller. 6. Call 'state', which reads FROZEN and outputs 'paused'. 7. 'pause' exits. I'm not sure how to get a test where the 'state' call consistently fires at 4 and not at 2 or 6. [1]: https://www.kernel.org/doc/Documentation/cgroup-v1/freezer-subsystem.txt Signed-off-by: W. Trevor King <wking@tremily.us>
Contributor
|
We've removed "pausing" state in PR #3360 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on #1703; review that first.
The freezer controller distinguishes between freezing and frozen. We've had a
Pausingsince dbb515f (2014-07-08), but had never implemented it. This pull-request adds the missing implementation.I haven't updated
libcontainer/cgroups, which has used a blocking freeze change since 3e8849f (2014-06-04). The cgroups interface doesn't distinguish between blocking and non-blocking sets, so there's no way to say “I want to start freezing, but don't need to block until completion”.I haven't added integration tests either. All of our current tests (
state.batsandpause.bats) assume a complete transition topaused. That makes sense becauserunc pause …is based on the blockinglibcontainer/cgroupsimplementation. The only way to seepausingwould be to have a parallel state call during the pause call. Here's how the timing could work out:pause.state, which readsTHAWEDand outputsrunning(orcreated, or whatever).pausestarts freezing the controller.state, which readsFREEZINGand outputspausing.pausefinishes freezing the controller.state, which readsFROZENand outputspaused.pauseexits.I'm not sure how to get a test where the
statecall consistently fires at 4 and not at 2 or 6.