commit | 6d4843ed96fed4ed7ca6a18394fd2a64439d3707 | [log] [tgz] |
---|---|---|
author | Sean M. Collins <sean@coreitpro.com> | Thu May 12 16:14:26 2016 -0400 |
committer | Sean M. Collins <sean@coreitpro.com> | Thu May 19 15:52:15 2016 +0000 |
tree | 38f37c954527bdfe10796bf35b33ab3985d28907 | |
parent | ab539b441da09240cca487527802b4552d4667ad [diff] [blame] |
Neutron: only do ARP_CMD if IP_BRD is not an empty string Some third party CI systems leave PUBLIC_INTERFACE as the default, but do not actually create the device. ip would set errno to 1 when this happens[1], and that's fine - however arping would exit with errno set to 2, which triggers the exit_trap and stops stacking.[2] [1]: http://openstack.fit-tecnologia.org.br:10000/36/295836/6/check/hitachi-hnas-ssc/3362683/logs/devstacklog.txt.gz#_2016-05-12_17_24_40_458 [2]: http://openstack.fit-tecnologia.org.br:10000/36/295836/6/check/hitachi-hnas-ssc/3362683/logs/devstacklog.txt.gz#_2016-05-12_17_24_40_545 Change-Id: Iaf08b475eeec5e179a11a42d35fe532b2a15aa41
diff --git a/lib/neutron-legacy b/lib/neutron-legacy index 9144ca4..383944f 100644 --- a/lib/neutron-legacy +++ b/lib/neutron-legacy
@@ -625,11 +625,6 @@ IP_BRD=$(ip -f $af a s dev $from_intf scope global primary | grep inet | awk '{ print $2, $3, $4; exit }') - if [[ "$af" == "inet" ]]; then - IP=$(echo $IP_BRD | awk '{ print $1; exit }' | grep -o -E '(.*)/' | cut -d "/" -f1) - ARP_CMD="arping -A -c 3 -w 4.5 -I $to_intf $IP " - fi - if [ "$DEFAULT_ROUTE_GW" != "" ]; then ADD_DEFAULT_ROUTE="sudo ip -f $af r replace default via $DEFAULT_ROUTE_GW dev $to_intf" fi @@ -646,6 +641,10 @@ IP_DEL="sudo ip addr del $IP_BRD dev $from_intf" IP_ADD="sudo ip addr add $IP_BRD dev $to_intf" IP_UP="sudo ip link set $to_intf up" + if [[ "$af" == "inet" ]]; then + IP=$(echo $IP_BRD | awk '{ print $1; exit }' | grep -o -E '(.*)/' | cut -d "/" -f1) + ARP_CMD="arping -A -c 3 -w 4.5 -I $to_intf $IP " + fi fi # The add/del OVS port calls have to happen either before or