IBM Maximo: Troubleshooting - Unable to Delete a Project (Namespace)

From Wiki

It is not possible to delete a project, even when using force deletion.

Check

Check what resources still exist inside the namespace.

Run the following command to export the namespace definition to JSON:

oc get namespace $NAMESPACE -o json > temp.json

Inspect the end of the generated file, especially the spec section.

In some cases, the deletion is blocked by a controller or operator due to a finalizer.

Example of a blocking finalizer:

...
finalizers:
  - truststore-mgr.ibm.com/finalizer
...

Immediate Actions to Resolve

Start from the lowest object in the resource hierarchy and remove finalizers one by one.

After all blocking finalizers are removed, the project deletion should complete successfully.

Remove the finalizer from the offending object:

DEFECT_OBJECT=truststores/sls-truststore
oc patch -n $NAMESPACE $DEFECT_OBJECT -p '{"metadata":{"finalizers":[]}}' --type=merge

Remove finalizers from the namespace itself:

oc get namespace $NAMESPACE -o json | jq '.spec = {"finalizers":[]}' > temp.json

After applying these changes, retry deleting the namespace.

See Also