Description of problem: OCS Client Operator cannot be completely uninstalled. The deployments and daemonset for CSI fs and rbd remain. Version-Release number of selected component (if applicable): 4.14.1 How reproducible: 100% Steps to Reproduce: Followed the following steps to uninstall the operator 1. Delete the storageClassClaims 2. Delete the storageClients 3. Delete the subs for OCS-client 4. Delete the subs for CSI-addons 5. Delete the csv for OCS-client 6. Delete the csv for CSI-addons Actual results: Deployments/daemonsets/csiaddonsnode are not deleted Expected results: CSI rbd and fs deployments, daemonsets and rbd csiaddonsnode are deleted Additional info:
The workaround is: Followed the following steps to uninstall the operator 1. Make sure that all the PV/PVCs using the storageClass from this client is deleted 2. Delete the storageClassClaims 3. Delete the storageClients 4. Delete the SUBS for OCS-client and CSI-addons 5. Delete the CSV for OCS-client and CSI-addons 6. Remove the finalizers from the csiaddonsnode 7. Delete all the deployments/daemonsets
After a full investigation i've come to the conclusions below, 1. The controller in charge of deploying the leftover components does not have a deletion phase. 2. After discussion with the csi team uninstall of components should be as simple as their removal 3. Fix will be created accordingly, deletion phase will be added to the controller which will remove the leftover components.
after further discussion and investigation a correction need to be made, clusterversion controller is currently a controller watching the clusterversion resource in the ocp deployment hence the resource wont be deleted and so does the leftover resources of said controller. that said we decided to change the approach and redesign the controller to watch a configmap instead, the config map will sit under the namespace and when the namespace will be deleted so will the resources.
@nberry To delete an operator from the CLI we need to delete the subs followed by the CSV [1]. Removing the namespace directly will lead to some resources remaining and we would need to remove the finalizers which is not a clean uninstall. [1]:https://docs.openshift.com/container-platform/4.14/operators/admin/olm-deleting-operators-from-cluster.html#olm-deleting-operator-from-a-cluster-using-cli_olm-deleting-operators-from-a-cluster
I followed the Steps to Reproduce as mentioned in BZ description: ------------------------------------------------------- Followed the following steps to uninstall the operator 1. Delete the storageClassClaims 2. Delete the storageClients 3. Delete the subs for OCS-client 4. Delete the subs for CSI-addons 5. Delete the csv for OCS-client 6. Delete the csv for CSI-addons --------------------Execution----------------------------------- $ oc project openshift-storage-client Now using project "openshift-storage-client" on server "https://52.118.6.141:6443" 1.1. Ensure no pv/PVCs $oc get pv No resources found $ oc get pvc No resources found 1.2 Delete the storageClassClaims $ oc get storageclaims NAME STORAGETYPE STORAGEPROFILE STORAGECLIENTNAME PHASE storage-client-ceph-rbd block storage-client Ready storage-client-cephfs sharedfile storage-client Ready oc delete storageclaims storage-client-ceph-rbd storage-client-cephfs storageclaim.ocs.openshift.io "storage-client-ceph-rbd" deleted storageclaim.ocs.openshift.io "storage-client-cephfs" deleted $ oc get storageclaims No resources found 2. Delete the storageClients $ oc get storageclient NAME PHASE CONSUMER storage-client Connected d84f9401-368e-4b3d-8172-e06d642f39e3 sgatfane-mac:Clusters sgatfane$ oc delete storageclient storage-client storageclient.ocs.openshift.io "storage-client" deleted 3. Delete the subs for OCS-client $ oc get subs NAME PACKAGE SOURCE CHANNEL ocs-client-operator ocs-client-operator ocs-catalogsource stable-4.16 odf-csi-addons-operator-stable-4.15-redhat-operators-openshift-marketplace odf-csi-addons-operator redhat-operators stable-4.15 $ oc delete subs ocs-client-operator subscription.operators.coreos.com "ocs-client-operator" deleted 4. Delete the subs for CSI-addons $ oc delete subs odf-csi-addons-operator-stable-4.15-redhat-operators-openshift-marketplace subscription.operators.coreos.com "odf-csi-addons-operator-stable-4.15-redhat-operators-openshift-marketplace" deleted $ oc get subs No resources found in openshift-storage-client namespace. 5. Delete the csv for OCS-client $ oc get csv NAME DISPLAY VERSION REPLACES PHASE ocs-client-operator.v4.16.0-86.stable OpenShift Data Foundation Client 4.16.0-86.stable Succeeded odf-csi-addons-operator.v4.15.2-rhodf CSI Addons 4.15.2-rhodf odf-csi-addons-operator.v4.15.1-rhodf Succeeded $ oc delete csv ocs-client-operator.v4.16.0-86.stable clusterserviceversion.operators.coreos.com "ocs-client-operator.v4.16.0-86.stable" deleted $ oc delete csv odf-csi-addons-operator.v4.15.2-rhodf 6. Delete the csv for CSI-addons clusterserviceversion.operators.coreos.com "odf-csi-addons-operator.v4.15.2-rhodf" deleted $ oc get csv No resources found in openshift-storage-client namespace. -------Observations------------------------------ $ oc get deployments NAME READY UP-TO-DATE AVAILABLE AGE csi-cephfsplugin-provisioner 2/2 2 2 13d csi-rbdplugin-provisioner 2/2 2 2 13d $ oc get daemonsets NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE csi-cephfsplugin 3 3 3 3 3 <none> 13d csi-rbdplugin 3 3 3 3 3 <none> 13d $ oc get csiaddonsnode NAME NAMESPACE AGE DRIVERNAME ENDPOINT NODEID csi-rbdplugin-8jg98 openshift-storage-client 13d openshift-storage.rbd.csi.ceph.com pod://csi-rbdplugin-8jg98.openshift-storage-client:9070 hcp416-bm1-y-c749275d-p4gc9 csi-rbdplugin-provisioner-7fc4b46b95-7krth openshift-storage-client 5d21h openshift-storage.rbd.csi.ceph.com pod://csi-rbdplugin-provisioner-7fc4b46b95-7krth.openshift-storage-client:9070 hcp416-bm1-y-c749275d-2vz2c csi-rbdplugin-provisioner-7fc4b46b95-pknxw openshift-storage-client 5d21h openshift-storage.rbd.csi.ceph.com pod://csi-rbdplugin-provisioner-7fc4b46b95-pknxw.openshift-storage-client:9070 hcp416-bm1-y-c749275d-8zvlh csi-rbdplugin-v74md openshift-storage-client 6d14h openshift-storage.rbd.csi.ceph.com pod://csi-rbdplugin-v74md.openshift-storage-client:9070 hcp416-bm1-y-c749275d-8zvlh csi-rbdplugin-wksql openshift-storage-client 13d openshift-storage.rbd.csi.ceph.com pod://csi-rbdplugin-wksql.openshift-storage-client:9070 hcp416-bm1-y-c749275d-2vz2c after following mention uninstallation steps: Deployments/daemonsets/csiaddonsnode are not deleted
Please propose the final sequential steps of uninstallation which is supposed to follow ideally to resolve this BZ.
(In reply to suchita from comment #18) > Please propose the final sequential steps of uninstallation which is > supposed to follow ideally to resolve this BZ. 1. Delete all in use PV(C)s created from claimed storageclasses 2. Delete manually created storageclaims 3. Delete the storageclients 4. Delete "ocs-client-operator-config" config map (CM) in namespace where client-operator is running 5. Delete the subs for csi-addons & ocs-client-op 6. Delete the csv for csi-addons & ocs-client-op HTH.
Created a new bug https://bugzilla.redhat.com/show_bug.cgi?id=2283653. Moving this bug to verified state. Deployments, daemonsets, csiaddonsnodes are removed. Client operator is not showing as installed in UI "Installed Operators" page.
Please update the RDT flag/text appropriately.
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 (Important: Red Hat OpenShift Data Foundation 4.16.0 security, enhancement & bug fix 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/RHSA-2024:4591
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days