Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UPSTREAM: 41864: Allow 'kubectl drain --force' to remove orphaned pods #13123

Merged
merged 1 commit into from
Mar 1, 2017

Conversation

marun
Copy link
Contributor

@marun marun commented Feb 27, 2017

If the managing resource of a given pod (e.g. DaemonSet/ReplicaSet/etc) is deleted (effectively orphaning the pod), and kubectl drain --force is invoked on the node hosting the pod, the command would fail with an error indicating that the managing resource was not found. This PR reduces the error to a warning if --force is specified, allowing nodes with orphaned pods to be drained.

Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1424678

@marun marun requested a review from derekwaynecarr February 27, 2017 17:39
@derekwaynecarr
Copy link
Member

lgtm [merge]

@derekwaynecarr derekwaynecarr self-assigned this Feb 27, 2017
@eparis
Copy link
Member

eparis commented Feb 28, 2017

[WARNING] While the jUnit report found no failed tests, the `go test` process failed.
18:07:27 [WARNING] This usually means that the unit test suite failed to compile.
18:07:27 [WARNING] `go test` had the following output to stderr:
18:07:27 vendor/k8s.io/kubernetes/pkg/kubectl/cmd/drain_test.go:281: undefined: metav1 in metav1.ObjectMeta
18:07:27 vendor/k8s.io/kubernetes/pkg/kubectl/cmd/drain_test.go:288: undefined: metav1 in metav1.LabelSelector
18:07:27 vendor/k8s.io/kubernetes/pkg/kubectl/cmd/drain_test.go:296: undefined: metav1 in metav1.ObjectMeta

@marun marun force-pushed the kubectl-drain-orphans branch from 6f869ab to af13e07 Compare February 28, 2017 14:57
@marun
Copy link
Contributor Author

marun commented Feb 28, 2017

Fixed.

@openshift-bot
Copy link
Contributor

[Test]ing while waiting on the merge queue

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to af13e07

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_future/629/) (Base Commit: f82baba)

@eparis
Copy link
Member

eparis commented Mar 1, 2017

[merge] because device mapper is the worst

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to af13e07

@openshift-bot
Copy link
Contributor

openshift-bot commented Mar 1, 2017

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_future/690/) (Base Commit: ceb2cf3) (Image: devenv-rhel7_6008)

@openshift-bot openshift-bot merged commit 67b69b3 into openshift:release-1.5 Mar 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants