Ensure External Connectivity for NAPT Switch
Currently, Netvirt code assumes that all the Compute Nodes in the
deployment have external network connectivity (via provider mappings).
However, we could have a deployment scenario where provider mappings
are configured on only few compute nodes. In such a deployment, SNAT
and FIP use-cases for FLAT/VLAN provider networks have to be
appropriately handled.
This patch does the following.
1. NAPT Switch will be scheduled only on the Compute Nodes that have
the external network connectivity.
2. For a VM with Floating ip, if the compute node (hosting the VM)
does not have the provider mappings (for external network), traffic
would be routed from the Compute Node to the NAPT Switch (which is
selected based on the provider-mappings) and then sent out to the
External network using the floatingip.
3. When SNAT is disabled on a router only the flows related to NAPT is
removed. The centralized switch is not released and the flows in to send
the packet to the centralized switch and vice versa is retained.
Change-Id: I5908f44cfbdbc74c9a8ee1218931fed9297e65a9
Signed-off-by: Aswin Suryanarayanan <asuryana@redhat.com>
Signed-off-by: Sridhar Gaddam <sgaddam@redhat.com>
(cherry picked from commit
8172c9796e5cba81ec78581f8ca66fefbf0a01e0)