Skip to content

Commit

Permalink
add logs when root container does not exist
Browse files Browse the repository at this point in the history
Signed-off-by: Harshal Patil <harpatil@redhat.com>
  • Loading branch information
harche committed Feb 22, 2024
1 parent 2eba5a9 commit cefa418
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pkg/kubelet/cm/cgroup_manager_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@ func (m *cgroupManagerImpl) Validate(name CgroupName) error {

// Exists checks if all subsystem cgroups already exist
func (m *cgroupManagerImpl) Exists(name CgroupName) bool {
if m.Validate(name) != nil {
klog.V(2).InfoS("Unable to validate cgroup", "name", name)
}
return m.Validate(name) == nil
}

Expand Down
3 changes: 2 additions & 1 deletion pkg/kubelet/cm/qos_container_manager_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ func (m *qosContainerManagerImpl) Start(getNodeAllocatable func() v1.ResourceLis
cm := m.cgroupManager
rootContainer := m.cgroupRoot
if !cm.Exists(rootContainer) {
return fmt.Errorf("root container %v doesn't exist", rootContainer)
err := fmt.Errorf("root container %v doesn't exist", rootContainer)
return err
}

// Top level for Qos containers are created only for Burstable
Expand Down

0 comments on commit cefa418

Please sign in to comment.