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

feature: extend cri apis for support pause/unpause container #2623

Merged
merged 1 commit into from
Jan 17, 2019

Conversation

zhuangqh
Copy link
Contributor

Ⅰ. Describe what this PR did

CRI support pause/unpause containers

related to #2622

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)

Ⅳ. Describe how to verify it

create test to cover the new interface on cri-tools

Ⅴ. Special notes for reviews

depend on PR #2613

@codecov
Copy link

codecov bot commented Dec 27, 2018

Codecov Report

Merging #2623 into master will decrease coverage by 0.15%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2623      +/-   ##
==========================================
- Coverage   69.59%   69.43%   -0.16%     
==========================================
  Files         281      283       +2     
  Lines       18805    18827      +22     
==========================================
- Hits        13087    13073      -14     
- Misses       4255     4292      +37     
+ Partials     1463     1462       -1
Flag Coverage Δ
#criv1alpha1test 31.55% <0%> (-0.03%) ⬇️
#criv1alpha2test 35.64% <0%> (-0.11%) ⬇️
#integrationtest 42.19% <0%> (-0.02%) ⬇️
#nodee2etest 32.29% <0%> (-0.12%) ⬇️
#unittest 27.02% <0%> (-0.04%) ⬇️
Impacted Files Coverage Δ
cri/v1alpha2/container_unpause.go 0% <0%> (ø)
cri/v1alpha2/container_pause.go 0% <0%> (ø)
cri/ocicni/cni_manager.go 58.82% <0%> (-11.77%) ⬇️
pkg/streams/utils.go 82.14% <0%> (-9.53%) ⬇️
apis/server/utils.go 71.15% <0%> (-3.85%) ⬇️
cri/v1alpha2/cri.go 69.15% <0%> (-0.13%) ⬇️
daemon/mgr/container_utils.go 84.52% <0%> (+0.59%) ⬆️
pkg/meta/store.go 68.99% <0%> (+1.55%) ⬆️

@allencloud allencloud added the need-docs This pull request should also add more document label Dec 28, 2018
@allencloud
Copy link
Collaborator

allencloud commented Dec 28, 2018

I think we should add this extension into the document. https://github.com/alibaba/pouch/blob/master/docs/kubernetes/pouch_cri_api_changelog.md

@zhuangqh zhuangqh changed the title feature: CRI support pause/unpause containers feature: extend cri apis for support pause/unpause container Jan 9, 2019
@zhuangqh zhuangqh force-pushed the feature-cri-pause branch 2 times, most recently from 5ef9afb to 01703f7 Compare January 13, 2019 11:08
@fuweid fuweid added this to the v1.2.0 milestone Jan 17, 2019

containerID := r.GetContainerId()

err := c.ContainerMgr.Pause(ctx, containerID)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit, you can use if err := c.ContainerMgr.Pause(ctx, containerID); err != nil here.

cri/v1alpha2/container_unpause.go Outdated Show resolved Hide resolved
Under serverless situation, we may pre-allocate a batch of container which were ready to serve, waiting
online. In order to reduce the cost of system resource, we stop these containers, and start them when
they are required to serve. Using pause container to balance the resource cost and application start-up time.

Signed-off-by: zhuangqh <zhuangqhc@gmail.com>
@zhuangqh zhuangqh removed the need-docs This pull request should also add more document label Jan 17, 2019
Copy link
Contributor

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

@fuweid fuweid merged commit 6ca29af into AliyunContainerService:master Jan 17, 2019
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