Bug 1819461 - install fails to bootstrap when region has uppercase letters
Summary: install fails to bootstrap when region has uppercase letters
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.5.0
Assignee: Fabiano Franz
QA Contact: Etienne Simard
URL:
Whiteboard:
Depends On:
Blocks: 1823918
TreeView+ depends on / blocked
 
Reported: 2020-03-31 21:44 UTC by Matthew Staebler
Modified: 2020-07-13 17:24 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1823918 (view as bug list)
Environment:
Last Closed: 2020-07-13 17:24:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer pull 3421 0 None closed Bug 1819461: validate Azure regions 2020-10-22 22:06:14 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:24:49 UTC

Description Matthew Staebler 2020-03-31 21:44:51 UTC
When the region has uppercase letters, the worker machinesets created by the installer also use those uppercase letters for the name. This fails validation when the bootstrap machine tries to create the machinesets in the cluster.

install-config.yaml
---
apiVersion: v1
metadata:
  name: magchen-test
baseDomain: dev09.az.red-chesterfield.com
controlPlane:
  hyperthreading: Enabled
  name: master
  replicas: 3
  platform:
    azure:
      osDisk:
        diskSizeGB: 128
      type:  Standard_D2s_v3
compute:
- hyperthreading: Enabled
  name: worker
  replicas: 3
  platform:
    azure:
      type:  Standard_D2s_v3
      osDisk:
        diskSizeGB: 128
      zones:
      - "1"
networking:
  clusterNetwork:
  - cidr: 10.128.0.0/14
    hostPrefix: 23
  machineCIDR: 10.0.0.0/16
  networkType: OpenShiftSDN
  serviceNetwork:
  - 172.30.0.0/16
platform:
  azure:
    baseDomainResourceGroupName: openshift4-terraform
    region: CentralUS
pullSecret: xxx
sshKey: xxx


Bootstrap log
---
Mar 31 19:04:59 az-hive03-t6wcl-bootstrap bootkube.sh[2790]: [#7456] failed to create some manifests:
Mar 31 19:04:59 az-hive03-t6wcl-bootstrap bootkube.sh[2790]: "99_openshift-cluster-api_worker-machineset-0.yaml": failed to create machinesets.v1beta1.machine.openshift.io/az-hive03-t6wcl-worker-CentralUS1 -n openshift-machine-api: MachineSet.machine.openshift.io "az-hive03-t6wcl-worker-CentralUS1" is invalid: metadata.name: Invalid value: "az-hive03-t6wcl-worker-CentralUS1": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
Mar 31 19:04:59 az-hive03-t6wcl-bootstrap bootkube.sh[2790]: Failed to create "99_openshift-cluster-api_worker-machineset-0.yaml" machinesets.v1beta1.machine.openshift.io/az-hive03-t6wcl-worker-CentralUS1 -n openshift-machine-api: MachineSet.machine.openshift.io "az-hive03-t6wcl-worker-CentralUS1" is invalid: metadata.name: Invalid value: "az-hive03-t6wcl-worker-CentralUS1": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')

Comment 6 Etienne Simard 2020-04-14 19:51:35 UTC
Verified with: ./openshift-install v4.5.0
built from commit 47887c922e693fd4a149dae1568d04628bbf40d3
release image registry.svc.ci.openshift.org/ocp/release@sha256:6ed77f5150b16a6654dda7a18fb8de912aa5a70015d60e81e6688b5d5fbf84d8


I first created an install-config and changed the region to "CentralUS" before running the installer.

~~~
$ ./openshift-install create cluster --dir ./test1upper --log-level debug
DEBUG OpenShift Installer v4.5.0                   
DEBUG Built from commit 47887c922e693fd4a149dae1568d04628bbf40d3 
DEBUG Fetching Metadata...                         
DEBUG Loading Metadata...                          
DEBUG   Loading Cluster ID...                      
DEBUG     Loading Install Config...                
DEBUG       Loading SSH Key...                     
DEBUG       Using SSH Key loaded from state file   
DEBUG       Loading Base Domain...                 
DEBUG         Loading Platform...                  
DEBUG         Using Platform loaded from state file 
DEBUG       Using Base Domain loaded from state file 
DEBUG       Loading Cluster Name...                
DEBUG         Loading Base Domain...               
DEBUG         Loading Platform...                  
DEBUG       Using Cluster Name loaded from state file 
DEBUG       Loading Pull Secret...                 
DEBUG       Using Pull Secret loaded from state file 
DEBUG       Loading Platform...                    
INFO Credentials loaded from file "/home/esimard/.azure/osServicePrincipal.json" 
FATAL failed to fetch Metadata: failed to load asset "Install Config": platform.azure.region: Invalid value: "CentralUS": region "CentralUS" is not valid or not available for this account, did you mean "centralus"? 
~~~

Comment 8 errata-xmlrpc 2020-07-13 17:24:27 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, 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-2020:2409


Note You need to log in before you can comment on or make changes to this bug.