Azure Red Hat OpenShift (ARO) cluster creation failed | The provided cluster name exceeds the maximum cluster name length
Environment
- Azure Red Hat OpenShift (ARO) 4.10
- OpenShift Managed (Azure) 4.10
Issue
Disclaimer: Links contained herein to external website(s) are provided for convenience only. Red Hat has not reviewed the links and is not responsible for the content or its availability. The inclusion of any link to an external website does not imply endorsement by Red Hat of the website or their entities, products or services. You agree that Red Hat is not responsible or liable for any loss or expenses that may result due to your use of (or reliance on) the external site or content.
OpenShift 4.10 release in ARO affects a cluster and new machineset creation with long cluster names in Azure regions without Availability Zones (non-zonal regions). In these regions, Openshfit 4.10 attempts to create an Azure Availability Set which results in a failure passing the validation in Azure API (limited to 80 characters for the Availability Set Name).
Non-zonal regions affected:
australiacentral
australiacentral2
australiasoutheast
brazilsoutheast
canadaeast
japanwest
northcentralus
norwaywest
southindia
switzerlandwest
uaenorth
ukwest
westcentralus
westus
ARO cluster creation error:
The provided cluster name '{cluster-name}' exceeds the maximum cluster name length of '{max-length}'
Azure API error:
The entity name 'availabilitySetName' is invalid according to its validation rule
Resolution
New clusters:
A cluster creation failure resulting in “The provided cluster name '{cluster-name}' exceeds the maximum cluster name length of '{max-length}'” error can be prevented by using a shorter cluster name until a permanent bugfix is released.
The ARO cluster name is temporarily limited to 19 characters long in non-zonal Azure regions.
Existing cluster upgrades from 4.9 => 4.10:
Any new post-upgrade machinesets must be created with names that match expected Azure rules. The cluster name portion should not exceed 19 characters (see the calculation of the maximum Availability Set name below).
Root Cause
In OCP 4.10 for non-zonal regions, VMs will be created with Availability Sets. OCP 4.10 Azure Availability Set functionality fails to deploy Availability Sets for Machine Sets either during a cluster creation or when replacing Machine Sets due to the 80 character limit in Availability Set Name in Azure.
A. The complete breakdown of the Availability Set Name that must not be longer than 80 characters:
<cluster-name>-xxxxx_<cluster-name>-xxxxx-worker-<region>-as
- cluster-name: The name of the ARO resource provided in:
/subscriptions/xxxx/resourceGroups/myResourceGroup/providers/Microsoft.RedHatOpenShift/openshiftCluster/cluster-name - xxxxx: The infraID of the ARO cluster.
- region: the Azure region in which the cluster is deployed, all lowercase concatenated.
For example:
US West 3: uswest3
East US 2: eastus2
Australia South East: australiasoutheast
B. Click here to check the list of non-affected regions that support Availability Zones.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments