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: complete json tag for StreamServerReusePort and add some useful log for stop & remove pod operation #2266

Merged
merged 1 commit into from
Sep 21, 2018

Conversation

YaoZengzeng
Copy link
Contributor

Ⅰ. Describe what this PR did

  1. complete the missing json tag for StreamServerReusePort

  2. add some useful logs for stop & remove pod which may have multiple containers

  3. failed to log createErr

Ⅱ. Does this pull request fix one issue?

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

No

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov
Copy link

codecov bot commented Sep 21, 2018

Codecov Report

Merging #2266 into master will increase coverage by 0.05%.
The diff coverage is 53.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2266      +/-   ##
==========================================
+ Coverage   66.72%   66.77%   +0.05%     
==========================================
  Files         208      208              
  Lines       16926    16932       +6     
==========================================
+ Hits        11294    11307      +13     
+ Misses       4267     4262       -5     
+ Partials     1365     1363       -2
Flag Coverage Δ
#criv1alpha1test 32.7% <26.66%> (+0.19%) ⬆️
#criv1alpha2test 36.15% <26.66%> (+0.18%) ⬆️
#integrationtest 39.53% <0%> (-0.06%) ⬇️
#nodee2etest 33.4% <20%> (-0.01%) ⬇️
#unittest 23.74% <0%> (-0.01%) ⬇️
Impacted Files Coverage Δ
cri/v1alpha2/cri.go 66.76% <50%> (-0.01%) ⬇️
cri/v1alpha1/cri.go 62.21% <57.14%> (+0.68%) ⬆️
cri/stream/httpstream/spdy/upgrade.go 54.28% <0%> (-5.72%) ⬇️
daemon/mgr/snapshot.go 89.85% <0%> (-4.35%) ⬇️
cri/v1alpha2/cri_wrapper.go 60% <0%> (-1.21%) ⬇️
daemon/mgr/container.go 57.59% <0%> (+0.4%) ⬆️
ctrd/container.go 59.76% <0%> (+1.42%) ⬆️
ctrd/watch.go 80.3% <0%> (+4.54%) ⬆️

@@ -394,6 +397,7 @@ func (c *CriManager) RemovePodSandbox(ctx context.Context, r *runtime.RemovePodS
if err != nil {
return nil, fmt.Errorf("failed to remove container %q of sandbox %q: %v", container.ID, podSandboxID, err)
}
logrus.Infof("successfully remove container %q of sandbox %q", container.ID, podSandboxID)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe "success to do something" will be better? ^_^

log for stop & remove pod operation

Signed-off-by: YaoZengzeng <yaozengzeng@zju.edu.cn>
@@ -329,6 +329,7 @@ func (c *CriManager) StopPodSandbox(ctx context.Context, r *runtime.StopPodSandb
if err != nil {
return nil, fmt.Errorf("failed to stop container %q of sandbox %q: %v", container.ID, podSandboxID, err)
}
logrus.Infof("success to stop container %q of sandbox %q", container.ID, podSandboxID)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe debug is sufficient.

@@ -394,6 +397,7 @@ func (c *CriManager) RemovePodSandbox(ctx context.Context, r *runtime.RemovePodS
if err != nil {
return nil, fmt.Errorf("failed to remove container %q of sandbox %q: %v", container.ID, podSandboxID, err)
}
logrus.Infof("success remove container %q of sandbox %q", container.ID, podSandboxID)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same issue. Do you think so?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm... I think maybe Infof is more suitable

The operation of stop and remove is not as frequent as list

It's helpful and important for us to know details of every pod related operation 😂

Copy link
Collaborator

Choose a reason for hiding this comment

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

OK, just double check.

@rudyfly
Copy link
Collaborator

rudyfly commented Sep 21, 2018

LGTM, waiting for ci passed.

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

Successfully merging this pull request may close these issues.

5 participants