Bug 2022171

Summary: Unable to run openshift-install with a vcenter hostname that begins with a numeric character
Product: OpenShift Container Platform Reporter: OpenShift BugZilla Robot <openshift-bugzilla-robot>
Component: InstallerAssignee: Aditya Narayanaswamy <anarayan>
Installer sub component: openshift-installer QA Contact: jima
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: mstaeble
Version: 4.8   
Target Milestone: ---   
Target Release: 4.8.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
If the vcenter hostname begins with a numeric character, the installer validates it as invalid but it is possible to create a vcenter host with a numeric character. Relaxing the validation to allow for numeric characters.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-05 16:11:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2022172    
Bug Blocks:    

Description OpenShift BugZilla Robot 2021-11-11 00:46:34 UTC
+++ This bug was initially created as a clone of Bug #2021607 +++

Version:

$ openshift-install version
4.8.0 and up 

Platform:

#Please specify the platform type: aws, libvirt, openstack or baremetal etc.
vsphere 

Please specify:
IPI (automated install with `openshift-install`. If you don't know, then it's IPI)


What happened?

When creating a cluster / manifests with a vcenter hostname that begins with a number, validation fails with the following:

DEBUG       Loading Platform...
FATAL failed to fetch Master Machines: failed to load asset "Install Config": invalid "install-config.yaml" file: platform.vsphere.vCenter: Invalid value: "1your.vcenter.server": must be the domain name or IP address of the vCenter

What did you expect to happen?
cluster / manifests to be created succesfully

How to reproduce it (as minimally and precisely as possible)? Use the sample yaml from the documentation with a vcenter name that begins with a number

/usr/local/bin/openshift-install-4.8.17 create manifests --dir ~/ocp4/vtest --log-level=debug

Anything else we need to know?
This seems to be discussed here: https://github.com/openshift/installer/issues/5126

--- Additional comment from mstaeble on 2021-11-10 14:25:24 UTC ---

Setting the severity to high as this affects all users trying to install to a vCenter that starts with a number.

Comment 3 jima 2021-12-17 01:32:30 UTC
verified on 4.8.0-0.nightly-2021-12-16-211324 and passed, so move bug to VERIFIED.

Create install-config.yaml file and set platform.vsphere.vCenter value as "251.vmwarevmc.com", "openshift-installer create cluster" failed as expected, since the value is flake, and unable to access.

$ ./openshift-install create manifests --dir ipi/
INFO Consuming Install Config from target directory 

$ ./openshift-install create cluster --dir ipi
INFO Consuming Master Machines from target directory 
INFO Consuming Common Manifests from target directory 
INFO Consuming OpenShift Install (Manifests) from target directory 
INFO Consuming Worker Machines from target directory 
INFO Consuming Openshift Manifests from target directory 
INFO Obtaining RHCOS image file from 'https://rhcos-redirector.apps.art.xq1c.p1.openshiftapps.com/art/storage/releases/rhcos-4.8/48.84.202109241901-0/x86_64/rhcos-48.84.202109241901-0-vmware.x86_64.ova?sha256=' 
INFO Creating infrastructure resources...         
ERROR                                              
ERROR Error: error setting up new vSphere SOAP client: Post "https://251.vmwarevmc.com/sdk": Service Unavailable 
ERROR                                              
ERROR   on ../../../../tmp/openshift-install-072610907/main.tf line 6, in provider "vsphere": 
ERROR    6: provider "vsphere" {                   
ERROR                                              
ERROR                                              
ERROR Failed to read tfstate: open /tmp/openshift-install-072610907/terraform.tfstate: no such file or directory 
FATAL failed to fetch Cluster: failed to generate asset "Cluster": failed to create cluster: failed to apply Terraform: failed to complete the change

Comment 6 errata-xmlrpc 2022-01-05 16:11:41 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 (OpenShift Container Platform 4.8.25 bug fix 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/RHBA-2021:5209