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 remaining logs to structured logging #100196

Merged
merged 3 commits into from Mar 16, 2021

Conversation

ehashman
Copy link
Member

@ehashman ehashman commented Mar 12, 2021

What type of PR is this?

/kind cleanup

/sig node
/sig instrumentation
/priority important-soon
/milestone v1.21

What this PR does / why we need it:

Migrates files to structured logging in unresponsive PRs #97569, #97520, #98632.

Which issue(s) this PR fixes:

Related: #98976

Special notes for your reviewer:

Does this PR introduce a user-facing change?

kubelet: completed support for structured logging

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

[KEP]: https://github.com/kubernetes/enhancements/issues/1602

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. sig/node Categorizes an issue or PR as relevant to SIG Node. labels Mar 12, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.21 milestone Mar 12, 2021
@k8s-ci-robot k8s-ci-robot added sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. 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. labels Mar 12, 2021
@ehashman
Copy link
Member Author

/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 Mar 12, 2021
@ehashman ehashman added this to Needs Reviewer in SIG Node PR Triage Mar 12, 2021
Copy link
Member

@kikisdeliveryservice kikisdeliveryservice left a comment

Choose a reason for hiding this comment

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

full update to structured logging for these files 👍

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 13, 2021
@kikisdeliveryservice kikisdeliveryservice moved this from Needs Reviewer to Needs Approver in SIG Node PR Triage Mar 13, 2021
@kikisdeliveryservice kikisdeliveryservice moved this from Needs Reviewer to Needs Approver in Structured Logging Migration for Kubelet, 1.21 Mar 13, 2021
@kikisdeliveryservice
Copy link
Member

/test pull-kubernetes-e2e-kind

Copy link
Member

@navidshaikh navidshaikh left a comment

Choose a reason for hiding this comment

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

lgtm

@@ -342,7 +342,7 @@ func (cgc *containerGC) evictPodLogsDirectories(allSourcesReady bool) error {
}
err := osInterface.RemoveAll(filepath.Join(podLogsRootDirectory, name))
if err != nil {
klog.Errorf("Failed to remove pod logs directory %q: %v", name, err)
klog.ErrorS(err, "Failed to remove pod logs directory", "path", name)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
klog.ErrorS(err, "Failed to remove pod logs directory", "path", name)
klog.ErrorS(err, "Failed to remove pod logs directory", "path", filepath.Join(podLogsRootDirectory, name))

Copy link
Member

Choose a reason for hiding this comment

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

not required to change given the scope of this PR, but just a suggestion to log abs path

Copy link
Member Author

Choose a reason for hiding this comment

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

It's possible the err is due to that call failing? So I don't know that we should do that, but we could add a keypair with the root directory in the future.

} else {
klog.V(4).Infof("removed symlink %s", logSymlink)
klog.V(4).Infof("Removed symlink", "path", logSymlink)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
klog.V(4).Infof("Removed symlink", "path", logSymlink)
klog.V(4).InfoS("Removed symlink", "path", logSymlink)

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops, will rebase :)

@kikisdeliveryservice kikisdeliveryservice removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 15, 2021
@kikisdeliveryservice kikisdeliveryservice moved this from Needs Approver to Waiting on Author in SIG Node PR Triage Mar 15, 2021
@kikisdeliveryservice kikisdeliveryservice moved this from Needs Approver to Waiting on Author in Structured Logging Migration for Kubelet, 1.21 Mar 15, 2021
@ehashman ehashman moved this from Waiting on Author to Needs Reviewer in SIG Node PR Triage Mar 15, 2021
@ehashman ehashman moved this from Waiting on Author to Needs Reviewer in Structured Logging Migration for Kubelet, 1.21 Mar 15, 2021
@ehashman
Copy link
Member Author

@kikisdeliveryservice PTAL

@kikisdeliveryservice
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 15, 2021
@kikisdeliveryservice kikisdeliveryservice moved this from Needs Reviewer to Needs Approver in SIG Node PR Triage Mar 15, 2021
@kikisdeliveryservice kikisdeliveryservice moved this from Needs Reviewer to Needs Approver in Structured Logging Migration for Kubelet, 1.21 Mar 15, 2021
@kikisdeliveryservice
Copy link
Member

Looks like: #95600

/test pull-kubernetes-e2e-kind

@kikisdeliveryservice
Copy link
Member

seems like maybe: #99979

/retest

@mrunalp
Copy link
Contributor

mrunalp commented Mar 16, 2021

/approve

@mrunalp mrunalp moved this from Needs Approver to Done in SIG Node PR Triage Mar 16, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ehashman, 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 Mar 16, 2021
@k8s-ci-robot k8s-ci-robot merged commit e082d84 into kubernetes:master Mar 16, 2021
Structured Logging Migration for Kubelet, 1.21 automation moved this from Needs Approver to Done Mar 16, 2021
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/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. 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. 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.
Development

Successfully merging this pull request may close these issues.

None yet

6 participants