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 pkg/kubelet/cm/cpumanage/{topology/togit pology.go, policy_none.go, cpu_assignment.go} to structured logging #100163
Conversation
/ok-to-test |
60170c5
to
69d4639
Compare
/assign @ConnorDoyle |
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.
Very close, thanks!
/triage accepted
@@ -236,8 +236,7 @@ func Discover(machineInfo *cadvisorapi.MachineInfo) (*CPUTopology, error) { | |||
} | |||
} | |||
} else { | |||
klog.Errorf("could not get unique coreID for socket: %d core %d threads: %v", | |||
core.SocketID, core.Id, core.Threads) | |||
klog.InfoS("Could not get unique coreID for socket", "socket", core.SocketID, "core", core.Id, "threads", core.Threads) |
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.InfoS("Could not get unique coreID for socket", "socket", core.SocketID, "core", core.Id, "threads", core.Threads) | |
klog.ErrorS(nil, "Could not get unique coreID for socket", "socket", core.SocketID, "core", core.Id, "threads", core.Threads) |
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.
Update to ErrorS.
@@ -190,7 +190,7 @@ func takeByTopology(topo *topology.CPUTopology, availableCPUs cpuset.CPUSet, num | |||
// on the same sockets as the whole cores we have already taken in this | |||
// allocation. | |||
for _, c := range acc.freeCPUs() { | |||
klog.V(4).Infof("[cpumanager] takeByTopology: claiming CPU [%d]", c) | |||
klog.V(4).InfoS("takeByTopology: claiming CPU", "CPU", c) |
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("takeByTopology: claiming CPU", "CPU", c) | |
klog.V(4).InfoS("takeByTopology: claiming CPU", "cpu", c) |
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.
Use cpu
instead now. Could you review it all again, pls?@ehashman
/lgtm cancel because we accidentally turned an Errorf into an InfoS, should be ErrorS |
…o, cpu_assignment.go} to structured logging
69d4639
to
b247240
Compare
@@ -236,8 +236,7 @@ func Discover(machineInfo *cadvisorapi.MachineInfo) (*CPUTopology, error) { | |||
} | |||
} | |||
} else { | |||
klog.Errorf("could not get unique coreID for socket: %d core %d threads: %v", | |||
core.SocketID, core.Id, core.Threads) | |||
klog.ErrorS(nil, "Could not get unique coreID for socket", "socket", core.SocketID, "core", core.Id, "threads", core.Threads) |
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(nil, "Could not get unique coreID for socket", "socket", core.SocketID, "core", core.Id, "threads", core.Threads) | |
klog.ErrorS(nil, "Could not get unique coreID for socket", "socketID", core.SocketID, "coreID", core.Id, "threads", core.Threads) |
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 this is consistent, we should leave this as is.
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lala123912, 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
What this PR does / why we need it:
Which issue(s) this PR fixes:
Part of #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.:
/sig node instrumentation
/priority important-soon