Have opened this BZ to do the rook changes required for this issue.
@Yati Is this planned for 4.9?
Yes. Will be working on this soon.
@ypadia please be aware that there is now a design document in upstream Rook related to blocking uninstall/deletion when other resources exist (link below). When working on this, be sure to add this to the design as a first step so that we can evaluate how best to implement the feature in Rook. https://github.com/rook/rook/blob/master/design/ceph/resource-dependencies.md
Thanks, @brgardne.Will add the details to the design doc.
As per the current changes in rook, it is required to delete the pool, before deleting the cluster and the pool deletion requires that there are no images/snapshots in the cluster. Hence, I don't see any need to add the check for the presence of the PV or snapshot in the cluster. Even the PV check present in rook is not required. To my knowledge, this feature has been introduced in 4.9 and hence this bug no more exists. @mrajanna do comment if I am missing anything. @brgardne and @tnielsen would like to get a review from your end too.
That's good to hear, Yati. I think we might want to mention in Rook upstream docs that the forceful uninstall option will also continue with uninstall if volume snapshots exist. I'm not sure if we should update our downstream OCS/ODF docs as well, as I'm not as familiar with those docs.
If we don't require a change here, this bug can be moved to ON_QA for the verification. We can mention this in the uninstall documentation for Downstream. Neha, who can help Yati with the documentation?
@muagarwa and @brgardne for upstream I have checked it. But would like to try the same with OCS4.9 before moving it on QA. Will update the bug tomorrow.
Moving to ON_QA after discussing with Yati
Created two PVCS --------------------------------------------------------------------------------------- $ oc get pvc -A | grep test default cephfs-test-pvc Bound pvc-d631136d-2997-4682-ad61-898d917c3e3d 1Gi RWO ocs-storagecluster-cephfs 63s default rbd-test-pvc Bound pvc-96f47692-1e7a-439c-9714-22816bc76497 1Gi RWO ocs-storagecluster-ceph-rbd 119s Created VS for each PVC ------------------------------------------------------------------------------------- $ oc get volumesnapshot -A NAMESPACE NAME READYTOUSE SOURCEPVC SOURCESNAPSHOTCONTENT RESTORESIZE SNAPSHOTCLASS SNAPSHOTCONTENT CREATIONTIME AGE default cephfs-test-pvc-snapshot true cephfs-test-pvc 1Gi ocs-storagecluster-cephfsplugin-snapclass snapcontent-3c30adc7-f3f2-4bb0-91fe-934a08d885eb 2m32s 2m32s default rbd-test-pvc-snapshot true rbd-test-pvc 1Gi ocs-storagecluster-rbdplugin-snapclass snapcontent-f741536f-9439-452d-a641-a4d0688a94a4 3m2s 3m3s Deleted the PVCs -------------------------------------------------------------------------------- [asandler@fedora ~]$ oc delete pvc cephfs-test-pvc persistentvolumeclaim "cephfs-test-pvc" deleted [asandler@fedora ~]$ oc delete pvc rbd-test-pvc persistentvolumeclaim "rbd-test-pvc" deleted Deleted the storage cluster -------------------------------------------------------------------------------------- $ oc delete -n openshift-storage storagecluster --all --wait=true And it got stuck on deleting : $ oc get storagecluster -A NAMESPACE NAME AGE PHASE EXTERNAL CREATED AT VERSION openshift-storage ocs-storagecluster 59m Deleting 2021-09-24T06:34:45Z 4.9.0 Deleted the volumesnapshots ------------------------------------------------------------------ $ oc get volumesnapshot -A NAMESPACE NAME READYTOUSE SOURCEPVC SOURCESNAPSHOTCONTENT RESTORESIZE SNAPSHOTCLASS SNAPSHOTCONTENT CREATIONTIME AGE default cephfs-test-pvc-snapshot true cephfs-test-pvc 1Gi ocs-storagecluster-cephfsplugin-snapclass snapcontent-3c30adc7-f3f2-4bb0-91fe-934a08d885eb 16m 16m default rbd-test-pvc-snapshot true rbd-test-pvc 1Gi ocs-storagecluster-rbdplugin-snapclass snapcontent-f741536f-9439-452d-a641-a4d0688a94a4 17m 17m [asandler@fedora ~]$ oc delete volumesnapshot cephfs-test-pvc-snapshot volumesnapshot.snapshot.storage.k8s.io "cephfs-test-pvc-snapshot" deleted [asandler@fedora ~]$ oc delete volumesnapshot rbd-test-pvc-snapshot volumesnapshot.snapshot.storage.k8s.io "rbd-test-pvc-snapshot" deleted [asandler@fedora ~]$ oc get volumesnapshot -A No resources found And storagecluster deletion completed ------------------------------------------------------------- $ oc get storagecluster -A No resources found moving to verified
*** Bug 1893747 has been marked as a duplicate of this bug. ***
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 (Moderate: Red Hat OpenShift Data Foundation 4.9.0 enhancement, security, and 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-2021:5086