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

bugfix: fix start container twice error #2229

Merged

Conversation

HusterWan
Copy link
Contributor

@HusterWan HusterWan commented Sep 11, 2018

Signed-off-by: Michael Wan zirenwan@gmail.com

Ⅰ. Describe what this PR did

When starting a container, we should check the container's status first. If the container is already started, we should just return http.StatusNotModified error.

Ⅱ. Does this pull request fix one issue?

None

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

add test case

Ⅳ. Describe how to verify it

none

Ⅴ. Special notes for reviews

none

@pouchrobot pouchrobot added kind/bug This is bug report for project size/S labels Sep 11, 2018
Signed-off-by: Michael Wan <zirenwan@gmail.com>
@HusterWan HusterWan force-pushed the zr/fix-start-twice-error branch from a6d9e41 to a0171dc Compare September 11, 2018 10:28
@pouchrobot pouchrobot added size/M and removed size/S labels Sep 11, 2018
@codecov-io
Copy link

codecov-io commented Sep 11, 2018

Codecov Report

Merging #2229 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2229      +/-   ##
=========================================
+ Coverage   66.57%   66.6%   +0.02%     
=========================================
  Files         208     208              
  Lines       16744   16750       +6     
=========================================
+ Hits        11148   11156       +8     
+ Misses       4273    4270       -3     
- Partials     1323    1324       +1
Flag Coverage Δ
#criv1alpha1test 32.97% <0%> (-0.01%) ⬇️
#criv1alpha2test 33.63% <0%> (+0.19%) ⬆️
#integrationtest 40.01% <100%> (+0.05%) ⬆️
#nodee2etest 33.6% <0%> (-0.11%) ⬇️
#unittest 23.86% <0%> (-0.01%) ⬇️
Impacted Files Coverage Δ
pkg/errtypes/errors.go 100% <100%> (ø) ⬆️
daemon/mgr/container.go 57.05% <100%> (-0.12%) ⬇️
apis/server/router.go 91.94% <100%> (+0.1%) ⬆️
cri/ocicni/cni_manager.go 65% <0%> (-15%) ⬇️
daemon/containerio/cri_log_file.go 84.31% <0%> (-3.93%) ⬇️
cri/v1alpha1/cri.go 62.22% <0%> (-0.34%) ⬇️
cri/v1alpha2/cri.go 71.88% <0%> (-0.32%) ⬇️
ctrd/container.go 60.52% <0%> (+0.95%) ⬆️
cri/v1alpha2/cri_wrapper.go 66.94% <0%> (+1.25%) ⬆️
... and 3 more

@allencloud
Copy link
Collaborator

allencloud commented Sep 11, 2018

LGTM, I would like to invite @rudyfly and @fuweid to take a review again.

@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label Sep 11, 2018
@allencloud allencloud merged commit efd3746 into AliyunContainerService:master Sep 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This is bug report for project LGTM one maintainer or community participant agrees to merge the pull reuqest. size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants