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
Structured log migration for pkg/kubelet/kuberuntime/kuberuntime_gc.go #97569
Conversation
Welcome @jialaijun! |
Hi @jialaijun. 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 Once the patch is verified, the new status will be reflected by the 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/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jialaijun The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/assign @derekwaynecarr |
@jialaijun can you update the PR description - this needs a release note as it's a user facing logging change. /triage accepted |
@@ -357,17 +357,17 @@ func (cgc *containerGC) evictPodLogsDirectories(allSourcesReady bool) error { | |||
// See https://github.com/kubernetes/kubernetes/issues/52172 | |||
// | |||
// We only remove unhealthy symlink for dead containers | |||
klog.V(5).Infof("Container %q is still running, not removing symlink %q.", containerID, logSymlink) | |||
klog.V(5).InfoS("Container is still running, not removing symlink.", "containerID", containerID, "logSymlink", 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.
i don't think we need the period after symlink here
/priority important-soon |
@@ -357,17 +357,17 @@ func (cgc *containerGC) evictPodLogsDirectories(allSourcesReady bool) error { | |||
// See https://github.com/kubernetes/kubernetes/issues/52172 | |||
// | |||
// We only remove unhealthy symlink for dead containers | |||
klog.V(5).Infof("Container %q is still running, not removing symlink %q.", containerID, logSymlink) | |||
klog.V(5).InfoS("Container is still running, not removing symlink.", "containerID", containerID, "logSymlink", 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(5).InfoS("Container is still running, not removing symlink.", "containerID", containerID, "logSymlink", logSymlink) | |
klog.V(5).InfoS("Container is still running, not removing symlink", "containerID", containerID, "symlink", 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.
should probably be path
rather than symlink
continue | ||
} | ||
} else { | ||
klog.V(4).Infof("unable to obtain container Id: %v", err) | ||
klog.V(4).InfoS("unable to obtain container Id", "err", err) |
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).InfoS("unable to obtain container Id", "err", err) | |
klog.V(4).InfoS("Unable to obtain container Id", "err", err) |
} | ||
err := osInterface.Remove(logSymlink) | ||
if err != nil { | ||
klog.Errorf("Failed to remove container log dead symlink %q: %v", logSymlink, err) | ||
} else { | ||
klog.V(4).Infof("removed symlink %s", logSymlink) | ||
klog.V(4).InfoS("removed symlink", "logSymlink", 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).InfoS("removed symlink", "logSymlink", logSymlink) | |
klog.V(4).InfoS("Removed symlink", "symlink", 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.
I suggest path
rather than symlink
/retitle Structured log migration for pkg/kubelet/kuberuntime/kuberuntime_gc.go |
@jialaijun please take a look at the PR comments and make the requested changes :) |
/close superseded by #100196 |
@ehashman: Closed this PR. In response to this:
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/test-infra repository. |
change log functions to structured equivalent.