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

Fix missing cadvisor machine metrics #97006

Merged

Conversation

lingsamuel
Copy link
Contributor

@lingsamuel lingsamuel commented Dec 2, 2020

Signed-off-by: Ling Samuel lingsamuelgrace@gmail.com

What type of PR is this?

/kind bug

What this PR does / why we need it:

Fix missing cadvisor machine metrics.

From #95210 and comment since the author has not been active recently.

Should be backported to 1.19.

Which issue(s) this PR fixes:

Fixes #95204

Special notes for your reviewer:

  1. Although the missing machine metrics data can now be provided normally, its format has been changed
  2. According to this comment, the timestamp is set to zero.

Does this PR introduce a user-facing change?:

Fixes a regression in 1.19+ missing cadvisor machine 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/XS Denotes a PR that changes 0-9 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. labels Dec 2, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @lingsamuel. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Dec 2, 2020
@lingsamuel
Copy link
Contributor Author

/sig node

@k8s-ci-robot k8s-ci-robot added sig/node Categorizes an issue or PR as relevant to SIG Node. area/kubelet and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Dec 2, 2020
@lingsamuel
Copy link
Contributor Author

/cc @dashpole

@lingsamuel lingsamuel changed the title Fix cadvisor machine metrics Fix missing cadvisor machine metrics Dec 2, 2020
@lingsamuel
Copy link
Contributor Author

/cc @shubheksha

@oomichi
Copy link
Member

oomichi commented Dec 2, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 2, 2020
Copy link
Contributor

@dashpole dashpole left a comment

Choose a reason for hiding this comment

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

lgtm

@@ -551,6 +551,7 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration,
if err != nil {
return nil, err
}
machineInfo.Timestamp = time.Time{}
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to refresh my memory, does this cause timestamps not to be set for metrics, or does it set the timestamp at 0?

Copy link

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

makes sense. A comment would be helpful for future readers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added. Leaving this unresolved so others can find this.

@dashpole
Copy link
Contributor

dashpole commented Dec 3, 2020

/approve

Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
@lingsamuel
Copy link
Contributor Author

/retest

@dashpole
Copy link
Contributor

dashpole commented Dec 8, 2020

/lgtm
/priority critical-urgent
/kind bug

This is a regression from a previous version, so labeling it appropriately.

@lingsamuel
Copy link
Contributor Author

Can someone approve this?

@dashpole
Copy link
Contributor

/assign @sjenning

@ehashman
Copy link
Member

ping @sjenning @mrunalp @derekwaynecarr -- serious metric regression that needs backporting ASAP

@mrunalp
Copy link
Contributor

mrunalp commented Jan 1, 2021

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dashpole, lingsamuel, mrunalp

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 Jan 1, 2021
@k8s-ci-robot k8s-ci-robot merged commit 7511523 into kubernetes:master Jan 1, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.21 milestone Jan 1, 2021
k8s-ci-robot added a commit that referenced this pull request Jan 5, 2021
…06-upstream-release-1.20

Automated cherry pick of #97006: Fix cadvisor machine metrics
k8s-ci-robot added a commit that referenced this pull request Jan 5, 2021
…06-upstream-release-1.19

Automated cherry pick of #97006: Fix cadvisor machine metrics
@abhi1git
Copy link

abhi1git commented May 18, 2021

I am currently using Kubernetes v1.19.1 and facing this missing machine_* metrics issue. Can I please get to know to which version I need to in which this issue is fixed.
TIA.
@dashpole

@ehashman
Copy link
Member

ehashman commented May 18, 2021

Looks like this landed in 1.19.7: https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.19.md#changelog-since-v1196

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 "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. 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/XS Denotes a PR that changes 0-9 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing cadvisor machine metrics (v1.19)
10 participants