Bug 2094694

Summary: [Nutanix] No cluster name sanity validation - cluster name with a dot (".") character
Product: OpenShift Container Platform Reporter: gaoshang <sgao>
Component: InstallerAssignee: Nobody <nobody>
Installer sub component: openshift-installer QA Contact: gaoshang <sgao>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: sid.shukla
Version: 4.11   
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-10 11:16:53 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 gaoshang 2022-06-08 08:18:23 UTC
Version:

$ openshift-install version
./openshift-install 4.11.0-0.nightly-2022-06-06-025509
built from commit 7edd680768c4d58a72dea0d3f49dbd7cbc1fa03c
release image registry.ci.openshift.org/ocp/release@sha256:e7e44a81f41823198bbfa21129cd00584714c346e7c9355c56e433bfbc52d452
release architecture amd64

Platform:

Nutanix

Please specify:

IPI

What happened?

Installation fails when the cluster name contains a dot ("."), there is however no check during the installation to notify about having dot in the ".metadata.name" field in install-config.yaml

What did you expect to happen?

Interrupting the installation and notifying about not valid cluster name (assuming there are no dots allowed in cluster name as this causes VRRP issues in keepalived)

How to reproduce it (as minimally and precisely as possible)?

put a dot to ".metadata.name" in install-config 
e.g. 
metadata:
  name: nutanix.test

Comment 1 gaoshang 2022-06-08 08:21:08 UTC
Note,this bug origin from Bug 2084580 - [4.10] No cluster name sanity validation - cluster name with a dot (".") character.

Comment 2 Sid Shukla 2022-06-09 16:55:16 UTC
Thanks for raising this; We'll make a bugfix with explicit validation for the character.

Comment 5 gaoshang 2022-06-23 03:43:06 UTC
This bug has been verified on OCP 4.11.0-0.nightly-2022-06-22-190830 and passed, thanks.


Step:
1, when creating install-config with cluster name contains a dot (".")

# ./openshift-install create install-config --dir cluster
...
? Virtual IP Address for API 10.0.132.20
? Virtual IP Address for Ingress 10.0.132.21
? Base Domain qe.devcluster.openshift.com
X Sorry, your reply was invalid: cluster name must not contain '.'

2, when install-config.yaml with cluster name contains a dot (".")
# ./openshift-install create manifests --dir cluster
ERROR failed to fetch Master Machines: failed to load asset "Install Config": failed to create install config: invalid "install-config.yaml" file: metadata.name: Invalid value: "sgao.test": cluster name must not contain '.'

Comment 8 errata-xmlrpc 2022-08-10 11:16:53 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 (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