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

Migrate PLEG to contextual logging #126843

Merged

Conversation

oxxenix
Copy link
Contributor

@oxxenix oxxenix commented Aug 21, 2024

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

migrate pkg/kubelet/pleg to contextual logging

Does this PR introduce a user-facing change?

NONE

/wg structured-logging
/area logging
/priority important-longterm
/cc @kubernetes/wg-structured-logging-reviews

@k8s-ci-robot
Copy link
Contributor

@oxxenix: GitHub didn't allow me to request PR reviews from the following users: kubernetes/wg-structured-logging-reviews.

Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

migrate pkg/kubelet/pleg to contextual logging

Does this PR introduce a user-facing change?

NONE

/wg structured-logging
/area logging
/priority important-longterm
/cc @kubernetes/wg-structured-logging-reviews

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. wg/structured-logging Categorizes an issue or PR as relevant to WG Structured Logging. area/logging priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 21, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @oxxenix. 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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added area/kubelet sig/node Categorizes an issue or PR as relevant to SIG Node. labels Aug 21, 2024
@oxxenix oxxenix force-pushed the migrate-pleg-to-contextual-logging branch from 96704e8 to 9daebea Compare August 21, 2024 09:23
@xuzhenglun
Copy link
Contributor

/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 Aug 21, 2024
@bart0sh
Copy link
Contributor

bart0sh commented Aug 21, 2024

/triage accepted
/cc @pohly

@k8s-ci-robot k8s-ci-robot requested a review from pohly August 21, 2024 09:53
@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 Aug 21, 2024
@oxxenix oxxenix changed the title kubelet: migrate pleg to contextual logging [WIP] kubelet: migrate pleg to contextual logging Aug 21, 2024
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 21, 2024
@oxxenix oxxenix force-pushed the migrate-pleg-to-contextual-logging branch from 9daebea to 9e6a04b Compare August 21, 2024 11:40
@oxxenix oxxenix changed the title [WIP] kubelet: migrate pleg to contextual logging kubelet: migrate pleg to contextual logging Aug 21, 2024
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 21, 2024
@oxxenix oxxenix changed the title kubelet: migrate pleg to contextual logging [WIP] kubelet: migrate pleg to contextual logging Aug 21, 2024
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 21, 2024
@harche
Copy link
Contributor

harche commented Sep 13, 2024

/test pull-kubernetes-node-crio-cgrpv1-evented-pleg-e2e

@harche
Copy link
Contributor

harche commented Sep 13, 2024

/test pull-kubernetes-node-crio-cgrpv2-e2e

@harche
Copy link
Contributor

harche commented Sep 13, 2024

/test pull-kubernetes-node-crio-e2e

@oxxenix
Copy link
Contributor Author

oxxenix commented Sep 13, 2024

/retest

@harche
Copy link
Contributor

harche commented Sep 13, 2024

@kannon92 @saschagrunert @haircommander not sure why the cgroups v2 crio job, pull-kubernetes-node-crio-cgrpv2-e2e, is failing for this PR.

@bart0sh
Copy link
Contributor

bart0sh commented Sep 13, 2024

@harche I've triggered it for my test PR #120459. Let's see if it fails or not.

@bart0sh
Copy link
Contributor

bart0sh commented Sep 13, 2024

@harche

@oxxenix @bart0sh it would be interesting to know if changing to contextual logging has any impact on the performance or resource utilization.

Any suggestions how to do it?

@bart0sh
Copy link
Contributor

bart0sh commented Sep 13, 2024

@harshe crio-cgrpv2-e2e failed the same way as some of the runs triggered by this PR:

So, it seems unrelated to the changes made by this PR.

@bart0sh
Copy link
Contributor

bart0sh commented Sep 13, 2024

/skip

@saschagrunert
Copy link
Member

I agree the failures look unrelated, I'm checking if we have to fix anything for the cgroupv2 test in #127381

@bart0sh
Copy link
Contributor

bart0sh commented Sep 16, 2024

/lgtm

@pohly can you approve it? It looks like it still requires approval from hack/ owners.

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

LGTM label has been added.

Git tree hash: 93f3076eed85d264ffa5488fe4a28f837dad0499

@pohly
Copy link
Contributor

pohly commented Sep 16, 2024

/approve

@bart0sh
Copy link
Contributor

bart0sh commented Sep 16, 2024

@mrunalp @SergeyKanzhelev please, approve. You're our last hope :)

@SergeyKanzhelev
Copy link
Member

migrate pkg/kubelet/pleg to contextual logging

Is there a good documentation on this? Since this code now will have a different pattern than other code - we need to make sure we can point to the migration docs explaining how things work and which type of logging to use when.

Also, what would be an effect if old-style logs are used alongside the contextual logging? I am trying to see if this code calls into anything that will use old-style logging. Is it just the context will be missing?

@bart0sh
Copy link
Contributor

bart0sh commented Sep 16, 2024

Sure, there is a documentation on this:

It's ongoing process and SIG-Node is already participating in it. All Kubelet code has been moved to structured logging and move to contextual logging is a logical continuation of this process.

old and new style components should co-exist and don't influence each other, at least to my knowledge.

@bart0sh
Copy link
Contributor

bart0sh commented Sep 16, 2024

Is it just the context will be missing?

The code that doesn't use contextual logging will keep using structured logging I believe. Logging prefixes will be different in some cases, but only for the component that switched to contextual logging.

FWIW a lot of k/k code already moved to contextual logging, for example DRA Kubelet code and it works just fine.

@SergeyKanzhelev
Copy link
Member

/release-note-none

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Sep 16, 2024
Copy link
Member

@SergeyKanzhelev SergeyKanzhelev left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: oxxenix, pohly, saschagrunert, SergeyKanzhelev

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 Sep 16, 2024
@k8s-ci-robot
Copy link
Contributor

@oxxenix: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-node-crio-cgrpv2-e2e 2474369 link false /test pull-kubernetes-node-crio-cgrpv2-e2e
pull-kubernetes-node-crio-cgrpv1-evented-pleg-e2e 2474369 link false /test pull-kubernetes-node-crio-cgrpv1-evented-pleg-e2e
pull-kubernetes-node-e2e-containerd 2474369 link unknown /test pull-kubernetes-node-e2e-containerd

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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-sigs/prow repository. I understand the commands that are listed here.

@bart0sh
Copy link
Contributor

bart0sh commented Sep 16, 2024

/retest

@k8s-ci-robot k8s-ci-robot merged commit 529b019 into kubernetes:master Sep 16, 2024
16 of 17 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.32 milestone Sep 16, 2024
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/logging cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. 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/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. release-note-none Denotes a PR that doesn't merit a release note. sig/node Categorizes an issue or PR as relevant to SIG Node. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on. wg/structured-logging Categorizes an issue or PR as relevant to WG Structured Logging.
Projects
Development

Successfully merging this pull request may close these issues.