summaryrefslogtreecommitdiffstats
path: root/jjb/functest
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2016-01-09 23:49:14 -0500
committerTim Rozet <trozet@redhat.com>2016-01-09 23:49:14 -0500
commitdacc19845a25d04ec8fa63db77190b4723033fed (patch)
tree182ba1ef9743561aab47eeafae8f0e6b405c6f04 /jjb/functest
parent8e29c971899c1ddbee1aff72e4eb728463313391 (diff)
Fixes detecting Apex instack IP with functest
default leases file may not always exist, especially in the case of using leasefile-ro with dnsmasq. This is a more sure fire way of detecting the IP. Change-Id: I6c4db3cda7c2f1b645015df7d326ed786980f8d3 Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'jjb/functest')
-rw-r--r--jjb/functest/functest-ci-jobs.yml5
1 files changed, 3 insertions, 2 deletions
diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml
index 6c7b6613a..c556404f3 100644
--- a/jjb/functest/functest-ci-jobs.yml
+++ b/jjb/functest/functest-ci-jobs.yml
@@ -186,8 +186,9 @@
# labconfig is used only for joid
labconfig=""
if [[ ${INSTALLER_TYPE} == 'apex' ]]; then
- INSTALLER_IP=$(grep instack /var/lib/libvirt/dnsmasq/default.leases \
- |awk '{print $3}' | head -n 1)
+ instack_mac=$(virsh domiflist instack | grep default | \
+ grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+")
+ INSTALLER_IP=$(/usr/sbin/arp -e | grep ${instack_mac} | awk {'print $1'})
sshkey="-v /root/.ssh/id_rsa:/root/.ssh/id_rsa"
sudo iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable
sudo iptables -D FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable