Comment 3 for bug 1783654

Revision history for this message
Arjun Baindur (abaindur) wrote :

Yes, Pike. But the code in question appears unchanged on queens and master too. The DVR drop/mod flows will be skipped for any shared non-external network:

        if lvm.network_type == n_const.TYPE_VLAN:
            # TODO(vivek) remove the IPv6 related flows once SNAT is not
            # used for IPv6 DVR.
            br = self.phys_brs[lvm.physical_network]
        if lvm.network_type in constants.TUNNEL_NETWORK_TYPES:
            br = self.tun_br
        # TODO(vivek) remove the IPv6 related flows once SNAT is not
        # used for IPv6 DVR.
        port_net_info = None
        net_shared_only = False
        try:
            port_net_info = (
                self.plugin_rpc.get_network_info_for_id(
                    self.context, subnet_info.get('network_id')))
        except oslo_messaging.RemoteError as e:
            LOG.error('L2 agent could not get network_info_for_id '
                      'due to RPC error. It happens when the server '
                      'does not support this RPC API. Detailed message: '
                      '%s', e)
        if port_net_info:
            net_shared_only = (
                port_net_info[0]['shared'] and
                not port_net_info[0]['router:external'])
        if net_shared_only:
            LOG.debug("Not applying DVR rules to tunnel bridge because %s "
                      "is a shared network", subnet_info.get('network_id'))
        else:
            if ip_version == 4:
                if subnet_info['gateway_ip']:
                    br.install_dvr_process_ipv4(
                        vlan_tag=lvm.vlan,
                        gateway_ip=subnet_info['gateway_ip'])
            else:
                br.install_dvr_process_ipv6(
                    vlan_tag=lvm.vlan, gateway_mac=subnet_info['gateway_mac'])
            br.install_dvr_process(
                vlan_tag=lvm.vlan, vif_mac=port.vif_mac,
                dvr_mac_address=self.dvr_mac_address)