Skip to content

Commit 2dc5ddd

Browse files
committed
node: cpumgr: logs: bump log verbosiness for expected skips
In the reconciliation flow, there are expected skipping conditions (e.g. for active logs). To reduce noise in the logs, bump up the verbosiness of these messages, using odd levels. Signed-off-by: Francesco Romani <[email protected]>
1 parent 5a0bc10 commit 2dc5ddd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pkg/kubelet/cm/cpumanager/cpu_manager.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ func (m *manager) removeStaleState() {
381381
for podUID := range assignments {
382382
for containerName := range assignments[podUID] {
383383
if _, ok := activeContainers[podUID][containerName]; ok {
384-
klog.V(4).InfoS("RemoveStaleState: container still active", "podUID", podUID, "containerName", containerName)
384+
klog.V(5).InfoS("RemoveStaleState: container still active", "podUID", podUID, "containerName", containerName)
385385
continue
386386
}
387387
klog.V(2).InfoS("RemoveStaleState: removing container", "podUID", podUID, "containerName", containerName)
@@ -394,7 +394,7 @@ func (m *manager) removeStaleState() {
394394

395395
m.containerMap.Visit(func(podUID, containerName, containerID string) {
396396
if _, ok := activeContainers[podUID][containerName]; ok {
397-
klog.V(4).InfoS("RemoveStaleState: containerMap: container still active", "podUID", podUID, "containerName", containerName)
397+
klog.V(5).InfoS("RemoveStaleState: containerMap: container still active", "podUID", podUID, "containerName", containerName)
398398
return
399399
}
400400
klog.V(2).InfoS("RemoveStaleState: containerMap: removing container", "podUID", podUID, "containerName", containerName)
@@ -414,7 +414,7 @@ func (m *manager) reconcileState() (success []reconciledContainer, failure []rec
414414
for _, pod := range m.activePods() {
415415
pstatus, ok := m.podStatusProvider.GetPodStatus(pod.UID)
416416
if !ok {
417-
klog.V(4).InfoS("ReconcileState: skipping pod; status not found", "pod", klog.KObj(pod))
417+
klog.V(5).InfoS("ReconcileState: skipping pod; status not found", "pod", klog.KObj(pod))
418418
failure = append(failure, reconciledContainer{pod.Name, "", ""})
419419
continue
420420
}
@@ -424,14 +424,14 @@ func (m *manager) reconcileState() (success []reconciledContainer, failure []rec
424424
for _, container := range allContainers {
425425
containerID, err := findContainerIDByName(&pstatus, container.Name)
426426
if err != nil {
427-
klog.V(4).InfoS("ReconcileState: skipping container; ID not found in pod status", "pod", klog.KObj(pod), "containerName", container.Name, "err", err)
427+
klog.V(5).InfoS("ReconcileState: skipping container; ID not found in pod status", "pod", klog.KObj(pod), "containerName", container.Name, "err", err)
428428
failure = append(failure, reconciledContainer{pod.Name, container.Name, ""})
429429
continue
430430
}
431431

432432
cstatus, err := findContainerStatusByName(&pstatus, container.Name)
433433
if err != nil {
434-
klog.V(4).InfoS("ReconcileState: skipping container; container status not found in pod status", "pod", klog.KObj(pod), "containerName", container.Name, "err", err)
434+
klog.V(5).InfoS("ReconcileState: skipping container; container status not found in pod status", "pod", klog.KObj(pod), "containerName", container.Name, "err", err)
435435
failure = append(failure, reconciledContainer{pod.Name, container.Name, ""})
436436
continue
437437
}
@@ -474,7 +474,7 @@ func (m *manager) reconcileState() (success []reconciledContainer, failure []rec
474474

475475
lcset := m.lastUpdateState.GetCPUSetOrDefault(string(pod.UID), container.Name)
476476
if !cset.Equals(lcset) {
477-
klog.V(4).InfoS("ReconcileState: updating container", "pod", klog.KObj(pod), "containerName", container.Name, "containerID", containerID, "cpuSet", cset)
477+
klog.V(5).InfoS("ReconcileState: updating container", "pod", klog.KObj(pod), "containerName", container.Name, "containerID", containerID, "cpuSet", cset)
478478
err = m.updateContainerCPUSet(ctx, containerID, cset)
479479
if err != nil {
480480
klog.ErrorS(err, "ReconcileState: failed to update container", "pod", klog.KObj(pod), "containerName", container.Name, "containerID", containerID, "cpuSet", cset)

0 commit comments

Comments
 (0)