Bug 1835739
Summary: | Support 'oc adm node drain' without --ignore-daemonsets=true --delete-local-data=true flags | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Maciej Szulik <maszulik> |
Component: | oc | Assignee: | Maciej Szulik <maszulik> |
Status: | CLOSED ERRATA | QA Contact: | zhou ying <yinzhou> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 4.4 | CC: | aos-bugs, jokerman, lshilin, mfojtik, yinzhou |
Target Milestone: | --- | Keywords: | UpcomingSprint |
Target Release: | 4.4.z | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: |
Cause:
Wrong condition in the code caused the logic to ignore deleted pods.
Consequence:
oc adm node drain was not properly accounting daemon sets and local data attached to pods when draining a node.
Fix:
Fix the logic, so that all pods are accounted accordingly when draining a node.
Result:
When trying to drain a node which has a daemonset's pod running, or pod has attached local volume data the drain command will fail pointing to use flags which will ignore the two.
|
Story Points: | --- |
Clone Of: | 1835628 | Environment: | |
Last Closed: | 2020-06-17 22:26:36 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1835628 | ||
Bug Blocks: |
Description
Maciej Szulik
2020-05-14 12:14:28 UTC
Actually, it's the opposite, we need to pick https://github.com/kubernetes/kubernetes/pull/87361 fix so that oc adm drain warns about daemonsets and local storage. PR waiting in queue https://github.com/openshift/oc/pull/420 Confirmed with latest oc: with DaemonSets or Volumes attached should give you the warning and abort the drain. [root@dhcp-140-138 ~]# oc version -o yaml clientVersion: buildDate: "2020-05-29T06:43:55Z" compiler: gc gitCommit: 1960dd73b123241730531db09489d951228ad853 gitTreeState: clean gitVersion: 4.4.0-202005290638-1960dd7 goVersion: go1.13.4 major: "" minor: "" platform: linux/amd64 openshiftVersion: 4.4.0-0.nightly-2020-05-30-022631 serverVersion: buildDate: "2020-05-30T01:52:40Z" compiler: gc gitCommit: f5fb168 gitTreeState: clean gitVersion: v1.17.1+f5fb168 goVersion: go1.13.4 major: "1" minor: 17+ platform: linux/amd64 [root@dhcp-140-138 ~]# oc adm drain node/ip-10-0-187-6.us-east-2.compute.internal node/ip-10-0-187-6.us-east-2.compute.internal cordoned error: unable to drain node "ip-10-0-187-6.us-east-2.compute.internal", aborting command... There are pending nodes to be drained: ip-10-0-187-6.xxx-2.compute.internal cannot delete DaemonSet-managed Pods (use --ignore-daemonsets to ignore): openshift-cluster-node-tuning-operator/tuned-m4rdr, openshift-dns/dns-default-6lhrh, openshift-image-registry/node-ca-6lkn2, openshift-machine-config-operator/machine-config-daemon-hzg4r, openshift-monitoring/node-exporter-n4k45, openshift-multus/multus-647pc, openshift-sdn/ovs-mzkjd, openshift-sdn/sdn-tnd4z cannot delete Pods with local storage (use --delete-local-data to override): openshift-monitoring/alertmanager-main-2, openshift-monitoring/kube-state-metrics-5595b5958b-bzcpj Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:2445 |