-
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: container log path map not initialized for existing businesses #2559
bugfix: container log path map not initialized for existing businesses #2559
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2559 +/- ##
=========================================
+ Coverage 69.09% 69.2% +0.11%
=========================================
Files 278 278
Lines 18582 18564 -18
=========================================
+ Hits 12839 12847 +8
+ Misses 4270 4256 -14
+ Partials 1473 1461 -12
|
98f739e
to
c7ef7cc
Compare
cri/v1alpha2/cri.go
Outdated
logPath, ok := sandboxMeta.ContainerLogMap[containerID] | ||
if !ok { | ||
logPath, ok := container.Config.Labels[containerLogPathLabelKey] | ||
if !ok || logPath == "" { |
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.
just checkout logPath
is empty here. No matter ok
is true or false. right?
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.
Has been updated.
ffe4b17
to
3c2825a
Compare
Signed-off-by: Starnop <[email protected]>
3c2825a
to
a93b5bd
Compare
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.
LGTM
Signed-off-by: Starnop [email protected]
Ⅰ. Describe what this PR did
For existing businesses, ContainerLogMap has not been initialized which will cause panic, so fix it.
Ⅱ. Does this pull request fix one issue?
None.
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
None.
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews