Comment 4 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

There seems to be a concurrency issue with how router updates are handled in l3 agents.

It doesn't affect agent_gw_port because it does an explicit RPC call.

If set_trace is set in _process_router_update then the issue does not occur and process_external works as expected:

http://paste.openstack.org/show/PzTrJanyIXm9y7H4h26A/

522 def _process_router_update(self):
523 for rp, update in self._queue.each_update_to_next_router():
524 import rpdb
525 rpdb.set_trace()

{u'enable_snat': False, u'gw_port': {u'allowed_address_pairs': [], u'extra_dhcp_opts': [], u'updated_at': u'2018-04-03T21:37:06Z', u'device_owner': u'network:router_gateway', u'revision_number': 12, u'port_security_enabled': False, u'binding:profile': {}, u'binding:vnic_type': u'normal', u'fixed_ips': [{u'subnet_id': u'ee6795c0-8f06-4fa6-9531-04168403c74f', u'prefixlen': 21, u'ip_address': u'10.232.41.4'}], u'id': u'dde20d26-a285-4ee7-b402-830f6c3cea1b', u'security_groups': [], u'binding:vif_details': {u'port_filter': True, u'datapath_type': u'system', u'ovs_hybrid_plug': True}, u'address_scopes': {u'4': u'd5d483bd-b1a1-4d11-8b98-a9697707321e', u'6': None} <- ...

Setting the same in process_external or not setting it at all results in a 100% reproducer.

    def process_external(self):
        import rpdb
        rpdb.set_trace()
        if self.agent_conf.agent_mode != (
...

apt policy python-eventlet
python-eventlet:
  Installed: 0.18.4-1ubuntu1
  Candidate: 0.18.4-1ubuntu1
  Version table:
 *** 0.18.4-1ubuntu1 500