Skip to content

oc adm drain --ignore-daemonsets seems to not ignore daemonsets #17522

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

Closed
dustymabe opened this issue Nov 29, 2017 · 4 comments
Closed

oc adm drain --ignore-daemonsets seems to not ignore daemonsets #17522

dustymabe opened this issue Nov 29, 2017 · 4 comments
Assignees
Labels
component/cli kind/bug Categorizes issue or PR as related to a bug. priority/P1

Comments

@dustymabe
Copy link
Member

oc adm drain --ignore-daemonsets seems to not ignore daemonsets

Version
[root@origin-master-1 ~]# oc version
oc v3.6.1+008f2d5
kubernetes v1.6.1+5115d708d7
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://y.y.y.y:8443
kubernetes v1.6.1+5115d708d7

steps:

[root@origin-master-1 ~]# oc adm drain x.x.x.x
node "x.x.x.x" already cordoned
error: pods with local storage (use --delete-local-data to override): glusterfs-storage-5h928; DaemonSet-managed pods (use --ignore-daemonsets to ignore): glusterfs-storage-5h928
[root@origin-master-1 ~]# oc adm drain --ignore-daemonsets x.x.x.x
node "x.x.x.x" already cordoned
error: pods with local storage (use --delete-local-data to override): glusterfs-storage-5h928
[root@origin-master-1 ~]# oc get ds --namespace glusterfs
NAME                DESIRED   CURRENT   READY     UP-TO-DATE   AVAILABLE   NODE-SELECTOR            AGE
glusterfs-storage   3         3         3         3            3           glusterfs=storage-host   26d
$ oc get pods -o wide
NAME                      READY     STATUS    RESTARTS   AGE       IP                NODE
glusterfs-storage-5h928   1/1       Running   2          26d       x.x.x.x            x.x.x.x
glusterfs-storage-vd02b   1/1       Running   2          26d       x.x.x.y            x.x.x.y
glusterfs-storage-z7q5r   1/1       Running   3          26d       x.x.x.z            x.x.x.z
heketi-storage-1-wpfb3    1/1       Running   0          9d        x.x.x.y            x.x.x.y
@dustymabe
Copy link
Member Author

note I was able to workaround by using a complicated pod-selector:

[root@origin-master-1 ~]# oc adm manage-node --evacuate --force x.x.x.x --pod-selector='glusterfs notin (storage-pod)'                                                                                                                
Flag --evacuate has been deprecated, use 'oadm drain NODE' instead

Migrating these pods on node:
<snip>
....

@pweil- pweil- added component/cli kind/bug Categorizes issue or PR as related to a bug. priority/P1 labels Nov 30, 2017
@juanvallejo
Copy link
Contributor

Hi Dusty, are you by any chance able to reproduce this with a 3.7 or 3.8 client?

@juanvallejo
Copy link
Contributor

An immediate workaround for draining a node with pods managed by a DaemonSet that also have local storage, is to use both the --ignore-daemonsets and --delete-local-data flags. Having both flags causes the command to succeed, and will in fact leave any daemonset-managed pods (and their storage) intact, as those are never deleted by the drain command.

@juanvallejo
Copy link
Contributor

Related issue: #17563

openshift-merge-robot added a commit that referenced this issue Jan 21, 2018
…in-local-storage

Automatic merge from submit-queue (batch tested with PRs 17547, 18151).

UPSTREAM: 56713: Allow oadm drain to continue w ds-managed pods with local storage

Fixes #17522

UPSTREAM: kubernetes/kubernetes#56713

Prevents oadm drain from failing if it encounters DaemonSet-managed pods
that have local storage, when the option to ignore DaemonSet-managed
pods has been specified.

Will add tests

cc @openshift/cli-review @dustymabe @deads2k
openshift-publish-robot pushed a commit to openshift/kubernetes that referenced this issue Jan 25, 2018
…ds-pod-drain-local-storage

Automatic merge from submit-queue (batch tested with PRs 17547, 18151).

UPSTREAM: 56713: Allow oadm drain to continue w ds-managed pods with local storage

Fixes openshift/origin#17522

UPSTREAM: kubernetes#56713

Prevents oadm drain from failing if it encounters DaemonSet-managed pods
that have local storage, when the option to ignore DaemonSet-managed
pods has been specified.

Will add tests

cc @openshift/cli-review @dustymabe @deads2k

Origin-commit: 1c8ec8f29d1fd182c8329d57e1bd22286b8fd7c9
openshift-publish-robot pushed a commit to openshift/kubernetes that referenced this issue Feb 27, 2018
…ds-pod-drain-local-storage

Automatic merge from submit-queue (batch tested with PRs 17547, 18151).

UPSTREAM: 56713: Allow oadm drain to continue w ds-managed pods with local storage

Fixes openshift/origin#17522

UPSTREAM: kubernetes#56713

Prevents oadm drain from failing if it encounters DaemonSet-managed pods
that have local storage, when the option to ignore DaemonSet-managed
pods has been specified.

Will add tests

cc @openshift/cli-review @dustymabe @deads2k

Origin-commit: 1c8ec8f29d1fd182c8329d57e1bd22286b8fd7c9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/cli kind/bug Categorizes issue or PR as related to a bug. priority/P1
Projects
None yet
Development

No branches or pull requests

3 participants