File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -663,6 +663,27 @@ function _move_neutron_addresses_route {
663663 fi
664664}
665665
666+ # _configure_public_network_connectivity() - Configures connectivity to the
667+ # external network using $PUBLIC_INTERFACE or NAT on the single interface
668+ # machines
669+ function _configure_public_network_connectivity {
670+ # If we've given a PUBLIC_INTERFACE to take over, then we assume
671+ # that we can own the whole thing, and privot it into the OVS
672+ # bridge. If we are not, we're probably on a single interface
673+ # machine, and we just setup NAT so that fixed guests can get out.
674+ if [[ -n " $PUBLIC_INTERFACE " ]]; then
675+ _move_neutron_addresses_route " $PUBLIC_INTERFACE " " $OVS_PHYSICAL_BRIDGE " True False " inet"
676+
677+ if [[ $( ip -f inet6 a s dev " $PUBLIC_INTERFACE " | grep -c ' global' ) != 0 ]]; then
678+ _move_neutron_addresses_route " $PUBLIC_INTERFACE " " $OVS_PHYSICAL_BRIDGE " False False " inet6"
679+ fi
680+ else
681+ for d in $default_v4_route_devs ; do
682+ sudo iptables -t nat -A POSTROUTING -o $d -s $FLOATING_RANGE -j MASQUERADE
683+ done
684+ fi
685+ }
686+
666687# cleanup_mutnauq() - Remove residual data files, anything left over from previous
667688# runs that a clean run would need to clean up
668689function cleanup_mutnauq {
Original file line number Diff line number Diff line change @@ -266,6 +266,7 @@ function create_public_bridge {
266266 # Create the public bridge that OVN will use
267267 sudo ovs-vsctl --may-exist add-br $PUBLIC_BRIDGE -- set bridge $PUBLIC_BRIDGE protocols=OpenFlow13,OpenFlow15
268268 sudo ovs-vsctl set open . external-ids:ovn-bridge-mappings=$PHYSICAL_NETWORK :$PUBLIC_BRIDGE
269+ _configure_public_network_connectivity
269270}
270271
271272function _disable_libvirt_apparmor {
Original file line number Diff line number Diff line change @@ -123,21 +123,7 @@ function _configure_neutron_l3_agent {
123123
124124 neutron_plugin_configure_l3_agent $Q_L3_CONF_FILE
125125
126- # If we've given a PUBLIC_INTERFACE to take over, then we assume
127- # that we can own the whole thing, and privot it into the OVS
128- # bridge. If we are not, we're probably on a single interface
129- # machine, and we just setup NAT so that fixed guests can get out.
130- if [[ -n " $PUBLIC_INTERFACE " ]]; then
131- _move_neutron_addresses_route " $PUBLIC_INTERFACE " " $OVS_PHYSICAL_BRIDGE " True False " inet"
132-
133- if [[ $( ip -f inet6 a s dev " $PUBLIC_INTERFACE " | grep -c ' global' ) != 0 ]]; then
134- _move_neutron_addresses_route " $PUBLIC_INTERFACE " " $OVS_PHYSICAL_BRIDGE " False False " inet6"
135- fi
136- else
137- for d in $default_v4_route_devs ; do
138- sudo iptables -t nat -A POSTROUTING -o $d -s $FLOATING_RANGE -j MASQUERADE
139- done
140- fi
126+ _configure_public_network_connectivity
141127}
142128
143129# Explicitly set router id in l3 agent configuration
You can’t perform that action at this time.
0 commit comments