From 0b0da01224217eb2ff3c72374211eea07e93b8d5 Mon Sep 17 00:00:00 2001 From: Dan Radez Date: Thu, 17 Nov 2016 11:16:04 -0500 Subject: Skip ip resolution during arp lookups Change-Id: I58dcdb3f0b42be8354e7298923ba94d8052d3ee5 Signed-off-by: Dan Radez --- lib/undercloud-functions.sh | 4 ++-- lib/utility-functions.sh | 2 +- 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]+") } -- cgit 1.2.3-korg