Bug 1986090

Summary: Cannot delete ClusterAutoscaler CR with foreground deletion
Product: OpenShift Container Platform Reporter: Joel Speed <jspeed>
Component: Cloud ComputeAssignee: Joel Speed <jspeed>
Cloud Compute sub component: Cluster Autoscaler QA Contact: sunzhaohua <zhsun>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: aos-bugs
Version: 4.9   
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1991501 (view as bug list) Environment:
Last Closed: 2021-10-18 17:41:12 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: 1991501    

Description Joel Speed 2021-07-26 16:24:13 UTC
Description of problem:

When you delete a ClusterAutoscaler resource with foreground deletion, a finalizer is added to the resource that prevents the GC from removing the resource until all of its dependents are removed from the cluster.

This is currently broken and the resource is never removed.


Version-Release number of selected component (if applicable):


How reproducible:

100%


Steps to Reproduce:
1. create a ClusterAutoscaler
2. oc delete clusterautoscaler default --cascade=foreground

Actual results:

CAO fights against the GC to delete and recreate the deployment rapidly, as such the CA resource exists in perpetuity


Expected results:

CA resource should go away once the deployment is deleted

Additional info:

Comment 2 sunzhaohua 2021-08-02 06:23:59 UTC
verified
clusterversion: 4.9.0-0.nightly-2021-08-01-132055

$ oc create -f ~/data/cao.yaml
clusterautoscaler.autoscaling.openshift.io/default created
$ oc delete clusterautoscaler default --cascade=foreground
clusterautoscaler.autoscaling.openshift.io "default" deleted
$ oc get clusterautoscaler
No resources found

Comment 5 errata-xmlrpc 2021-10-18 17:41:12 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.9.0 bug fix and 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-2021:3759