Skip to content

Commit 01a546f

Browse files
committed
node: cpu-mgr: Add logs on the happy path
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 CPU manager and successful allocation of resources. Signed-off-by: Swati Sehgal <[email protected]>
1 parent 1108686 commit 01a546f

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

pkg/kubelet/cm/cpumanager/cpu_manager.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ func (m *manager) Start(activePods ActivePodsFunc, sourcesReady config.SourcesRe
239239
return err
240240
}
241241

242+
klog.V(4).InfoS("CPU manager started", "policy", m.policy.Name())
243+
242244
m.allocatableCPUs = m.policy.GetAllocatableCPUs(m.state)
243245

244246
if m.policy.Name() == string(PolicyNone) {

pkg/kubelet/cm/cpumanager/policy_static.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,7 @@ func (p *staticPolicy) Allocate(s state.State, pod *v1.Pod, container *v1.Contai
388388
p.updateCPUsToReuse(pod, container, cpuset)
389389
p.updateMetricsOnAllocate(cpuset)
390390

391+
klog.V(4).InfoS("Allocated exclusive CPUs", "pod", klog.KObj(pod), "containerName", container.Name, "cpuset", cpuset)
391392
return nil
392393
}
393394

0 commit comments

Comments
 (0)