Hi,
I've noticed that draining of a node via kured gets stuck if the pods that get drained have a specific name and get scheduled on another node while drain is going on.
This is because the kubectldrain.RunNodeDrain function calls drainer.GetPodsForDeletion(nodeName) once when its called. So it gets the list of pods of a node once and without a timeout it tries to drain the same pods over and over again even if they are not on the same node anymore.
This causes kured to be blocked either forever or even evict pods from other nodes.
Hi,
I've noticed that draining of a node via kured gets stuck if the pods that get drained have a specific name and get scheduled on another node while drain is going on.
This is because the
kubectldrain.RunNodeDrainfunction callsdrainer.GetPodsForDeletion(nodeName)once when its called. So it gets the list of pods of a node once and without a timeout it tries to drain the same pods over and over again even if they are not on the same node anymore.This causes kured to be blocked either forever or even evict pods from other nodes.