mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 23:15:14 +00:00
node: cpu-mgr: Update klog.Infof(..., err) to klog.ErrorS(err,...)
We are trying to ensure consistency across resource managers when it comes to logging. While working on logging improvements for memory manager, it was identified that some parts of code base is still using klog.InfoS(..., err) instead of klog.ErrorS(err,...). This change is addressing this in CPU Manager. Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
This commit is contained in:
parent
2d0a4f7556
commit
110868691b
@ -201,7 +201,7 @@ func (sc *stateCheckpoint) SetCPUSet(podUID string, containerName string, cset c
|
||||
sc.cache.SetCPUSet(podUID, containerName, cset)
|
||||
err := sc.storeState()
|
||||
if err != nil {
|
||||
klog.InfoS("Store state to checkpoint error", "err", err)
|
||||
klog.ErrorS(err, "Store state to checkpoint error", "podUID", podUID, "containerName", containerName)
|
||||
}
|
||||
}
|
||||
|
||||
@ -212,7 +212,7 @@ func (sc *stateCheckpoint) SetDefaultCPUSet(cset cpuset.CPUSet) {
|
||||
sc.cache.SetDefaultCPUSet(cset)
|
||||
err := sc.storeState()
|
||||
if err != nil {
|
||||
klog.InfoS("Store state to checkpoint error", "err", err)
|
||||
klog.ErrorS(err, "Store state to checkpoint error")
|
||||
}
|
||||
}
|
||||
|
||||
@ -223,7 +223,7 @@ func (sc *stateCheckpoint) SetCPUAssignments(a ContainerCPUAssignments) {
|
||||
sc.cache.SetCPUAssignments(a)
|
||||
err := sc.storeState()
|
||||
if err != nil {
|
||||
klog.InfoS("Store state to checkpoint error", "err", err)
|
||||
klog.ErrorS(err, "Store state to checkpoint error")
|
||||
}
|
||||
}
|
||||
|
||||
@ -234,7 +234,7 @@ func (sc *stateCheckpoint) Delete(podUID string, containerName string) {
|
||||
sc.cache.Delete(podUID, containerName)
|
||||
err := sc.storeState()
|
||||
if err != nil {
|
||||
klog.InfoS("Store state to checkpoint error", "err", err)
|
||||
klog.ErrorS(err, "Store state to checkpoint error", "podUID", podUID, "containerName", containerName)
|
||||
}
|
||||
}
|
||||
|
||||
@ -245,6 +245,6 @@ func (sc *stateCheckpoint) ClearState() {
|
||||
sc.cache.ClearState()
|
||||
err := sc.storeState()
|
||||
if err != nil {
|
||||
klog.InfoS("Store state to checkpoint error", "err", err)
|
||||
klog.ErrorS(err, "Store state to checkpoint error")
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user