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

kubelet: fix metric container_start_time_seconds timestamp #120518

Merged

Conversation

saschagrunert
Copy link
Member

@saschagrunert saschagrunert commented Sep 8, 2023

What type of PR is this?

/kind bug

What this PR does / why we need it:

Adapting the tests and reverting #103429

Carry-over from #117881

Which issue(s) this PR fixes:

Fixes #117880

Special notes for your reviewer:

None

Does this PR introduce a user-facing change?

Fixed bug that kubelet resource metric `container_start_time_seconds` had timestamp equal to container start time.

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

None

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. 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 Sep 8, 2023
@saschagrunert
Copy link
Member Author

/test pull-kubernetes-node-crio-e2e

Comment on lines +166 to +168
if t.Unix() <= 0 {
return time.Now()
}
Copy link
Member Author

Choose a reason for hiding this comment

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

@dashpole PTAL

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM

@saschagrunert saschagrunert added the sig/node Categorizes an issue or PR as relevant to SIG Node. label Sep 8, 2023
@k8s-ci-robot k8s-ci-robot added area/kubelet area/test sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Sep 8, 2023
@saschagrunert saschagrunert added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. and removed area/test area/kubelet sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Sep 8, 2023
@k8s-ci-robot k8s-ci-robot removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Sep 8, 2023
Adapting the tests and reverting kubernetes#103429

Carry-over from kubernetes#117881

Signed-off-by: Sascha Grunert <[email protected]>
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 8, 2023
@saschagrunert
Copy link
Member Author

/test pull-kubernetes-node-crio-e2e

@k8s-ci-robot k8s-ci-robot added the sig/testing Categorizes an issue or PR as relevant to SIG Testing. label Sep 8, 2023
@bart0sh bart0sh added this to Triage in SIG Node PR Triage Sep 8, 2023
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Sep 8, 2023
@saschagrunert saschagrunert changed the title kubelet: fix metric container_start_time_seconds's timestamp kubelet: fix metric container_start_time_seconds timestamp Sep 8, 2023
@bart0sh
Copy link
Contributor

bart0sh commented Sep 8, 2023

/triage accepted

@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 Sep 8, 2023
@bart0sh bart0sh moved this from Triage to Needs Reviewer in SIG Node PR Triage Sep 8, 2023
@mengjiao-liu
Copy link
Member

/sig instrumentation

/assign @dashpole

@k8s-ci-robot k8s-ci-robot added the sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. label Sep 11, 2023
@ndixita ndixita moved this from Triage to Archive-it in SIG Node CI/Test Board Sep 13, 2023
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

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 13, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 899352a96bfa6441c80e6fb68b183870a2b1a212

@bart0sh bart0sh moved this from Needs Reviewer to Needs Approver in SIG Node PR Triage Sep 13, 2023
@bart0sh
Copy link
Contributor

bart0sh commented Sep 13, 2023

/assign @mrunalp @dchen1107 @derekwaynecarr

@dims
Copy link
Member

dims commented Oct 15, 2023

/approve
/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dashpole, dims, saschagrunert

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 Oct 15, 2023
@k8s-ci-robot k8s-ci-robot merged commit 378866e into kubernetes:master Oct 15, 2023
16 checks passed
SIG Node PR Triage automation moved this from Needs Approver to Done Oct 15, 2023
@k8s-ci-robot k8s-ci-robot added this to the v1.29 milestone Oct 15, 2023
@saschagrunert saschagrunert deleted the metrics-container-start branch October 16, 2023 09:14
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 area/test 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. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

kubelet resource metric container_start_time_seconds have timestamp equal to container start time
9 participants