Skip to content

Commit ee22f6d

Browse files
committed
WIP debug
Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent f39b8e2 commit ee22f6d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

pkg/kubelet/cm/cgroup_manager_linux.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,8 @@ func (m *cgroupManagerImpl) Destroy(cgroupConfig *CgroupConfig) error {
314314
return err
315315
}
316316

317+
klog.V(4).Infof("KKK builtPaths: %+v", m.buildCgroupPaths(cgroupConfig.Name))
318+
klog.V(4).Infof("KKK Removing cgroup: %+v", cgroupConfig.Name, "paths: ", manager.GetPaths())
317319
// Delete cgroups using libcontainer cgroup manager's Destroy() method.
318320
if err = manager.Destroy(); err != nil {
319321
return fmt.Errorf("unable to destroy cgroup paths for cgroup %v : %v", cgroupConfig.Name, err)
@@ -457,6 +459,8 @@ func (m *cgroupManagerImpl) Update(cgroupConfig *CgroupConfig) error {
457459
if err != nil {
458460
return fmt.Errorf("failed to create cgroup manager: %v", err)
459461
}
462+
klog.V(4).Infof("KKK builtPaths: %+v", m.buildCgroupPaths(cgroupConfig.Name))
463+
klog.V(4).Infof("KKK Updating cgroup: %v, paths: %+v", cgroupConfig.Name, manager.GetPaths())
460464

461465
return manager.Set(config.Resources)
462466
}
@@ -475,6 +479,7 @@ func (m *cgroupManagerImpl) Create(cgroupConfig *CgroupConfig) error {
475479
return err
476480
}
477481

482+
klog.V(4).Infof("KKK Creating cgroup: %v, config: %+v", cgroupConfig.Name, config)
478483
// Apply(-1) is a hack to create the cgroup directories for each resource
479484
// subsystem. The function [cgroups.Manager.apply()] applies cgroup
480485
// configuration to the process with the specified pid.
@@ -484,6 +489,8 @@ func (m *cgroupManagerImpl) Create(cgroupConfig *CgroupConfig) error {
484489
if err := manager.Apply(-1); err != nil {
485490
return err
486491
}
492+
klog.V(4).Infof("KKK builtPaths: %+v ", m.buildCgroupPaths(cgroupConfig.Name))
493+
klog.V(4).Infof("KKK Created cgroup: %v, paths: %+v", cgroupConfig.Name, manager.GetPaths())
487494

488495
// it may confuse why we call set after we do apply, but the issue is that runc
489496
// follows a similar pattern. it's needed to ensure cpu quota is set properly.

0 commit comments

Comments
 (0)