Browse code

Merge "lib/neutron-legacy: replace ip when re-stacking"

Jenkins authored on 2016/07/29 05:58:00
Showing 1 changed files
... ...
@@ -593,7 +593,7 @@ function _move_neutron_addresses_route {
593 593
         # on configure we will also add $from_intf as a port on $to_intf,
594 594
         # assuming it is an OVS bridge.
595 595
 
596
-        local IP_ADD=""
596
+        local IP_REPLACE=""
597 597
         local IP_DEL=""
598 598
         local IP_UP=""
599 599
         local DEFAULT_ROUTE_GW
... ...
@@ -618,7 +618,7 @@ function _move_neutron_addresses_route {
618 618
 
619 619
         if [[ "$IP_BRD" != "" ]]; then
620 620
             IP_DEL="sudo ip addr del $IP_BRD dev $from_intf"
621
-            IP_ADD="sudo ip addr add $IP_BRD dev $to_intf"
621
+            IP_REPLACE="sudo ip addr replace $IP_BRD dev $to_intf"
622 622
             IP_UP="sudo ip link set $to_intf up"
623 623
             if [[ "$af" == "inet" ]]; then
624 624
                 IP=$(echo $IP_BRD | awk '{ print $1; exit }' | grep -o -E '(.*)/' | cut -d "/" -f1)
... ...
@@ -628,7 +628,7 @@ function _move_neutron_addresses_route {
628 628
 
629 629
         # The add/del OVS port calls have to happen either before or
630 630
         # after the address is moved in order to not leave it orphaned.
631
-        $DEL_OVS_PORT; $IP_DEL; $IP_ADD; $IP_UP; $ADD_OVS_PORT; $ADD_DEFAULT_ROUTE; $ARP_CMD
631
+        $DEL_OVS_PORT; $IP_DEL; $IP_REPLACE; $IP_UP; $ADD_OVS_PORT; $ADD_DEFAULT_ROUTE; $ARP_CMD
632 632
     fi
633 633
 }
634 634