Comment 1 for bug 1759971

Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote : Re: [dvr][fast-exit] a route to a tenant network does not get created in fip namespace if an external network is attached after a tenant network have been attached

Tracing neutron-l3-agent via rbdb clears the issue out a bit.

For the case where a tenant network is added before an external network ext_port_addr_scopes is an empty set:

https://paste.ubuntu.com/p/Byjp6fNpdd/

--Call--
> /usr/lib/python2.7/dist-packages/neutron/agent/l3/dvr_local_router.py(590)_check_if_address_scopes_match()
-> def _check_if_address_scopes_match(self, int_port, ex_gw_port):
...
(Pdb) n
> /usr/lib/python2.7/dist-packages/neutron/agent/l3/dvr_local_router.py(592)_check_if_address_scopes_match()
-> int_port_addr_scopes = int_port.get('address_scopes', {})
(Pdb) n
> /usr/lib/python2.7/dist-packages/neutron/agent/l3/dvr_local_router.py(593)_check_if_address_scopes_match()
-> ext_port_addr_scopes = ex_gw_port.get('address_scopes', {})
(Pdb) n
> /usr/lib/python2.7/dist-packages/neutron/agent/l3/dvr_local_router.py(595)_check_if_address_scopes_match()
-> lib_constants.IP_VERSION_6 if self._port_has_ipv6_subnet(int_port)
(Pdb) int_port_addr_scopes
{u'4': u'd5d483bd-b1a1-4d11-8b98-a9697707321e', u'6': None}
(Pdb) ext_port_addr_scopes
{}

For the case where an external network is added first, then a tenant network both int_port_addr_scopes and ext_port_addr_scopes have the same content:

(Pdb) n
> /usr/lib/python2.7/dist-packages/neutron/agent/l3/dvr_local_router.py(593)_check_if_address_scopes_match()
-> ext_port_addr_scopes = ex_gw_port.get('address_scopes', {})
(Pdb) n
> /usr/lib/python2.7/dist-packages/neutron/agent/l3/dvr_local_router.py(595)_check_if_address_scopes_match()
-> lib_constants.IP_VERSION_6 if self._port_has_ipv6_subnet(int_port)

-> lib_constants.IP_VERSION_6 if self._port_has_ipv6_subnet(int_port)
(Pdb) int_port_addr_scopes
{u'4': u'd5d483bd-b1a1-4d11-8b98-a9697707321e', u'6': None}
(Pdb) ext_port_addr_scopes
{u'4': u'd5d483bd-b1a1-4d11-8b98-a9697707321e', u'6': None}