Hide Forgot
Description of problem: Failed to delete machineautoscaler if related machineset doesn't exist. Version-Release number of selected component (if applicable): clusterversion: 4.0.0-0.alpha-2019-01-24-003716 How reproducible: Always Steps to Reproduce: 1. Create a machineautoscaler which targets a node group zhsun-worker-us-east-2c apiVersion: autoscaling.openshift.io/v1alpha1 kind: MachineAutoscaler metadata: finalizers: - machinetarget.autoscaling.openshift.io name: autoscale-us-east-2c namespace: openshift-cluster-api spec: maxReplicas: 3 minReplicas: 1 scaleTargetRef: apiVersion: cluster.k8s.io/v1alpha1 kind: MachineSet name: worker-us-east-2a status: {} 2. Delete machineset zhsun-worker-us-east-2c 3. Delete machineautoscaler 4. Check logs Actual results: Machineautoscaler couldn't be deleted. $ oc get machineautoscaler NAME REF KIND REF NAME MIN MAX AGE autoscale-us-east-2a MachineSet zhsun-worker-us-east-2a 1 2 1h autoscale-us-east-2b MachineSet zhsun-worker-us-east-2b 1 2 1h autoscale-us-east-2c MachineSet zhsun-worker-us-east-2c 1 2 3h $ oc get machineset NAME DESIRED CURRENT READY AVAILABLE AGE zhsun-worker-us-east-2a 1 1 1 1 6h zhsun-worker-us-east-2b 1 1 1 1 6h zhsun-worker-us-east-2c 1 1 1 1 6h $ oc delete machineset zhsun-worker-us-east-2c machineset.cluster.k8s.io "zhsun-worker-us-east-2c" deleted $ oc delete machineautoscaler autoscale-us-east-2c machineautoscaler.autoscaling.openshift.io "autoscale-us-east-2c" deleted ^C $ oc logs -f cluster-autoscaler-operator-8684bc9f5c-xnb57 I0123 10:00:30.193001 1 machineautoscaler_controller.go:102] Reconciling MachineAutoscaler openshift-cluster-api/autoscale-us-east-2c E0123 10:00:30.197162 1 machineautoscaler_controller.go:123] Error getting target: machinesets.cluster.k8s.io "zhsun-worker-us-east-2c" not found Expected results: Machineautoscaler could be deleted. Additional info:
This should be fixed by: https://github.com/openshift/cluster-autoscaler-operator/pull/33 Not-found errors no longer cause the finalizer to fail.
Verified $ oc delete machineset zhsun-worker-us-east-2a-a machineset.cluster.k8s.io "zhsun-worker-us-east-2a-a" deleted $ oc get machineautoscaler NAME REF KIND REF NAME MIN MAX AGE autoscale-us-east-2a MachineSet zhsun-worker-us-east-2a-a 1 5 35s $ oc delete machineautoscaler autoscale-us-east-2a machineautoscaler.autoscaling.openshift.io "autoscale-us-east-2a" deleted
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, 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-2019:0758