Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1835629

Summary: Support 'oc adm node drain' without --ignore-daemonsets=true --delete-local-data=true flags
Product: OpenShift Container Platform Reporter: Lubov <lshilin>
Component: ocAssignee: Maciej Szulik <maszulik>
Status: CLOSED DUPLICATE QA Contact: zhou ying <yinzhou>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.5CC: aos-bugs, jokerman, lshilin, mfojtik, prabinov
Target Milestone: ---Keywords: AutomationBlocker, Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-14 11:40:00 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 Lubov 2020-05-14 08:23:19 UTC
Description of problem:

Running 'oc adm node drain' without --ignore-daemonsets --delete-local-data flags resulting in error:
error: cannot delete DaemonSet-managed Pods (use --ignore-daemonsets to ignore): openshift-cluster-node-tuning-operator/tuned-2kls9, openshift-dns/dns-default-c675s, openshift-image-registry/node-ca-d57th, openshift-machine-config-operator/machine-config-daemon-c5kx4, openshift-monitoring/node-exporter-jf5cr, openshift-multus/multus-cxqwz, openshift-ovn-kubernetes/ovnkube-node-zbzpv, openshift-ovn-kubernetes/ovs-node-kbjgf
cannot delete Pods with local storage (use --delete-local-data to override): openshift-image-registry/image-registry-5bcb67497d-gvq6b

Version-Release number of selected component (if applicable):
Client Version: 4.5
Server Version: 4.5

How reproducible:
Always with 4.5 client version

Steps to Reproduce:
Run 'oc adm drain NODE'

Actual results:
Error reported, drain aborted

Expected results:
Node drained, application pods evicted

Additional info:
1. When used Client Version 4.4 there is no problem with running the command without flags
2. The similar problem reported for CNV (see linked bug). Our setup is BareMetal without CNV

Comment 1 Lubov 2020-05-14 08:28:40 UTC
In manual testing we run the command with the flags as WA

Comment 2 Maciej Szulik 2020-05-14 11:40:00 UTC

*** This bug has been marked as a duplicate of bug 1835628 ***