Skip to content

Commit 6240feb

Browse files
committed
node:memory-mgr: Add logs on the happy path
We have reasonable amount of logs when things go wrong. While debugging, it can be useful to have logs to indicate that things have gone as expected especially when it comes to important events like successful startup of memory manager and successful allocation of resources. Signed-off-by: Swati Sehgal <[email protected]>
1 parent ee7f261 commit 6240feb

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

pkg/kubelet/cm/memorymanager/memory_manager.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ func (m *manager) Start(activePods ActivePodsFunc, sourcesReady config.SourcesRe
205205

206206
m.allocatableMemory = m.policy.GetAllocatableMemory(m.state)
207207

208+
klog.V(4).InfoS("memorymanager started", "policy", m.policy.Name())
208209
return nil
209210
}
210211

pkg/kubelet/cm/memorymanager/policy_static.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ func (p *staticPolicy) Allocate(s state.State, pod *v1.Pod, container *v1.Contai
196196
// TODO: we should refactor our state structs to reflect the amount of the re-used memory
197197
p.updateInitContainersMemoryBlocks(s, pod, container, containerBlocks)
198198

199+
klog.V(4).InfoS("Allocated exclusive memory", "pod", klog.KObj(pod), "containerName", container.Name)
199200
return nil
200201
}
201202

0 commit comments

Comments
 (0)