Skip to content

Commit c56426b

Browse files
committed
node: device-mgr: Update klog.Infof(..., err) to klog.ErrorS(err,...)
Signed-off-by: Swati Sehgal <[email protected]>
1 parent f8596d6 commit c56426b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/kubelet/cm/devicemanager/manager.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ func (m *ManagerImpl) Start(activePods ActivePodsFunc, sourcesReady config.Sourc
351351
// Loads in allocatedDevices information from disk.
352352
err := m.readCheckpoint()
353353
if err != nil {
354-
klog.InfoS("Continue after failing to read checkpoint file. Device allocation info may NOT be up-to-date", "err", err)
354+
klog.ErrorS(err, "Continue after failing to read checkpoint file. Device allocation info may NOT be up-to-date")
355355
}
356356

357357
return m.server.Start()
@@ -503,7 +503,7 @@ func (m *ManagerImpl) writeCheckpoint() error {
503503
err := m.checkpointManager.CreateCheckpoint(kubeletDeviceManagerCheckpoint, data)
504504
if err != nil {
505505
err2 := fmt.Errorf("failed to write checkpoint file %q: %v", kubeletDeviceManagerCheckpoint, err)
506-
klog.InfoS("Failed to write checkpoint file", "err", err)
506+
klog.ErrorS(err, "Failed to write checkpoint file")
507507
return err2
508508
}
509509
return nil
@@ -516,7 +516,7 @@ func (m *ManagerImpl) readCheckpoint() error {
516516
if err != nil {
517517
if err == errors.ErrCheckpointNotFound {
518518
// no point in trying anything else
519-
klog.InfoS("Failed to read data from checkpoint", "checkpoint", kubeletDeviceManagerCheckpoint, "err", err)
519+
klog.ErrorS(err, "Failed to read data from checkpoint", "checkpoint", kubeletDeviceManagerCheckpoint)
520520
return nil
521521
}
522522
return err
@@ -1167,7 +1167,7 @@ func (m *ManagerImpl) ShouldResetExtendedResourceCapacity() bool {
11671167
func (m *ManagerImpl) isContainerAlreadyRunning(podUID, cntName string) bool {
11681168
cntID, err := m.containerMap.GetContainerID(podUID, cntName)
11691169
if err != nil {
1170-
klog.V(4).InfoS("container not found in the initial map, assumed NOT running", "podUID", podUID, "containerName", cntName, "err", err)
1170+
klog.ErrorS(err, "container not found in the initial map, assumed NOT running", "podUID", podUID, "containerName", cntName)
11711171
return false
11721172
}
11731173

0 commit comments

Comments
 (0)