verified the bug with v4.12.0-125 build # oc delete noobaa noobaa -n openshift-storage Error from server: admission webhook "admissionwebhook.noobaa.io" denied the request: Noobaa cleanup policy is not set, blocking Noobaa deletion # oc get csv --show-labels -n openshift-storage NAME DISPLAY VERSION REPLACES PHASE LABELS mcg-operator.v4.12.0-125.stable NooBaa Operator 4.12.0-125.stable Succeeded operators.coreos.com/mcg-operator.openshift-storage= ocs-operator.v4.12.0-125.stable OpenShift Container Storage 4.12.0-125.stable Succeeded full_version=4.12.0-125,operatorframework.io/arch.amd64=supported,operatorframework.io/arch.ppc64le=supported,operatorframework.io/arch.s390x=supported,operators.coreos.com/ocs-operator.openshift-storage= odf-csi-addons-operator.v4.12.0-125.stable CSI Addons 4.12.0-125.stable Succeeded operators.coreos.com/odf-csi-addons-operator.openshift-storage= odf-operator.v4.12.0-125.stable OpenShift Data Foundation 4.12.0-125.stable Succeeded full_version=4.12.0-125,operatorframework.io/arch.amd64=supported,operatorframework.io/arch.ppc64le=supported,operatorframework.io/arch.s390x=supported,operators.coreos.com/odf-operator.openshift-storage=
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 (Red Hat OpenShift Data Foundation 4.12.0 enhancement 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/RHBA-2023:0551
I still see this problem occurring as described. I'm using an OCP 4.12.12 And using ODP Operator 4.12.4-rhodf, using the stable-4.12 channel.
Hi, Do you mean that you can still delete NooBaa CR and admission controller is _not_ preventing the deletions for you? If it is not preventing the deletion can you please confirm that in the NooBaa CR `cleanupPolicy.allowNoobaaDeletion` is set to `false`? Regards, Utkarsh Srivastava
I'm not sure I understand the question. What I mean is that I can't delete the NooBaa instance, I'm getting the following error back: (I copied from description, It's hard to test because I need to sacrifice an environment I need) "Error from server: admission webhook "admissionwebhook.noobaa.io" denied the request: Noobaa cleanup policy is not set, blocking Noobaa deletion" I'm trying to delete the resource from an ansible script, but that's the same error I get.
Ah, I see. Actually that is in fact the desired behaviour. This BZ was created for us to add this __feature__. We wanted to prevent accidental deletions of NooBaa which results in data loss. If you want to be able to delete it anyway, you will have to set `cleanupPolicy.allowNoobaaDeletion: true` in your NooBaa CR. In order to do so from ansible script, just send a merge patch with previously mentioned attribute set. Once that is in place, noobaa's admission controller will no longer prevent the deletion. Regards, Utkarsh Srivastava
Thanks Utkarsh, I'll try that !