Bug 2084580 - [4.10] No cluster name sanity validation - cluster name with a dot (".") character
Summary: [4.10] No cluster name sanity validation - cluster name with a dot (".") char...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.10
Hardware: All
OS: All
low
medium
Target Milestone: ---
: 4.11.0
Assignee: Aditya Narayanaswamy
QA Contact: jima
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-12 13:08 UTC by Radek Cegan
Modified: 2022-08-10 11:11 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Components like haproxy failed if the cluster name had a "." in it Consequence: cluster in failing state Fix: Added check for validation for "." Result: user warned ahead of installation
Clone Of:
Environment:
Last Closed: 2022-08-10 11:11:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer pull 5931 0 None open Bug 2084580: Add check to validate cluster name for dots 2022-05-19 14:52:01 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:11:42 UTC

Comment 1 Rafael Fonseca 2022-05-19 15:10:03 UTC
Moving assignee to the dev actually doing the work.

Comment 2 jima 2022-05-23 05:22:35 UTC
Reproduced on 4.11.0-0.nightly-2022-05-20-213928:

cluster name is jima.test0523, ipi-on-vsphere installation failed at bootstrap stage.
Check keepalived conf on master node, cluster name is parsed as jima.
[root@jima-test0523-rtwrx-master-1 ~]# cat /etc/keepalived/keepalived.conf 
global_defs {
......
vrrp_instance jima_API {
    state BACKUP
    interface ens192
    virtual_router_id 204
    priority 40
    advert_int 1
......
vrrp_instance jima_INGRESS {
    state BACKUP
    interface ens192
    virtual_router_id 155
    priority 20
    advert_int 1
...

Built image including installer PR https://github.com/openshift/installer/pull/5931 from cluster-bot, verified the fix and passed.
$ ./openshift-install version
./openshift-install 4.11.0-0.ci.test-2022-05-23-031403-ci-ln-9w030tt-latest
built from commit 5ca13c11a5df2c45a5911990cfbdfed76b3046c0
release image registry.build01.ci.openshift.org/ci-ln-9w030tt/release@sha256:87dc94626b82085ce0043e5d3238c0bb268726f2e823a00e1ccac1396a913845
release architecture amd64

Prepare install-config yaml file and set clustername as "jima.test":
$ ./openshift-install create manifests --dir ipi
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: "jima.test": cluster name must not contain '.' 

Install cluster in interactive mode, input Cluster Name as "jima.test"
$ ./openshift-install create cluster --dir ipi1
? SSH Public Key /home/jima/.ssh/openshift-qe.pub
? Platform vsphere
? vCenter vcenter.sddc-xxxx.vmwarevmc.com
? Username xxxx
? Password [? for help] **************
INFO Connecting to vCenter vcenter.sddc-xxxx.vmwarevmc.com 
INFO Defaulting to only available datacenter: SDDC-Datacenter 
INFO Defaulting to only available cluster: Cluster-1 
? Default Datastore WorkloadDatastore
? Network qe-segment
? Virtual IP Address for API 192.169.31.2
? Virtual IP Address for Ingress 192.169.31.3
? Base Domain qe.devcluster.openshift.com
X Sorry, your reply was invalid: cluster name must not contain '.'
? Cluster Name

Comment 5 jima 2022-06-07 03:24:00 UTC
since there are some changes after pre-merge verification in Comment 2, verified again on 4.11.0-0.nightly-2022-05-18-171831 and passed.

create install-conifg.yaml file and set clustername as "bug2084580.test"
vSphere:
$ ./openshift-install create manifests --dir ipi/
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: "bug2084580.test": cluster name must not contain '.' 

ipi-on-baremetal:
$ ./openshift-install create manifests --dir ipi-baremetal/
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: "bug2084580.test": cluster name must not contain '.'

Comment 7 errata-xmlrpc 2022-08-10 11:11:30 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


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