Bug 1506537
Summary: | Provisioning OCP on AWS failed due to SSLCertificateId missed | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Wenkai Shi <weshi> |
Component: | Installer | Assignee: | Kenny Woodson <kwoodson> |
Status: | CLOSED ERRATA | QA Contact: | Wenkai Shi <weshi> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 3.7.0 | CC: | aos-bugs, jokerman, mmccomas, weshi |
Target Milestone: | --- | ||
Target Release: | 3.7.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: | 2017-11-28 22:19:38 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
Wenkai Shi
2017-10-26 09:41:05 UTC
Wenkai, Thanks for reporting this. To understand what is happening here let's step back and understand the setup of how the infrastructure is created. When installing in AWS, we use an ELB to front the master API externally and internally. We also front the router nodes (infra nodes) with an ELB. The external ELB will take traffic for the console and api. The defined listeners required on the ELB are defined here: https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_aws/defaults/main.yml#L56-L77 We require that the ELB support SSL traffic. This requires a certificate to be placed on the ELB. The first step is to create the certificate. This happens inside of https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_aws/tasks/provision.yml. The certificate actually gets created here: https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_aws/tasks/iam_cert.yml Then once this has been created, we store the ARN (amazon resource name) inside of openshift_aws_elb_cert_arn so that later it can be placed on the master external ELB. Now that we understand the process of why we require an SSL certificate for the external master ELB we can start to troubleshoot why we are seeing this error. The error you are running into is that the variable openshift_aws_elb_cert_arn is defaulted to an empty string. This means that the variable was not set during the iam_cert.yml set_fact call. This happens here: https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_aws/tasks/iam_cert.yml#L25 Are you passing in the following variables? openshift_aws_iam_cert_path openshift_aws_iam_cert_key_path openshift_aws_iam_cert_chain_path My provisioning_vars.yml includes these variables: --- openshift_aws_iam_cert_path: '/home/kwoodson/certificates/files/opstest/wildcard.opstest.openshift.com.crt' openshift_aws_iam_cert_key_path: '/home/kwoodson/certificates/files/opstest/wildcard.opstest.openshift.com.key' openshift_aws_iam_cert_chain_path: '/home/kwoodson/certificates/files/digicert.ca.crt' --- These can be self signed or official certificates. Once created and passed into the provisioning, the certificates will be placed on the ELB properly. I also noticed this variable name needs to be fixed. Here is a PR for the variable name: https://github.com/openshift/openshift-ansible/pull/5900 Hi Kenny, My provisioning_vars.yml includes these variables: ... openshift_aws_iam_cert_path: '/root/named.cert/wildcard.weshi-cluster.example.com.crt' openshift_aws_iam_key_path: '/root/named.cert/wildcard.weshi-cluster.example.com.key' openshift_aws_iam_cert_chain_path: '/root/named.cert/rootCA.pem' ... It could works since change the variable name to "openshift_aws_iam_cert_key_path", will verify this when PR merged. BY the way, if "openshift_aws_iam_cert_chain_path" necessary, I think it should be mentioned on "playbooks/aws/README.md". Code already merged to openshift-ansible-3.7.0-0.182.0.git.0.23a42dc.el7. # cat /usr/share/ansible/openshift-ansible/playbooks/aws/provisioning_vars.yml.example ... # custom certificates are required for the ELB openshift_aws_iam_cert_path: # '/path/to/wildcard.<clusterid>.example.com.crt' openshift_aws_iam_cert_key_path: # '/path/to/wildcard.<clusterid>.example.com.key' openshift_aws_iam_cert_chain_path: # '/path/to/cert.ca.crt' Verified with version openshift-ansible-3.7.0-0.189.0.git.0.d497c5e.el7, the variable name fixed. # cat /usr/share/ansible/openshift-ansible/playbooks/aws/provisioning_vars.yml.example ... # custom certificates are required for the ELB openshift_aws_iam_cert_path: # '/path/to/wildcard.<clusterid>.example.com.crt' openshift_aws_iam_cert_key_path: # '/path/to/wildcard.<clusterid>.example.com.key' openshift_aws_iam_cert_chain_path: # '/path/to/cert.ca.crt' 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/RHSA-2017:3188 |