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

filter out terminated containers in cadvisor_stats_provider #110950

Merged

Conversation

yangjunmyfm192085
Copy link
Contributor

@yangjunmyfm192085 yangjunmyfm192085 commented Jul 5, 2022

What type of PR is this?

/kind bug

What this PR does / why we need it:

if the container has only one instance, we should still check whether it was terminated(as cpu memory and network(special case) 0), since init-container exits and would not be restarted, it may have only one exited instance

Which issue(s) this PR fixes:

Fixes #103368

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Do not report terminated container metrics

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jul 5, 2022
@k8s-ci-robot k8s-ci-robot requested review from pacoxu and Random-Liu Jul 5, 2022
@k8s-ci-robot k8s-ci-robot added area/kubelet sig/node Categorizes an issue or PR as relevant to SIG Node. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jul 5, 2022
@yangjunmyfm192085 yangjunmyfm192085 force-pushed the fixmetricsjudgement branch 2 times, most recently from 8a9e9fd to 86f0384 Compare Jul 5, 2022
@pacoxu
Copy link
Member

pacoxu commented Jul 5, 2022

/cc @MrHohn @haircommander @249043822
/assign @dashpole

for #108787 and #110616

@yangjunmyfm192085
Copy link
Contributor Author

yangjunmyfm192085 commented Jul 5, 2022

/retest

1 similar comment
@yangjunmyfm192085
Copy link
Contributor Author

yangjunmyfm192085 commented Jul 5, 2022

/retest

@yangjunmyfm192085
Copy link
Contributor Author

yangjunmyfm192085 commented Jul 5, 2022

/test pull-kubernetes-e2e-gce-100-performance

@yangjunmyfm192085
Copy link
Contributor Author

yangjunmyfm192085 commented Jul 5, 2022

/test pull-kubernetes-e2e-kind

@yangjunmyfm192085
Copy link
Contributor Author

yangjunmyfm192085 commented Jul 5, 2022

/retest

@yangjunmyfm192085
Copy link
Contributor Author

yangjunmyfm192085 commented Jul 5, 2022

/test pull-kubernetes-e2e-kind

Copy link
Contributor Author

@yangjunmyfm192085 yangjunmyfm192085 left a comment

/retest

@haircommander
Copy link
Contributor

haircommander commented Jul 5, 2022

this approach makes sense to me. I have one comment, and the test failures seem legit so something else probably needs changing, but overall LGTM

@yangjunmyfm192085 yangjunmyfm192085 force-pushed the fixmetricsjudgement branch 3 times, most recently from ee8b19a to 44801e3 Compare Jul 6, 2022
@pacoxu pacoxu added this to Triage in SIG Node PR Triage Jul 6, 2022
@249043822
Copy link
Member

249043822 commented Jul 7, 2022

/triage accepted
/lgtm

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jul 7, 2022
@249043822 249043822 moved this from Triage to Needs Reviewer in SIG Node PR Triage Jul 7, 2022
@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 7, 2022
@yangjunmyfm192085 yangjunmyfm192085 moved this from Needs Reviewer to Needs Approver in SIG Node PR Triage Jul 7, 2022
@dashpole
Copy link
Contributor

dashpole commented Jul 14, 2022

This looks like it should address the issue that came up.
/approve

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Jul 14, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dashpole, yangjunmyfm192085

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 14, 2022
@k8s-ci-robot k8s-ci-robot merged commit ce583e0 into kubernetes:master Jul 14, 2022
14 checks passed
SIG Node PR Triage automation moved this from Needs Approver to Done Jul 14, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.25 milestone Jul 14, 2022
k8s-ci-robot added a commit that referenced this pull request Oct 17, 2022
…10950-upstream-release-1.24

[1.24] Automated cherry pick of #110950: filter out terminated containers in cadvisor_stats_provider
k8s-ci-robot added a commit that referenced this pull request Oct 18, 2022
…10950-upstream-release-1.23

[1.23] Automated cherry pick of #110950: filter out terminated containers in cadvisor_stats_provider
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubelet cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/node Categorizes an issue or PR as relevant to SIG Node. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Development

Successfully merging this pull request may close these issues.

Kubelet should not report metrics from init containers
6 participants