Commit a36d9df2 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #47450 from kargakis/fix-drain

Automatic merge from submit-queue (batch tested with PRs 47523, 47438, 47550, 47450, 47612) Ignore 404s on evict One of our upgrades failed with ``` error: error when evicting pod \"boo-2-deploy\": pods \"boo-2-deploy\" not found" ``` @derekwaynecarr since you already fixed half of it cc: @kubernetes/sig-cli-bugs I failed terribly at adding a unit test mostly because draining involves discovery for the eviction API and the fake client stuff for discovery are far from functional - will spawn a separate issue about it. fyi @jupierce related: https://github.com/kubernetes/kubectl/issues/28
parents e4a4b8ef 26d3eadb
......@@ -496,7 +496,7 @@ func (o *DrainOptions) evictPods(pods []api.Pod, policyGroupVersion string, getP
break
} else if apierrors.IsTooManyRequests(err) {
time.Sleep(5 * time.Second)
} else {
} else if !apierrors.IsNotFound(err) {
errCh <- fmt.Errorf("error when evicting pod %q: %v", pod.Name, err)
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment