summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2018-06-26 16:58:28 -0400
committerTim Rozet <trozet@redhat.com>2018-06-27 09:14:09 -0400
commitbef419de784f2684a431598e6566f2b81d01cb8e (patch)
treef8c3731fcd692250df6917c16c0162c4c0905099 /utils
parent0f9c8ced437af4cae8b25387142bec5d42fab138 (diff)
Functest: Restores ability to run with pre-defined creds
This patch is needed for the case where there are provided OS credentials to functest, and there is no need to find the installer VM and copy the credentials to the host. In the Apex snapshot case, there is no installer VM on the slave, so we must provide the credentials file. Also includes a fix to use tempest_smoke_serial for the snapshot netvirt verification until CSIT suite is working correctly. Change-Id: Ic84955f527e3f84bb0d8579a377b4a1883fe3eb2 Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'utils')
-rwxr-xr-xutils/fetch_os_creds.sh44
1 files changed, 24 insertions, 20 deletions
diff --git a/utils/fetch_os_creds.sh b/utils/fetch_os_creds.sh
index b40b75b75..0e041c631 100755
--- a/utils/fetch_os_creds.sh
+++ b/utils/fetch_os_creds.sh
@@ -149,29 +149,33 @@ if [ "$installer_type" == "fuel" ]; then
echo $auth_url >> $dest_path
elif [ "$installer_type" == "apex" ]; then
- if ! ipcalc -c $installer_ip; then
- installer_ip=$(sudo 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
+ if [ -n "$RC_FILE_PATH" ]; then
+ echo "RC_FILE_PATH is set: ${RC_FILE_PATH}. Copying RC FILE to ${dest_path}"
+ sudo cp -f ${RC_FILE_PATH} ${dest_path}
+ else
+ if ! ipcalc -c $installer_ip; then
+ installer_ip=$(sudo 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)
- # NOTE: This might change for bare metal deployments
- info "... from Instack VM $installer_ip..."
- if [ -f /root/.ssh/id_rsa ]; then
- chmod 600 /root/.ssh/id_rsa
- fi
+ # The credentials file is located in the Instack VM (192.0.2.1)
+ # NOTE: This might change for bare metal deployments
+ info "... from Instack VM $installer_ip..."
+ if [ -f /root/.ssh/id_rsa ]; then
+ chmod 600 /root/.ssh/id_rsa
+ fi
- if [ "${BRANCH}" == "stable/fraser" ]; then
- rc_file=overcloudrc.v3
- else
- rc_file=overcloudrc
+ if [ "${BRANCH}" == "stable/fraser" ]; then
+ rc_file=overcloudrc.v3
+ else
+ rc_file=overcloudrc
+ fi
+ sudo scp $ssh_options root@$installer_ip:/home/stack/${rc_file} $dest_path
fi
- sudo scp $ssh_options root@$installer_ip:/home/stack/${rc_file} $dest_path
-
elif [ "$installer_type" == "compass" ]; then
if [ "${BRANCH}" == "stable/danube" ]; then
verify_connectivity $installer_ip