Skip to content

Commit ee7f261

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

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pkg/kubelet/cm/memorymanager/memory_manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ func (m *manager) RemoveContainer(containerID string) error {
280280
// if error appears it means container entry already does not exist under the container map
281281
podUID, containerName, err := m.containerMap.GetContainerRef(containerID)
282282
if err != nil {
283-
klog.InfoS("Failed to get container from container map", "containerID", containerID, "err", err)
283+
klog.ErrorS(err, "Failed to get container from container map", "containerID", containerID)
284284
return nil
285285
}
286286

pkg/kubelet/cm/memorymanager/state/state_checkpoint.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ func (sc *stateCheckpoint) SetMachineState(memoryMap NUMANodeMap) {
131131
sc.cache.SetMachineState(memoryMap)
132132
err := sc.storeState()
133133
if err != nil {
134-
klog.InfoS("Store state to checkpoint error", "err", err)
134+
klog.ErrorS(err, "Store state to checkpoint error")
135135
}
136136
}
137137

@@ -143,7 +143,7 @@ func (sc *stateCheckpoint) SetMemoryBlocks(podUID string, containerName string,
143143
sc.cache.SetMemoryBlocks(podUID, containerName, blocks)
144144
err := sc.storeState()
145145
if err != nil {
146-
klog.InfoS("Store state to checkpoint error", "err", err)
146+
klog.ErrorS(err, "Store state to checkpoint error", "podUID", podUID, "containerName", containerName)
147147
}
148148
}
149149

@@ -155,7 +155,7 @@ func (sc *stateCheckpoint) SetMemoryAssignments(assignments ContainerMemoryAssig
155155
sc.cache.SetMemoryAssignments(assignments)
156156
err := sc.storeState()
157157
if err != nil {
158-
klog.InfoS("Store state to checkpoint error", "err", err)
158+
klog.ErrorS(err, "Store state to checkpoint error")
159159
}
160160
}
161161

@@ -167,7 +167,7 @@ func (sc *stateCheckpoint) Delete(podUID string, containerName string) {
167167
sc.cache.Delete(podUID, containerName)
168168
err := sc.storeState()
169169
if err != nil {
170-
klog.InfoS("Store state to checkpoint error", "err", err)
170+
klog.ErrorS(err, "Store state to checkpoint error", "podUID", podUID, "containerName", containerName)
171171
}
172172
}
173173

@@ -179,6 +179,6 @@ func (sc *stateCheckpoint) ClearState() {
179179
sc.cache.ClearState()
180180
err := sc.storeState()
181181
if err != nil {
182-
klog.InfoS("Store state to checkpoint error", "err", err)
182+
klog.ErrorS(err, "Store state to checkpoint error")
183183
}
184184
}

0 commit comments

Comments
 (0)