Get Daisy IP correctly 43/51743/1
authorAlex Yang <yangyang1@zte.com.cn>
Tue, 6 Feb 2018 03:20:50 +0000 (11:20 +0800)
committerAlex Yang <yangyang1@zte.com.cn>
Tue, 6 Feb 2018 03:20:50 +0000 (11:20 +0800)
In [1], there are two IP addresses of daisy VM in the arp table.
Select the first one.

[1]: https://build.opnfv.org/ci/job/functest-daisy-zte-pod9-daily-master/2/

Change-Id: Ic071d718004bf9ed215b7e53c56568f7f018051a
Signed-off-by: Alex Yang <yangyang1@zte.com.cn>
jjb/functest/functest-env-presetup.sh

index cd15d71..b7d33e7 100755 (executable)
@@ -38,7 +38,7 @@ elif [[ ${INSTALLER_TYPE} == 'daisy' ]]; then
 
         installer_mac=$(sudo virsh domiflist daisy | grep vnet | \
                       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 -i $bridge_name | grep ${installer_mac} | awk {'print $1'})
+        export INSTALLER_IP=$(/usr/sbin/arp -e -i $bridge_name | grep ${installer_mac} | head -n 1 | awk {'print $1'})
 
         echo "Installer ip is ${INSTALLER_IP}"
     else