summaryrefslogtreecommitdiffstats
path: root/jjb/functest
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 /jjb/functest
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 'jjb/functest')
-rwxr-xr-xjjb/functest/functest-env-presetup.sh42
1 files changed, 23 insertions, 19 deletions
diff --git a/jjb/functest/functest-env-presetup.sh b/jjb/functest/functest-env-presetup.sh
index 323b325b4..81718a5e3 100755
--- a/jjb/functest/functest-env-presetup.sh
+++ b/jjb/functest/functest-env-presetup.sh
@@ -5,27 +5,31 @@ set -o pipefail
# Fetch INSTALLER_IP for APEX deployments
if [[ ${INSTALLER_TYPE} == 'apex' ]]; then
- echo "Gathering IP information for Apex installer VM"
- ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
- if sudo virsh list | grep undercloud; then
- echo "Installer VM detected"
- undercloud_mac=$(sudo virsh domiflist undercloud | grep default | \
+ if [ -n "$RC_FILE_PATH" ]; then
+ echo "RC_FILE_PATH is set: ${RC_FILE_PATH}...skipping detecting UC IP"
+ else
+ echo "Gathering IP information for Apex installer VM"
+ ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
+ if sudo virsh list | grep undercloud; then
+ echo "Installer VM detected"
+ undercloud_mac=$(sudo virsh domiflist undercloud | grep default | \
grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+")
- export INSTALLER_IP=$(/usr/sbin/arp -e | grep ${undercloud_mac} | awk {'print $1'})
- export sshkey_vol="-v /root/.ssh/id_rsa:/root/.ssh/id_rsa"
- sudo scp $ssh_options root@${INSTALLER_IP}:/home/stack/stackrc ${HOME}/stackrc
- export stackrc_vol="-v ${HOME}/stackrc:/home/opnfv/functest/conf/stackrc"
-
- if sudo iptables -C FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable 2> ${redirect}; then
- sudo iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable
- fi
- if sudo iptables -C FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable 2> ${redirect}; then
- sudo iptables -D FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable
+ export INSTALLER_IP=$(/usr/sbin/arp -e | grep ${undercloud_mac} | awk {'print $1'})
+ export sshkey_vol="-v /root/.ssh/id_rsa:/root/.ssh/id_rsa"
+ sudo scp $ssh_options root@${INSTALLER_IP}:/home/stack/stackrc ${HOME}/stackrc
+ export stackrc_vol="-v ${HOME}/stackrc:/home/opnfv/functest/conf/stackrc"
+
+ if sudo iptables -C FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable 2> ${redirect}; then
+ sudo iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable
+ fi
+ if sudo iptables -C FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable 2> ${redirect}; then
+ sudo iptables -D FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable
+ fi
+ echo "Installer ip is ${INSTALLER_IP}"
+ else
+ echo "No available installer VM exists and no credentials provided...exiting"
+ exit 1
fi
- echo "Installer ip is ${INSTALLER_IP}"
- else
- echo "No available installer VM exists and no credentials provided...exiting"
- exit 1
fi
elif [[ ${INSTALLER_TYPE} == 'daisy' ]]; then