-
Notifications
You must be signed in to change notification settings - Fork 39.9k
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
check if Memory is not nil for container stats #77656
Conversation
/priority critical-urgent |
/cc @tallclair |
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
Nice work here :)
I'm curious. do you think its worth adding a unit test ensuring that we don't panic when cstat.Memory
is nil? That'd also give me slightly more confidence that this lack of nil check was the cause of the error this pr claims to fix.
Additionally, for more own understanding, can you share more about why cstat.Memory
would sometimes be nil? Do we want to address the times when cstat.Memory
is nil?
/assign @dchen1107 |
Also, we can talk about this once its merged, but this seems like a good candidate for cherry picking to earlier releases. |
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.
I’ll also raise an issue to increase test coverage for some parts related to cadvisor in the kubelet. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tallclair, yastij The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
@mattjmcnaughton - when getting stats for docker for example (or libcontainer in general) cadvisor talks to a cgroupManager IIRC (e.g. cgroupfs). |
…-upstream-release-1.14 Automated cherry pick of #77656: check if Memory is not nil for container stats
…-upstream-release-1.12 Automated cherry pick of #77656: check if Memory is not nil for container stats
…-upstream-release-1.13 Automated cherry pick of #77656: check if Memory is not nil for container stats
/kind bug
/sig node
What this PR does / why we need it:
Which issue(s) this PR fixes: Fixes #77655
Special notes for your reviewer:
Does this PR introduce a user-facing change?: