Bug 1666956 - inconsistent cluster name requirement between installer and terraform
Summary: inconsistent cluster name requirement between installer and terraform
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.1.0
Assignee: W. Trevor King
QA Contact: liujia
URL:
Whiteboard:
: 1669154 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-17 05:20 UTC by liujia
Modified: 2019-06-04 10:42 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2019-06-04 10:42:02 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:0758 None None None 2019-06-04 10:42:09 UTC
Github openshift installer pull 1089 None None None 2019-01-17 23:20:54 UTC

Description liujia 2019-01-17 05:20:11 UTC
Description of problem:
During installation prompt stage, the hint info about Cluster Name is "X Sorry, your reply was invalid: a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
" , which means jliu-beta1.test20190117 should be a valid name.

But when it came to "Creating cluster..." stage, it failed for the name.

INFO Creating cluster...                          
ERROR                                              
ERROR Error: module.vpc.aws_lb.api_external: only alphanumeric characters and hyphens allowed in "name": "jliu-beta1.test20190117-ext" 
ERROR                                              
ERROR                                              
ERROR                                              
ERROR Error: module.vpc.aws_lb.api_internal: only alphanumeric characters and hyphens allowed in "name": "jliu-beta1.test20190117-int" 
ERROR                                              
ERROR                                              
ERROR                                              
ERROR Error: module.vpc.aws_lb_target_group.api_external: only alphanumeric characters and hyphens allowed in "name" 
ERROR                                              
ERROR                                              
ERROR                                              
ERROR Error: module.vpc.aws_lb_target_group.api_internal: only alphanumeric characters and hyphens allowed in "name" 
ERROR                                              
ERROR                                              
ERROR                                              
ERROR Error: module.vpc.aws_lb_target_group.services: only alphanumeric characters and hyphens allowed in "name" 
ERROR                                              
ERROR                                              
ERROR Failed to read tfstate: open /tmp/openshift-install-598538601/terraform.tfstate: no such file or directory 
FATAL failed to fetch Cluster: failed to generate asset "Cluster": failed to create cluster: failed to apply using Terraform 


Version-Release number of the following components:
./openshift-install v0.10.0

How reproducible:
always

Steps to Reproduce:
1. Try to create cluster with cluster name set to jliu-beta1.test20190117
2.
3.

Actual results:
Installation failed.

Expected results:
Installation should succeed with the required name according to prompt hint info.

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

Comment 1 W. Trevor King 2019-01-17 07:05:01 UTC
I've filed [1] to fix this.  Or at least get through Terraform.  I'm not sure how the rest of the components will handle cluster names with dots in them, but I guess we'll see in CI.

[1]: https://github.com/openshift/installer/pull/1089

Comment 2 W. Trevor King 2019-01-23 18:03:21 UTC
I'm setting this as "No Doc Update", since we're still in pre-release.

Comment 4 W. Trevor King 2019-01-28 21:05:00 UTC
*** Bug 1669154 has been marked as a duplicate of this bug. ***

Comment 5 liujia 2019-01-29 02:10:23 UTC
Version:
# ./openshift-install version
./openshift-install v0.11.0

Steps:
1. Provide required info
? SSH Public Key /root/.ssh/ssh.pub
? Platform aws
? Region us-east-2
? Base Domain qe.devcluster.openshift.com
? Cluster Name jliu-beta1.test20190129
? Pull Secret [? for help] 
2. Try to create cluster with cluster name set to jliu-beta1.test20190129
INFO Creating cluster...                          
ERROR                                              
ERROR Error: module.vpc.aws_lb.api_external: only alphanumeric characters and hyphens allowed in "name": "jliu-beta1.test20190129-ext" 
ERROR                                              
ERROR                                              
ERROR                                              
ERROR Error: module.vpc.aws_lb.api_internal: only alphanumeric characters and hyphens allowed in "name": "jliu-beta1.test20190129-int" 
ERROR                                              
ERROR                                              
ERROR                                              
ERROR Error: module.vpc.aws_lb_target_group.api_external: only alphanumeric characters and hyphens allowed in "name" 
ERROR                                              
ERROR                                              
ERROR                                              
ERROR Error: module.vpc.aws_lb_target_group.api_internal: only alphanumeric characters and hyphens allowed in "name" 
ERROR                                              
ERROR                                              
ERROR                                              
ERROR Error: module.vpc.aws_lb_target_group.services: only alphanumeric characters and hyphens allowed in "name" 
ERROR                                              
ERROR                                              
ERROR Failed to read tfstate: open /tmp/openshift-install-145497610/terraform.tfstate: no such file or directory 
FATAL failed to fetch Cluster: failed to generate asset "Cluster": failed to create cluster: failed to apply using Terraform 

Still get the same error. I noticed #pr1089 was open status. So move the bug status back to wait for the pr merged.

Comment 6 W. Trevor King 2019-02-26 09:14:28 UTC
Should have been fixed by the recently-landed https://github.com/openshift/installer/pull/1280

Comment 7 W. Trevor King 2019-02-27 05:25:49 UTC
And 0.13.0 is out with the fix [1].

[1]: https://github.com/openshift/installer/releases/tag/v0.13.0

Comment 9 W. Trevor King 2019-04-05 08:48:55 UTC
This has been MODIFIED for over a month; I'm moving it to ON_QA ;).

Comment 10 liujia 2019-04-09 01:18:07 UTC
Version:
# ./openshift-install version
./openshift-install v0.16.1

Steps:
1. Provide required info
? SSH Public Key /root/.ssh/ssh.pub
? Platform aws
? Region us-east-2
? Base Domain qe.devcluster.openshift.com
? Cluster Name jliu-beta1.test20190129
? Pull Secret [? for help] 
2. Try to create cluster with cluster name set to jliu-beta1.test20190129

The cluster was created successfully.
Login the web-console https://console-openshift-console.apps.jliu-beta1.test20190129.xxx successfully.

Comment 12 errata-xmlrpc 2019-06-04 10:42: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, 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-2019:0758


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