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
Conversation
/triage accepted |
8a54dd6
to
18c074e
Compare
There was a problem hiding this 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
/test pull-kubernetes-e2e-kind |
There was a problem hiding this 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
klog.V(4).Infof("Removed symlink", "path", logSymlink) | |
klog.V(4).InfoS("Removed symlink", "path", logSymlink) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, will rebase :)
18c074e
to
ee0bcac
Compare
/lgtm |
Looks like: #95600 /test pull-kubernetes-e2e-kind |
seems like maybe: #99979 /retest |
/approve |
[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 |
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?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: