Bug 1466390
| Summary: | [RFE] add selector option to oadm drain | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Sergi Jimenez Romero <sjr> |
| Component: | oc | Assignee: | Juan Vallejo <jvallejo> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Xingxing Xia <xxia> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.5.0 | CC: | acomabon, aos-bugs, jokerman, jvallejo, mmccomas, smunilla |
| Target Milestone: | --- | ||
| Target Release: | 3.9.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Enhancement | |
| Doc Text: |
Feature: new flag added to the `oc adm drain` command to allow selecting nodes by label.
Reason: There was a need to be able to drain multiple nodes, without having to perform the `drain` operation on each individual node.
Result: `oc adm drain` now supports a "--selector" flag which results in all nodes matching a given label being drained.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-06-18 18:16:33 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Sergi Jimenez Romero
2017-06-29 13:59:16 UTC
Upstream PR has merged [1]. Waiting on Origin PR. 1. https://github.com/kubernetes/kubernetes/pull/52917 Hi! the Origin PR seems stuck at: Submit Queue — Will not auto merge because kind/bug is missing Besides, do we already have a target release for this RFE? Thanks! Now in v3.9.0-0.16.0, it includes --selector # oc adm drain -h ... -l, --selector='': Selector (label query) to filter on ... And the flag works # oc adm drain --selector router=enabled node "172.16.120.33" cordoned error: unable to drain node "172.16.120.33", aborting command... There are pending nodes to be drained: 172.16.120.33 error: pods with local storage (use --delete-local-data to override): mongodb-1-2scgl, nodejs-mongodb-example-1-build, django-ex-1-build; DaemonSet-managed pods (use --ignore-daemonsets to ignore): apiserver-dwv59 # oc adm drain --selector router=enabled --delete-local-data --ignore-daemonsets node "172.16.120.33" already cordoned WARNING: Deleting pods with local storage: mongodb-1-2scgl, nodejs-mongodb-example-1-build, django-ex-1-build; Ignoring DaemonSet-managed pods: apiserver-dwv59 pod "asb-1-deploy" evicted pod "asb-etcd-1-deploy" evicted pod "nodejs-mongodb-example-1-build" evicted pod "django-ex-1-build" evicted pod "router-1-zz7pq" evicted pod "docker-registry-1-kbrcv" evicted pod "django-ex-1-s2hp5" evicted pod "mongodb-1-2scgl" evicted pod "nodejs-mongodb-example-1-xc5sk" evicted pod "registry-console-1-jncc6" evicted node "172.16.120.33" drained # oc get po --all-namespaces NAMESPACE NAME READY STATUS RESTARTS AGE default docker-registry-1-fdjqv 0/1 Pending 0 1m default registry-console-1-g74bq 0/1 Pending 0 1m default router-1-s7dnq 0/1 Pending 0 1m kube-service-catalog apiserver-5ccf9 1/1 Running 0 9h kube-service-catalog controller-manager-zjmwc 1/1 Running 2 9h openshift-template-service-broker apiserver-bwcn6 1/1 Running 0 9h openshift-template-service-broker apiserver-dwv59 1/1 Running 0 9h |