mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Errors from cgroup destroy and pid kills are swallowed. Log a warning when that happens.
This commit is contained in:
		@@ -187,7 +187,7 @@ func (m *podContainerManagerImpl) tryKillingCgroupProcesses(podCgroup CgroupName
 | 
				
			|||||||
func (m *podContainerManagerImpl) Destroy(podCgroup CgroupName) error {
 | 
					func (m *podContainerManagerImpl) Destroy(podCgroup CgroupName) error {
 | 
				
			||||||
	// Try killing all the processes attached to the pod cgroup
 | 
						// Try killing all the processes attached to the pod cgroup
 | 
				
			||||||
	if err := m.tryKillingCgroupProcesses(podCgroup); err != nil {
 | 
						if err := m.tryKillingCgroupProcesses(podCgroup); err != nil {
 | 
				
			||||||
		klog.V(3).Infof("failed to kill all the processes attached to the %v cgroups", podCgroup)
 | 
							klog.Warningf("failed to kill all the processes attached to the %v cgroups", podCgroup)
 | 
				
			||||||
		return fmt.Errorf("failed to kill all the processes attached to the %v cgroups : %v", podCgroup, err)
 | 
							return fmt.Errorf("failed to kill all the processes attached to the %v cgroups : %v", podCgroup, err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -197,6 +197,7 @@ func (m *podContainerManagerImpl) Destroy(podCgroup CgroupName) error {
 | 
				
			|||||||
		ResourceParameters: &ResourceConfig{},
 | 
							ResourceParameters: &ResourceConfig{},
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if err := m.cgroupManager.Destroy(containerConfig); err != nil {
 | 
						if err := m.cgroupManager.Destroy(containerConfig); err != nil {
 | 
				
			||||||
 | 
							klog.Warningf("failed to delete cgroup paths for %v : %v", podCgroup, err)
 | 
				
			||||||
		return fmt.Errorf("failed to delete cgroup paths for %v : %v", podCgroup, err)
 | 
							return fmt.Errorf("failed to delete cgroup paths for %v : %v", podCgroup, err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return nil
 | 
						return nil
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user