summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2016-11-17 19:47:33 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-11-17 19:47:33 +0000
commit122e9d68ebd38e6e2ff82548fb77812a04c05e17 (patch)
tree40e161347f2c79a16a637f3b8ebc48c707457bc6 /lib
parent7bf4840aaf71e433824121328b4ec75fcc1dee04 (diff)
parent0b0da01224217eb2ff3c72374211eea07e93b8d5 (diff)
Merge "Skip ip resolution during arp lookups"
Diffstat (limited to 'lib')
-rwxr-xr-xlib/undercloud-functions.sh4
-rw-r--r--lib/utility-functions.sh2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/undercloud-functions.sh b/lib/undercloud-functions.sh
index 6ba9a545..d3beb60c 100755
--- a/lib/undercloud-functions.sh
+++ b/lib/undercloud-functions.sh
@@ -71,12 +71,12 @@ function setup_undercloud_vm {
CNT=10
echo -n "${blue}Waiting for Undercloud's dhcp address${reset}"
undercloud_mac=$(virsh domiflist undercloud | grep default | awk '{ print $5 }')
- while ! $(arp -e | grep ${undercloud_mac} > /dev/null) && [ $CNT -gt 0 ]; do
+ while ! $(arp -en | grep ${undercloud_mac} > /dev/null) && [ $CNT -gt 0 ]; do
echo -n "."
sleep 10
CNT=$((CNT-1))
done
- UNDERCLOUD=$(arp -e | grep ${undercloud_mac} | awk {'print $1'})
+ UNDERCLOUD=$(arp -en | grep ${undercloud_mac} | awk {'print $1'})
if [ -z "$UNDERCLOUD" ]; then
echo "\n\nCan't get IP for Undercloud. Can Not Continue."
diff --git a/lib/utility-functions.sh b/lib/utility-functions.sh
index bf4128a0..5c28b46c 100644
--- a/lib/utility-functions.sh
+++ b/lib/utility-functions.sh
@@ -24,7 +24,7 @@ function undercloud_connect {
##outputs the Undercloud's IP address
##params: none
function get_undercloud_ip {
- echo $(arp -a | grep $(virsh domiflist undercloud | grep default |\
+ echo $(arp -an | grep $(virsh domiflist undercloud | grep default |\
awk '{print $5}') | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+")
}