diff options
Diffstat (limited to 'utils/fetch_os_creds.sh')
-rwxr-xr-x | utils/fetch_os_creds.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/fetch_os_creds.sh b/utils/fetch_os_creds.sh index 312e1ac5c..72bebade1 100755 --- a/utils/fetch_os_creds.sh +++ b/utils/fetch_os_creds.sh @@ -112,6 +112,10 @@ if [ "$installer_type" == "fuel" ]; then info "Fetching rc file from controller $controller_ip..." ssh ${ssh_options} ubuntu@${controller_ip} "sudo cat /root/keystonercv3" > $dest_path + + if [[ $BUILD_TAG =~ "baremetal" ]]; then + ssh ${ssh_options} ubuntu@${installer_ip} "cat /etc/ssl/certs/os_cacert" > $os_cacert + fi else #ip_fuel="10.20.0.2" env=$(sshpass -p r00tme ssh 2>/dev/null ${ssh_options} root@${installer_ip} \ @@ -144,6 +148,13 @@ if [ "$installer_type" == "fuel" ]; then echo $auth_url >> $dest_path elif [ "$installer_type" == "apex" ]; then + if ! ipcalc -c $installer_ip; then + installer_ip=$(virsh domifaddr undercloud | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}') + if [ -z "$installer_ip" ] || ! $(ipcalc -c $installer_ip); then + echo "Unable to find valid IP for Apex undercloud: ${installer_ip}" + exit 1 + fi + fi verify_connectivity $installer_ip # The credentials file is located in the Instack VM (192.0.2.1) |