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
... | ... |
@@ -625,11 +625,6 @@ function _move_neutron_addresses_route { |
625 | 625 |
|
626 | 626 |
IP_BRD=$(ip -f $af a s dev $from_intf scope global primary | grep inet | awk '{ print $2, $3, $4; exit }') |
627 | 627 |
|
628 |
- if [[ "$af" == "inet" ]]; then |
|
629 |
- IP=$(echo $IP_BRD | awk '{ print $1; exit }' | grep -o -E '(.*)/' | cut -d "/" -f1) |
|
630 |
- ARP_CMD="arping -A -c 3 -w 4.5 -I $to_intf $IP " |
|
631 |
- fi |
|
632 |
- |
|
633 | 628 |
if [ "$DEFAULT_ROUTE_GW" != "" ]; then |
634 | 629 |
ADD_DEFAULT_ROUTE="sudo ip -f $af r replace default via $DEFAULT_ROUTE_GW dev $to_intf" |
635 | 630 |
fi |
... | ... |
@@ -646,6 +641,10 @@ function _move_neutron_addresses_route { |
646 | 646 |
IP_DEL="sudo ip addr del $IP_BRD dev $from_intf" |
647 | 647 |
IP_ADD="sudo ip addr add $IP_BRD dev $to_intf" |
648 | 648 |
IP_UP="sudo ip link set $to_intf up" |
649 |
+ if [[ "$af" == "inet" ]]; then |
|
650 |
+ IP=$(echo $IP_BRD | awk '{ print $1; exit }' | grep -o -E '(.*)/' | cut -d "/" -f1) |
|
651 |
+ ARP_CMD="arping -A -c 3 -w 4.5 -I $to_intf $IP " |
|
652 |
+ fi |
|
649 | 653 |
fi |
650 | 654 |
|
651 | 655 |
# The add/del OVS port calls have to happen either before or |