Skip to content

Commit

Permalink
storagecluster: delete cephCluster before ceph resources
Browse files Browse the repository at this point in the history
rook ceph requires that the deletion request for the cephCluster should
come before the delete request for the other ceph resources. Not doing
so can result in some of the ceph resources being stuck in deletion
phase forever.

Deleting the cephCluster first also helps in the cases where the
CephCluster has failed to install.

Signed-off-by: Raghavendra Talur <[email protected]>
  • Loading branch information
raghavendra-talur committed Oct 19, 2020
1 parent fd2184d commit f4937f2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/controller/storagecluster/uninstall_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,27 +342,27 @@ func (r *ReconcileStorageCluster) deleteResources(sc *ocsv1.StorageCluster, reqL
return err
}

err = r.deleteCephObjectStoreUsers(sc, reqLogger)
err = r.deleteCephCluster(sc, reqLogger)
if err != nil {
return err
}

err = r.deleteCephObjectStores(sc, reqLogger)
err = r.deleteCephObjectStoreUsers(sc, reqLogger)
if err != nil {
return err
}

err = r.deleteCephFilesystems(sc, reqLogger)
err = r.deleteCephObjectStores(sc, reqLogger)
if err != nil {
return err
}

err = r.deleteCephBlockPools(sc, reqLogger)
err = r.deleteCephFilesystems(sc, reqLogger)
if err != nil {
return err
}

err = r.deleteCephCluster(sc, reqLogger)
err = r.deleteCephBlockPools(sc, reqLogger)
if err != nil {
return err
}
Expand Down

0 comments on commit f4937f2

Please sign in to comment.