PR by @mimccune : https://github.com/openshift/machine-api-provider-azure/pull/22
This needs to be backported to OCP 4.10. Currently, blocking ARO (Azure Red Hat OpenShift) 4.10 release due to this bug discovered by ARO SRE during the E2E validation.
i don't think this will problematic to backport, but the team does need to assess the risk. assuming everything is ok, i will clone this bz and make the backport against 4.10 once we have the current PR merged.
Validation1: Gave name more than 80 chars and tried creating machineset [miyadav@miyadav azure]$ oc create -f ms2093044.yaml Error from server (spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"machine.openshift.io/cluster-api-cluster":"miyadav-0606az-2hrxz", "machine.openshift.io/cluster-api-machineset":"miyadav-0606az-2hrxz-worker-northcentralus-miyadav-miyadav-0606az-2hrxz-miyadav-0606az-2hrxz"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: could not convert label selector to selector: values[0][machine.openshift.io/cluster-api-machineset]: Invalid value: "miyadav-0606az-2hrxz-worker-northcentralus-miyadav-miyadav-0606az-2hrxz-miyadav-0606az-2hrxz": must be no more than 63 characters): error when creating "ms2093044.yaml": admission webhook "validation.machineset.machine.openshift.io" denied the request: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"machine.openshift.io/cluster-api-cluster":"miyadav-0606az-2hrxz", "machine.openshift.io/cluster-api-machineset":"miyadav-0606az-2hrxz-worker-northcentralus-miyadav-miyadav-0606az-2hrxz-miyadav-0606az-2hrxz"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: could not convert label selector to selector: values[0][machine.openshift.io/cluster-api-machineset]: Invalid value: "miyadav-0606az-2hrxz-worker-northcentralus-miyadav-miyadav-0606az-2hrxz-miyadav-0606az-2hrxz": must be no more than 63 characters If I keep the name less than or equal to 63 chars I get the machinesets created , also attaching the availability sets created , they have the concatinated string '-as' in them , when the machineset did not had the name of cluster it added along with '-as' Please have a look once - [miyadav@miyadav azure]$ oc get machines NAME PHASE TYPE REGION ZONE AGE 2hrxz-worker-test12345678912345678912345678912345678912345g229l Provisioned Standard_D4s_v3 northcentralus 5m36s miyadav-0606az-2hrxz-master-0 Running Standard_D8s_v3 northcentralus 71m miyadav-0606az-2hrxz-master-1 Running Standard_D8s_v3 northcentralus 71m miyadav-0606az-2hrxz-master-2 Running Standard_D8s_v3 northcentralus 71m miyadav-0606az-2hrxz-worker-northcentralus-vb9l5 Running Standard_D4s_v3 northcentralus 63m miyadav-0606az-2hrxz-worker-q-wcjg2 Running Standard_D4s_v3 northcentralus 17m miyadav-0606az-2hrxz-worker-qwertyuioppppppppppppppppppppp4xtc5 Deleting Standard_D4s_v3 northcentralus 19m miyadav-0606az-2hrxz-worker-qwertyuiopppppppppppppppppppppvcjdk Running Standard_D4s_v3 northcentralus 19m [miyadav@miyadav azure]$ oc get machineset NAME DESIRED CURRENT READY AVAILABLE AGE 2hrxz-worker-test123456789123456789123456789123456789123456789 1 1 1 1 11m miyadav-0606az-2hrxz-worker-northcentralus 1 1 1 1 77m miyadav-0606az-2hrxz-worker-q 1 1 1 1 22m miyadav-0606az-2hrxz-worker-qwertyuioppppppppppppppppppppppppp 1 1 1 1 24m [miyadav@miyadav azure]$ Additional info: LGTM , attaching snaps of availablity sets.
[miyadav@miyadav azure]$ oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.11.0-0.nightly-2022-06-04-014713 True False 61m Cluster version is 4.11.0-0.nightly-2022-06-04-014713 Summarising steps : Create machineset with containing cluster name ex above miyadav-0606az-2hrxz-worker-q Expected and Actual: Availabity set will be created with appending '-as' to the machineset name and the clustername is not added to it. Create machineset without cluster name ex-above 2hrxz-worker-test123456789123456789123456789123456789123456789 Actual and expected : Clustername prefixed to avalabilitysets and suffixed with '-as' Additionally cluster should be created in region without availability zones refer - https://azure.microsoft.com/en-us/global-infrastructure/geographies/#geographies
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 (Important: OpenShift Container Platform 4.11.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-2022:5069