https://github.com/openshift/cluster-api-provider-aws/blob/master/pkg/actuators/machineset/controller.go#L114 We should return nil, not error, so we don't requeue. It's not like the type is going to magically show up later. We should log a message about it. Must do this ^^^ Can do the following later: Potentially we could set an annotation as well to inform the user on the machineset object itself, TBD if that's desirable. Also, we can instruct the user to add the annotations themselves so they don't have to wait until the next release / some future time to take advantage themselves.
To whoever ends up implementing this, we should check for the same issue in GCP and Azure as well Marking for 4.8 as this is a relatively simple fix and we should be able to get it done
Checked all providers, seems only AWS and Azure are currently affected. Posted fix for both.
Validated for aws cluster on : Steps : 1. create a machineset by copying existing machinesets provide invalid instance type 2.create cas using below yaml apiVersion: "autoscaling.openshift.io/v1" kind: "ClusterAutoscaler" metadata: name: "default" spec: scaleDown: enabled: true delayAfterAdd: 10s delayAfterDelete: 10s delayAfterFailure: 10s 3. create machine autoscaler using below yaml , provide the machineset with having invalid instance type to this apiVersion: "autoscaling.openshift.io/v1beta1" kind: "MachineAutoscaler" metadata: name: mas1 namespace: "openshift-machine-api" spec: minReplicas: 1 maxReplicas: 4 scaleTargetRef: apiVersion: machine.openshift.io/v1beta1 kind: MachineSet name: miyadav-aws-15-sxwkl-worker-invalid Monitor machine-controller logs machine-controller logs : . . . E0415 09:35:29.465499 1 controller.go:115] Unable to set scale from zero annotations: unknown instance type: %sm5.invalid E0415 09:35:29.465515 1 controller.go:116] Autoscaling from zero will not work. To fix this, manually populate machine annotations for your instance type: %v[machine.openshift.io/vCPU machine.openshift.io/memoryMb machine.openshift.io/GPU] I0415 09:35:29.466144 1 recorder.go:98] controller-runtime/manager/events "msg"="Warning" "message"="Failed to set autoscaling from zero annotations, instance type unknown" "object"={"kind":"MachineSet","namespace":"openshift-machine-api","name":"miyadav-aws-15-sxwkl-worker-invalid","uid":"3d43cb5f-d28a-45ae-9616-0eae26e11dde","apiVersion":"machine.openshift.io/v1beta1","resourceVersion":"53367"} "reason"="FailedUpdate" . . .
Additional info along with previous comment#4 the log appears during creation of each object ( machineset , cas , mas)
On same build validated for GCP and Azure GCP has different log messages than azure and gcp Additional info : GCP - "....To fix this, manually populate machine annotations for your instance type.." Azure and aws : "....Failed to set autoscaling from zero annotations, instance type unknown..." There are no requeue logs after these messages Moved to VERIFIED , based on testing data.
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.8.2 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:2438