-
Notifications
You must be signed in to change notification settings - Fork 950
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
Conversation
Codecov Report
@@ 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
|
1bf14f0
to
fc776f3
Compare
fc776f3
to
667fdd4
Compare
cri/v1alpha1/cri.go
Outdated
@@ -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) |
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.
Maybe "success to do something" will be better? ^_^
log for stop & remove pod operation Signed-off-by: YaoZengzeng <yaozengzeng@zju.edu.cn>
667fdd4
to
7e18e53
Compare
@@ -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) |
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.
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) |
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.
Same issue. Do you think so?
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.
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 😂
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.
OK, just double check.
LGTM, waiting for ci passed. |
Ⅰ. Describe what this PR did
complete the missing json tag for
StreamServerReusePort
add some useful logs for stop & remove pod which may have multiple containers
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