Bug 1874248

Summary: Include validation for vcenter host in the install-config
Product: OpenShift Container Platform Reporter: Jatan Malde <jmalde>
Component: InstallerAssignee: Abhinav Dahiya <adahiya>
Installer sub component: openshift-installer QA Contact: jima
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: high CC: adahiya, jima, mstaeble
Version: 4.5   
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Upper-case letters included in vCenter host name. Consequence: Failure late in installations while waiting for cluster to complete. Fix: Installer validates that the vCenter host name does not contain upper-case letters. Result: Installation fails early during validation.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-24 15:17:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jatan Malde 2020-08-31 19:45:06 UTC
Description of problem:

As a part of the following bugzilla 'https://bugzilla.redhat.com/show_bug.cgi?id=1821945' and fix, I do see the fix in ocp4.5 but the user still would be able to include the vcenter hostname in the install-config as capital letters. 

We can avoid this by prompting an error and requesting the user to include the vcenter hostname in lower case. 


Version-Release number of the following components:
rpm -q openshift-ansible
rpm -q ansible
ansible --version

How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual results:
Please include the entire output from the last TASK line through the end of output if an error is generated

Expected results:

Additional info:
Please attach logs from ansible-playbook with the -vvv flag

Comment 2 Scott Dodson 2020-09-09 20:32:39 UTC
This is not a regression from 4.5 so therefore not a release blocker. Moving to 4.7 and we'll consider backports as appropriate.

Comment 5 jima 2020-10-23 10:39:35 UTC
@adahiya, QE don't have a vsphere with uppercase hostname, and could not verify update during installation.
Do you have any suggestion to verify this bug?

Comment 6 Abhinav Dahiya 2020-10-23 15:56:50 UTC
@jima the installer will reject input using install-config.yaml that has Uppercase letters in vCenter address. I don't think you need an actual vCenter that has capital letters in it name.

```
...
platform:
  vsphere:
    vCenter: MyVCenter.example.com
...
```

will not be accepted as valid input because of upper case letters. Hopefully that helps?

Comment 7 jima 2020-10-27 03:59:55 UTC
@adahiya, thanks for your suggestion.
Set vCenter's name containing upper case letters in install-config.yaml, and create cluster using this configure file, the error is shown that vCenter name must be all lower case, move bug to VERIFIED.

# ./openshift-install create cluster --dir ipi --log-level debug
DEBUG OpenShift Installer 4.7.0-0.nightly-2020-10-26-152308 
DEBUG Built from commit de62b01d451857d942ac41dcfdad9385856fde9e 
DEBUG Fetching Metadata...                         
DEBUG Loading Metadata...                          
DEBUG   Loading Cluster ID...                      
DEBUG     Loading Install Config...                
DEBUG       Loading SSH Key...                     
DEBUG       Loading Base Domain...                 
DEBUG         Loading Platform...                  
DEBUG       Loading Cluster Name...                
DEBUG         Loading Base Domain...               
DEBUG         Loading Platform...                  
DEBUG       Loading Pull Secret...                 
DEBUG       Loading Platform...                    
FATAL failed to fetch Metadata: failed to load asset "Install Config": invalid "install-config.yaml" file: platform.vsphere.vCenter: Invalid value: "vcenter.SDDC-TEST.vmwarevmc.com": must be all lower case

Comment 10 errata-xmlrpc 2021-02-24 15:17:02 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 (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement 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-2020:5633