summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2016-11-17 11:16:04 -0500
committerDan Radez <dradez@redhat.com>2016-11-22 12:26:04 -0500
commitf31bb140ea968d388b0861d487ba5c6606159187 (patch)
treed5830a18223a6110ac4894c77c5b2bee0a98851d
parent052e43fa14e84228f6b66609c8aa5758df1493f0 (diff)
Skip ip resolution during arp lookups
Change-Id: I58dcdb3f0b42be8354e7298923ba94d8052d3ee5 Signed-off-by: Dan Radez <dradez@redhat.com> (cherry picked from commit 0b0da01224217eb2ff3c72374211eea07e93b8d5)
-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 fea5f620..95122980 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 bc9a9592..9124df50 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]+")
}