-
Notifications
You must be signed in to change notification settings - Fork 944
feature: CONTAINER_PAUSE state for CRI #2681
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
feature: CONTAINER_PAUSE state for CRI #2681
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2681 +/- ##
==========================================
- Coverage 69.32% 69.31% -0.02%
==========================================
Files 285 285
Lines 18959 18948 -11
==========================================
- Hits 13144 13134 -10
+ Misses 4346 4345 -1
Partials 1469 1469
|
| // * Case 2: container has failed to start; it has a zero finishedAt | ||
| // time, but a non-zero exit code. | ||
| // * Case 3: container has been created, but not started (yet). | ||
| finishTime, err := time.Parse(utils.TimeLayout, container.State.FinishedAt) |
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.
PouchContainer will promise the consistency about FinishedAt, CreatedAt, StartedAt and container state
5aef036 to
6f6102e
Compare
Signed-off-by: zhuangqh <[email protected]>
6f6102e to
07a0ee5
Compare
| return runtime.ContainerState_CONTAINER_RUNNING | ||
| case apitypes.StatusExited: | ||
| return runtime.ContainerState_CONTAINER_EXITED | ||
| func toCriContainerState(state *apitypes.ContainerState) (criState runtime.ContainerState, reason string) { |
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.
Why just define the return type runtime.ContainerState, string and return the value in the function?
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.
Did you mean the named return value?
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.
yes
|
LGTM |
Ⅰ. Describe what this PR did
Pause/Unpause container interface are added to CRI, but missing a PAUSE state from
ContainerStatusorListContainerto figure out the paused container.Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
cri test here.
alibaba-archive/cri-tools#11
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews
Signed-off-by: zhuangqh [email protected]