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

Bug 2021008

Summary: Undeploy of NFD stuck
Product: OpenShift Container Platform Reporter: Lubov <lshilin>
Component: Node Feature Discovery OperatorAssignee: Carlos Eduardo Arango Gutierrez <carangog>
Status: CLOSED ERRATA QA Contact: Lubov <lshilin>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.10CC: aos-bugs, carangog, eglottma, rbartal, sejug
Target Milestone: ---Keywords: AutomationBlocker, Regression, Reopened
Target Release: 4.10.0   
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: 2022-03-10 15:56:48 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 2021-11-08 05:12:41 UTC
Description of problem:

The operator is deployed and functional (worker get their lables). On undeploy the operator the process stuck forever: 
[kni@ocp-edge24 ~]$ make undeploy IMAGE_TAG=registry.ocp-edge3.lab.eng.tlv2.redhat.com:5000/openshift/origin-cluster-nfd-operator:4.10 PULLPOLICY=IfNotPresent --directory=cluster-nfd-operator
make: Entering directory '/home/kni/cluster-nfd-operator'
/home/kni/cluster-nfd-operator/bin/kustomize build config/default | kubectl delete -f -
namespace "openshift-nfd" deleted
customresourcedefinition.apiextensions.k8s.io "nodefeaturediscoveries.nfd.openshift.io" deleted
serviceaccount "nfd-operator" deleted
role.rbac.authorization.k8s.io "nfd-leader-election-role" deleted
role.rbac.authorization.k8s.io "nfd-prometheus-k8s" deleted
clusterrole.rbac.authorization.k8s.io "nfd-metrics-reader" deleted
clusterrole.rbac.authorization.k8s.io "nfd-operator" deleted
clusterrole.rbac.authorization.k8s.io "nfd-proxy-role" deleted
rolebinding.rbac.authorization.k8s.io "nfd-leader-election-rolebinding" deleted
rolebinding.rbac.authorization.k8s.io "nfd-prometheus-k8s" deleted
clusterrolebinding.rbac.authorization.k8s.io "nfd-operator" deleted
clusterrolebinding.rbac.authorization.k8s.io "nfd-proxy-rolebinding" deleted
configmap "nfd-manager-config" deleted
service "nfd-controller-manager-metrics-service" deleted
deployment.apps "nfd-controller-manager" deleted
prometheusrule.monitoring.coreos.com "nfd-controller-manager-alerts-monitor" deleted
servicemonitor.monitoring.coreos.com "nfd-controller-manager-metrics-monitor" deleted

Version-Release number of selected component (if applicable):
4.10
last occurrence on 4.10.0-0.nightly-2021-11-04-001635

How reproducible:
100%

Steps to Reproduce:
oc image mirror quay.io/openshift/origin-cluster-nfd-operator:4.10 registry.ocp-edge3.lab.eng.tlv2.redhat.com:5000/openshift/origin-cluster-nfd-operator
oc image mirror quay.io/openshift/origin-node-feature-discovery:4.10=registry.ocp-edge3.lab.eng.tlv2.redhat.com:5000/openshift/origin-node-feature-discovery
oc image mirror registry.redhat.io/openshift4/ose-kube-rbac-proxy=registry.ocp-edge3.lab.eng.tlv2.redhat.com:5000/openshift4/ose-kube-rbac-proxy
git clone https://github.com/openshift/cluster-nfd-operator
KUBECONFIG=/home/kni/clusterconfigs/auth/kubeconfig 
make deploy IMAGE_TAG=registry.ocp-edge3.lab.eng.tlv2.redhat.com:5000/openshift/origin-cluster-nfd-operator:4.10 PULLPOLICY=IfNotPresent --directory=cluster-nfd-operator
oc apply -f cluster-nfd-operator/config/samples/nfd.openshift.io_v1_nodefeaturediscovery.yaml
make undeploy IMAGE_TAG=registry.ocp-edge3.lab.eng.tlv2.redhat.com:5000/openshift/origin-cluster-nfd-operator:4.10 PULLPOLICY=IfNotPresent --directory=cluster-nfd-operator
(see https://polarion.engineering.redhat.com/polarion/redirect/project/OSE/workitem?id=OCP-39723 for details)

Actual results:
undeploy stuck

Expected results:
the operator undeployed with no problem

Additional info:
if you need some logs, please, let me know

Comment 1 Lubov 2022-01-19 08:29:05 UTC
Is there any progress with the fix?

Comment 3 Lubov 2022-01-31 17:04:19 UTC
After discussion with Eduardo, it looks like the fix was made in master and not forwarded to 4.10

Comment 4 Carlos Eduardo Arango Gutierrez 2022-02-02 23:06:48 UTC
fix is now on 4.10 branch

Comment 6 Lubov 2022-02-14 12:20:55 UTC
undeploy still stuck :(

Comment 7 Carlos Eduardo Arango Gutierrez 2022-02-14 14:27:45 UTC
NOT_A_BUG
you must first run
oc delete -f cluster-nfd-operator/config/samples/nfd.openshift.io_v1_nodefeaturediscovery.yaml
or the finalizer on the CR will prevent the operator and namespace from being deleted.
is a expected behavior
we will add documentation for this moving forward.

Comment 8 Lubov 2022-02-15 07:26:34 UTC
I opening this bz on_qa. It was a problem reported, that was fixed, but couldn't verify it since the last instruction was missing. Verifying

Comment 9 Lubov 2022-02-15 07:41:51 UTC
Deletion of the yaml before undeploy really helps. Thanks!
Verified

Comment 11 errata-xmlrpc 2022-03-10 15:56:48 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 (OpenShift Container Platform 4.10.3 extras update), 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-2022:0057