File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -839,18 +839,20 @@ function _move_neutron_addresses_route {
839839# runs that a clean run would need to clean up
840840function cleanup_neutron {
841841
842- _move_neutron_addresses_route " $OVS_PHYSICAL_BRIDGE " " $PUBLIC_INTERFACE " False " inet"
842+ if [[ -n " $OVS_PHYSICAL_BRIDGE " ]]; then
843+ _move_neutron_addresses_route " $OVS_PHYSICAL_BRIDGE " " $PUBLIC_INTERFACE " False " inet"
843844
844- if [[ $( ip -f inet6 a s dev " $OVS_PHYSICAL_BRIDGE " | grep -c ' global' ) != 0 ]]; then
845- _move_neutron_addresses_route " $OVS_PHYSICAL_BRIDGE " " $PUBLIC_INTERFACE " False " inet6"
846- fi
845+ if [[ $( ip -f inet6 a s dev " $OVS_PHYSICAL_BRIDGE " | grep -c ' global' ) != 0 ]]; then
846+ _move_neutron_addresses_route " $OVS_PHYSICAL_BRIDGE " " $PUBLIC_INTERFACE " False " inet6"
847+ fi
847848
848- if is_provider_network && is_ironic_hardware; then
849- for IP in $( ip addr show dev $OVS_PHYSICAL_BRIDGE | grep ' inet ' | awk ' {print $2}' ) ; do
850- sudo ip addr del $IP dev $OVS_PHYSICAL_BRIDGE
851- sudo ip addr add $IP dev $PUBLIC_INTERFACE
852- done
853- sudo route del -net $FIXED_RANGE gw $NETWORK_GATEWAY dev $OVS_PHYSICAL_BRIDGE
849+ if is_provider_network && is_ironic_hardware; then
850+ for IP in $( ip addr show dev $OVS_PHYSICAL_BRIDGE | grep ' inet ' | awk ' {print $2}' ) ; do
851+ sudo ip addr del $IP dev $OVS_PHYSICAL_BRIDGE
852+ sudo ip addr add $IP dev $PUBLIC_INTERFACE
853+ done
854+ sudo route del -net $FIXED_RANGE gw $NETWORK_GATEWAY dev $OVS_PHYSICAL_BRIDGE
855+ fi
854856 fi
855857
856858 if is_neutron_ovs_base_plugin; then
You can’t perform that action at this time.
0 commit comments