OpenShift Container Storage is now OpenShift Data Foundation starting with version 4.9.
Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 8. Troubleshooting and deleting remaining resources during Uninstall
Occasionally some of the custom resources managed by an operator may remain in "Terminating" status waiting on the finalizer to complete, although you have performed all the required cleanup tasks. In such an event you need to force the removal of such resources. If you do not do so, the resources remain in the "Terminating" state even after you have performed all the uninstall steps.
Check if the openshift-storage namespace is stuck in Terminating state upon deletion.
oc get project -n <namespace>
$ oc get project -n <namespace>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Output:
NAME DISPLAY NAME STATUS openshift-storage Terminating
NAME DISPLAY NAME STATUS openshift-storage Terminating
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check for the
NamespaceFinalizersRemaining
andNamespaceContentRemaining
messages in theSTATUS
section of the command output and perform the next step for each of the listed resources.oc get project openshift-storage -o yaml
$ oc get project openshift-storage -o yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output :
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Delete all the remaining resources listed in the previous step.
For each of the resources to be deleted, do the following:
Get the object kind of the resource which needs to be removed. See the message in the above output.
Example :
message: Some content in the namespace has finalizers remaining: cephobjectstoreuser.ceph.rook.io
Here cephobjectstoreuser.ceph.rook.io is the object kind.
Get the Object name corresponding to the object kind.
oc get <Object-kind> -n <project-name>
$ oc get <Object-kind> -n <project-name>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example :
oc get cephobjectstoreusers.ceph.rook.io -n openshift-storage
$ oc get cephobjectstoreusers.ceph.rook.io -n openshift-storage
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output:
NAME AGE noobaa-ceph-objectstore-user 26h
NAME AGE noobaa-ceph-objectstore-user 26h
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Patch the resources.
oc patch -n <project-name> <object-kind>/<object-name> --type=merge -p '{"metadata": {"finalizers":null}}'
$ oc patch -n <project-name> <object-kind>/<object-name> --type=merge -p '{"metadata": {"finalizers":null}}'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example:
oc patch -n openshift-storage cephobjectstoreusers.ceph.rook.io/noobaa-ceph-objectstore-user \ --type=merge -p '{"metadata": {"finalizers":null}}'
$ oc patch -n openshift-storage cephobjectstoreusers.ceph.rook.io/noobaa-ceph-objectstore-user \ --type=merge -p '{"metadata": {"finalizers":null}}'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Output:
cephobjectstoreuser.ceph.rook.io/noobaa-ceph-objectstore-user patched
cephobjectstoreuser.ceph.rook.io/noobaa-ceph-objectstore-user patched
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verify that the openshift-storage project is deleted.
oc get project openshift-storage
$ oc get project openshift-storage
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Output:
Error from server (NotFound): namespaces "openshift-storage" not found
Error from server (NotFound): namespaces "openshift-storage" not found
Copy to Clipboard Copied! Toggle word wrap Toggle overflow If the issue persists, reach out to Red Hat Support.