Bug 2023604

Summary: ACL violation when deleting a provisioning-configuration resource
Product: OpenShift Container Platform Reporter: Adina Wolff <awolff>
Component: Bare Metal Hardware ProvisioningAssignee: sdasu
Bare Metal Hardware Provisioning sub component: cluster-baremetal-operator QA Contact: Adina Wolff <awolff>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: aos-bugs, sdasu
Version: 4.10Keywords: Triaged, UpcomingSprint
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-10 16:27:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1991641    

Description Adina Wolff 2021-11-16 06:52:04 UTC
Description of problem:
In OCP 4.10, when attempting to delete provisioning provisioning-configuration, a message is shown 'provisioning.metal3.io "provisioning-configuration" deleted', but the command does not return and the provisioning is not deleted.

Version-Release number of selected component (if applicable):
4.10.0-0.nightly-2021-11-15-034648

How reproducible:
100%

Steps to Reproduce:

In provisionhost, run the following;
[kni@provisionhost-0-0 ~]$ oc delete provisioning provisioning-configuration
provisioning.metal3.io "provisioning-configuration" deleted
^C


Actual results:

command does not stop until it's killed (ctrl+c)
and the following statuses are showsn;
[kni@provisionhost-0-0 ~]$ oc get clusterversion
NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.10.0-0.nightly-2021-11-15-034648   True        False         11h     Error while reconciling 4.10.0-0.nightly-2021-11-15-034648: the cluster operator baremetal is degraded
[kni@provisionhost-0-0 ~]$ ^C
[kni@provisionhost-0-0 ~]$ oc get provisioning
NAME                         AGE
provisioning-configuration   12h
[kni@provisionhost-0-0 ~]$ oc get clusteroperator baremetal
NAME        VERSION                              AVAILABLE   PROGRESSING   DEGRADED   SINCE   MESSAGE
baremetal   4.10.0-0.nightly-2021-11-15-034648   True        True          True       12h     failed to delete metal3 resource: failed to delete validatingwebhook and service: validatingwebhookconfigurations.admissionregistration.k8s.io "baremetal-operator-validating-webhook-configuration" is forbidden: User "system:serviceaccount:openshift-machine-api:cluster-baremetal-operator" cannot delete resource "validatingwebhookconfigurations" in API group "admissionregistration.k8s.io" at the cluster scope
[kni@provisionhost-0-0 ~]$ 


Expected results:
provisioning is deleted successfully. command ends. 
clusteroperator baremetal shows appropriate message (waiting for provisioning)

Comment 3 Adina Wolff 2021-11-24 11:53:07 UTC
Tested on OCP 4.10.0-0.nightly-2021-11-24-030137
provisioning can be deleted:

[kni@provisionhost-0-0 ~]$ oc get provisioning provisioning-configuration -o yaml >prov.yaml
[kni@provisionhost-0-0 ~]$ oc delete provisioning provisioning-configuration
provisioning.metal3.io "provisioning-configuration" deleted
[kni@provisionhost-0-0 ~]$ oc get provisioning provisioning-configuration
Error from server (NotFound): provisionings.metal3.io "provisioning-configuration" not found
[kni@provisionhost-0-0 ~]$

Comment 6 errata-xmlrpc 2022-03-10 16:27:31 UTC
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: OpenShift Container Platform 4.10.3 security 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-2022:0056