Files
kubernetes/pkg/kubelet
Kubernetes Submit Queue 8eb7eeef39 Merge pull request #63321 from sjenning/fix-pod-deletor
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 kubelet: force filterContainerID to empty string when removeAll is true 

fixes https://github.com/kubernetes/kubernetes/issues/57865

alternative to https://github.com/kubernetes/kubernetes/pull/62170

There is a bug in the container deletor where if `removeAll` is `true` in `deleteContainersInPod()` the `filterContainerID` is still used to filter results in `getContainersToDeleteInPod()`.  If the filter container is not found, no containers are returned for deletion.

https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/pod_container_deletor.go#L74-L77

This is the case for the delayed deletion a pod in `CrashLoopBackoff` as the death of the infra container in response to the `DELETE` is detected by PLEG and triggers an attempt to clean up all containers but uses the infra container id as a filter with `removeAll` set to `true`.  The infra container is immediately deleted and thus can not be found when `getContainersToDeleteInPod()` tries to find it.  Thus the dead app container from the previous restart attempt still exists.

`canBeDeleted()` in the status manager will return `false` until all the pod containers are deleted, delaying the deletion of the pod on the API server.

The removal of the containers is eventually forced by the API server `REMOVE` after the grace period.
2018-05-01 09:50:13 -07:00
..
2018-03-27 09:29:35 -07:00
2018-04-27 07:56:42 -04:00
2018-01-29 15:07:51 -05:00
2017-10-15 18:18:13 -07:00
2018-02-23 01:42:35 +00:00
2018-04-11 09:26:02 -07:00
2018-02-16 13:43:01 -08:00
2018-04-26 01:21:20 -07:00
2018-04-11 09:26:02 -07:00
2018-04-11 18:35:24 +02:00
2018-04-18 09:55:57 -07:00
2018-02-24 17:39:21 +08:00
2018-04-18 09:55:57 -07:00
2018-02-20 10:38:41 -05:00
2018-01-29 21:44:54 -08:00