Bug 1835628 - Support 'oc adm node drain' without --ignore-daemonsets=true --delete-local-data=true flags
Summary: Support 'oc adm node drain' without --ignore-daemonsets=true --delete-local-d...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.5.0
Assignee: Maciej Szulik
QA Contact: zhou ying
URL:
Whiteboard:
: 1835629 (view as bug list)
Depends On:
Blocks: 1835739
TreeView+ depends on / blocked
 
Reported: 2020-05-14 08:22 UTC by Lubov
Modified: 2020-07-13 17:39 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 1835739 (view as bug list)
Environment:
Last Closed: 2020-07-13 17:38:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1795182 0 unspecified CLOSED Support 'oc adm node drain' without --ignore-daemonsets=true flag 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:39:01 UTC

Description Lubov 2020-05-14 08:22:54 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 Maciej Szulik 2020-05-14 11:40:00 UTC
*** Bug 1835629 has been marked as a duplicate of this bug. ***

Comment 2 Maciej Szulik 2020-05-14 12:13:21 UTC
This is not a bug, this was reported upstream in https://github.com/kubernetes/kubectl/issues/803
and only kubectl 1.17 and accompanying oc 4.4 are affected. If you try older version of oc 4.3 or 4.2
you'll get a similar error. I'm closing this as not a bug and I'll try to cherry-pick the fix into 4.4.

Comment 3 Maciej Szulik 2020-05-14 12:36:10 UTC
It looks like to be able to merge this to 4.4, it needs to go through a QA, so sending for qa.

Comment 6 errata-xmlrpc 2020-07-13 17:38:49 UTC
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:2409


Note You need to log in before you can comment on or make changes to this bug.