redhat-openstack / infrared

Plugin based framework that aims to provide an easy-to-use CLI for Ansible based projects
https://infrared.readthedocs.io/en/latest/index.html
Apache License 2.0
99 stars 96 forks source link

Generating SSL certs fails with IPv6 addresses in undercloud.conf #394

Open AlistairTonner opened 4 years ago

AlistairTonner commented 4 years ago

when undercloud.conf is populated with an IPv6 address for undercloud_admin_host the notation includes the cidr for the address. and related stanza do not trim off the cidr, and the cird then causes the openssl call to fail with "Hit end of string before finding the equals". The task needs to validate that there is no /### at the end of the string before passing it to the openssl command.

TASK [create the self signed CA certificate] *** task path: /home/rhos-ci/jenkins/workspace/OSPD-Customized-Deployment-virt/infrared/plugins/tripleo-undercloud/tasks/ssl.yml:38 Thursday 30 July 2020 17:50:23 +0000 (0:00:00.834) 0:12:27.690 * fatal: [undercloud-0]: FAILED! => { "changed": true, "cmd": [ "openssl", "req", "-new", "-x509", "-days", "365", "-key", "undercloud-privkey.pem", "-subj", "/C=US/ST=NC/L=Raleigh/O=Red HAt/OU=QE/CN=fe32:dead:beef::2/64", "-out", "/etc/pki/ca-trust/source/anchors/undercloud-cacert.pem" ], "delta": "0:00:00.004445", "end": "2020-07-30 13:50:24.440774", "rc": 1, "start": "2020-07-30 13:50:24.436329" }

STDERR:

req: Hit end of string before finding the equals. problems making Certificate Request