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-17 11:16:04 -0500
commit0b0da01224217eb2ff3c72374211eea07e93b8d5 (patch)
tree0633efd627082ca38312f449e65f30016bb2a128
parent28861bb2ac641b282ec2fc7648fd52a076f821b8 (diff)
Skip ip resolution during arp lookups
Change-Id: I58dcdb3f0b42be8354e7298923ba94d8052d3ee5 Signed-off-by: Dan Radez <dradez@redhat.com>
-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]+")
}