node: memory-mgr: Update klog.Infof(..., err) to klog.ErrorS(err,...)

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
This commit is contained in:
Swati Sehgal 2025-01-16 12:45:01 +00:00
parent 07d83acce5
commit ee7f2616c6
2 changed files with 6 additions and 6 deletions

View File

@ -280,7 +280,7 @@ func (m *manager) RemoveContainer(containerID string) error {
// if error appears it means container entry already does not exist under the container map // if error appears it means container entry already does not exist under the container map
podUID, containerName, err := m.containerMap.GetContainerRef(containerID) podUID, containerName, err := m.containerMap.GetContainerRef(containerID)
if err != nil { if err != nil {
klog.InfoS("Failed to get container from container map", "containerID", containerID, "err", err) klog.ErrorS(err, "Failed to get container from container map", "containerID", containerID)
return nil return nil
} }

View File

@ -131,7 +131,7 @@ func (sc *stateCheckpoint) SetMachineState(memoryMap NUMANodeMap) {
sc.cache.SetMachineState(memoryMap) sc.cache.SetMachineState(memoryMap)
err := sc.storeState() err := sc.storeState()
if err != nil { if err != nil {
klog.InfoS("Store state to checkpoint error", "err", err) klog.ErrorS(err, "Store state to checkpoint error")
} }
} }
@ -143,7 +143,7 @@ func (sc *stateCheckpoint) SetMemoryBlocks(podUID string, containerName string,
sc.cache.SetMemoryBlocks(podUID, containerName, blocks) sc.cache.SetMemoryBlocks(podUID, containerName, blocks)
err := sc.storeState() err := sc.storeState()
if err != nil { if err != nil {
klog.InfoS("Store state to checkpoint error", "err", err) klog.ErrorS(err, "Store state to checkpoint error", "podUID", podUID, "containerName", containerName)
} }
} }
@ -155,7 +155,7 @@ func (sc *stateCheckpoint) SetMemoryAssignments(assignments ContainerMemoryAssig
sc.cache.SetMemoryAssignments(assignments) sc.cache.SetMemoryAssignments(assignments)
err := sc.storeState() err := sc.storeState()
if err != nil { if err != nil {
klog.InfoS("Store state to checkpoint error", "err", err) klog.ErrorS(err, "Store state to checkpoint error")
} }
} }
@ -167,7 +167,7 @@ func (sc *stateCheckpoint) Delete(podUID string, containerName string) {
sc.cache.Delete(podUID, containerName) sc.cache.Delete(podUID, containerName)
err := sc.storeState() err := sc.storeState()
if err != nil { if err != nil {
klog.InfoS("Store state to checkpoint error", "err", err) klog.ErrorS(err, "Store state to checkpoint error", "podUID", podUID, "containerName", containerName)
} }
} }
@ -179,6 +179,6 @@ func (sc *stateCheckpoint) ClearState() {
sc.cache.ClearState() sc.cache.ClearState()
err := sc.storeState() err := sc.storeState()
if err != nil { if err != nil {
klog.InfoS("Store state to checkpoint error", "err", err) klog.ErrorS(err, "Store state to checkpoint error")
} }
} }