Bug 1777232
| Summary: | The naming rule of cluster name does not match the rule of GCP | |||
|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Yang Yang <yanyang> | |
| Component: | Installer | Assignee: | Patrick Dillon <padillon> | |
| Installer sub component: | openshift-installer | QA Contact: | Yang Yang <yanyang> | |
| Status: | CLOSED ERRATA | Docs Contact: | ||
| Severity: | medium | |||
| Priority: | unspecified | CC: | jiajliu | |
| Version: | 4.3.0 | |||
| Target Milestone: | --- | |||
| Target Release: | 4.4.0 | |||
| Hardware: | Unspecified | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | ||
| Doc Text: |
Cause: installer displayed wrong validation rule in message which said beginning with a number was ok
Consequence: specifying cluster name beginning with number would fail even though message says it was ok
Fix: fix the displayed message to display proper rule
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 1782447 (view as bug list) | Environment: | ||
| Last Closed: | 2020-05-04 11:17:42 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: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1782447 | |||
Verified with payload 4.4.0-0.nightly-2019-12-20-210709.
Steps to verify as below:
Set the cluster name to 123456 and create manifests
./openshift-install create manifests --dir '/home/jenkins/workspace/Launch Environment Flexy/workdir/install-dir'
level=fatal msg="failed to fetch Master Machines: failed to load asset \"Install Config\": invalid \"install-config.yaml\" file: metadata.name: Invalid value: \"123456\": GCP requires cluster name to match regular expression (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)"
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:0581 |
Description of problem: Regex used for cluster name validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'), while regex used for GCP is ([a-z]([-a-z0-9]{0,61}[a-z0-9])?). So cluster name for GCP platform must start with a lower case letter. Version-Release number of the following components: # ./openshift-install version ./openshift-install v4.3.0 built from commit 5e97f56e7885913c2c741fbe2d18be4ad2148ec3 release image registry.svc.ci.openshift.org/ocp/release@sha256:b68e7444baef46e79e64101bbb58bc02a30f4ccb647a1aaaf571239 How reproducible: 100% Steps to Reproduce: 1. Install a cluster by issuing the cli, and enter 123456 in the Cluster Name field ./openshift-install create cluster --dir=test --log-level=debug Platform: gcp Cluster Name: 123456 Actual results: Installation failed due to incorrect cluster name. Please find error message below. Error: Error creating Image: googleapi: Error 400: Invalid value for field 'resource.name': '123456-67rsh-rhcos-image'. Must be a match of regex '(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)', invalid Expected results: Please modify the regex used by cluster name Additional info: