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 kind/cleanup size/M 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 priority/important-soon cncf-cla: yes needs-triage labels Mar 12, 2021
@ehashman
Copy link
Member Author

@ehashman ehashman commented Mar 12, 2021

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted and removed needs-triage 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

full update to structured logging for these files 👍

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm 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

@kikisdeliveryservice kikisdeliveryservice commented Mar 13, 2021

/test pull-kubernetes-e2e-kind

Copy link
Member

@navidshaikh navidshaikh left a comment

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

@navidshaikh navidshaikh Mar 15, 2021

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

@navidshaikh navidshaikh Mar 15, 2021

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

@ehashman ehashman Mar 15, 2021

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

@adisky adisky Mar 15, 2021

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

@ehashman ehashman Mar 15, 2021

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 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

@ehashman ehashman commented Mar 15, 2021

@kikisdeliveryservice PTAL

@kikisdeliveryservice
Copy link
Member

@kikisdeliveryservice kikisdeliveryservice commented Mar 15, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm 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

@kikisdeliveryservice kikisdeliveryservice commented Mar 15, 2021

Looks like: #95600

/test pull-kubernetes-e2e-kind

@kikisdeliveryservice
Copy link
Member

@kikisdeliveryservice kikisdeliveryservice commented Mar 15, 2021

seems like maybe: #99979

/retest

@mrunalp
Copy link
Contributor

@mrunalp 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

@k8s-ci-robot k8s-ci-robot commented Mar 16, 2021

[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 label Mar 16, 2021
@k8s-ci-robot k8s-ci-robot merged commit e082d84 into kubernetes:master Mar 16, 2021
14 checks passed
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 area/kubelet cncf-cla: yes kind/cleanup lgtm priority/important-soon release-note sig/instrumentation sig/node size/M triage/accepted
Development

Successfully merging this pull request may close these issues.

None yet

6 participants