Since logical router port deleted has the same name as the logical router port being added,
the code is incorrectly assuming that the port already exists. And because of that the code
flow returns in line 334 instead of hitting the "idlutils.RowNotFound" exception.
This also causes the call to _add_gateway_chassis to be missed.
After some further digging, I can see that this is likely related to a ommand :
logic located in AddLRouterPortC
https:/ /github. com/openstack/ networking- ovn/blob/ 5e2f1a5ad0b70d3 6e728e7a64d0652 d6ae8facf4/ networking_ ovn/ovsdb/ commands. py#L334
Since logical router port deleted has the same name as the logical router port being added, RowNotFound" exception.
the code is incorrectly assuming that the port already exists. And because of that the code
flow returns in line 334 instead of hitting the "idlutils.
This also causes the call to _add_gateway_ chassis to be missed.
(Pdb) self.name 09e9-42b4- abfd-0fc72a726c ab'
u'lrp-195beff8-
So... DelLRouterPortC ommand and AddLRouterPortC ommand cannot use a port with same name!
The transaction object looks like this:
CheckRevisionNu mberCommand( if_exists= True, resource={'status': u'ACTIVE', 'description': u'', 'tags': [], 'updated_at': '2019-09- 10T20:48: 55Z', 'revision_number': 3, \ ff0a-4bd1- 8e68-547dee654f 5e', 'external_ gateway_ info': {'network_id': u'f7277974- cf8c-46ca- a00d-9da566e42a e9', 'enable_snat': True, 'external_fixed_i\ a5e9-4e73- 8b2c-b152c41ec6 ae', 'ip_address': u'172.24.4.164'}]}, 'name': u'router2', 'gw_port_id': u'195beff8- 09e9-42b4- abfd-0fc72a726c a\ 84ead81d3af9861 3ca0', 'created_at': '2019-09- 10T20:42: 19Z', 'routes': [], 'project_id': u'01f82375ae454 84ead81\ 74ff4a1f- ff0a-4bd1- 8e68-547dee654f 5e, resource_ type=routers) ,
'id': u'74ff4a1f-
ps': [{'subnet_id': u'1637c183-
b', 'admin_state_up': True, 'tenant_id': u'01f82375ae454
d3af98613ca0'}, name=neutron-
DeleteLRouterEx tGwCommand( if_exists= True, lrouter= neutron- 74ff4a1f- ff0a-4bd1- 8e68-547dee654f 5e),
DelLRouterPortC ommand( if_exists= True, lrouter= neutron- 74ff4a1f- ff0a-4bd1- 8e68-547dee654f 5e, name=lrp- 195beff8- 09e9-42b4- abfd-0fc72a726c ab),
AddLRouterPortC ommand( name=lrp- 195beff8- 09e9-42b4- abfd-0fc72a726c ab, may_exist=True, lrouter= neutron- 74ff4a1f- ff0a-4bd1- 8e68-547dee654f 5e, columns={'mac': 'fa:16:3e:9\ 103e-4d9f- a8f1-56159c1007 dc'], 'external_ids': {'neutron: network_ name': u'neutron- f7277974- cf8c-46ca- a00d-9da566e42a e9', 'neu\ a5e9-4e73- 8b2c-b152c41ec6 ae', 'neutron: revision_ number' : '6', 'neutron: router_ name': u'74ff4a1f- ff0a-4bd1- 8e68-547dee654f 5e'}, 'networks'\ 4.164/24' ]}),
4:fc:a1', 'gateway_chassis': [u'84b16b41-
tron:subnet_ids': u'1637c183-
: ['172.24.
SetLRouterPortI nLSwitchPortCom mand(if_ exists= True, lswitch_ port=195beff8- 09e9-42b4- abfd-0fc72a726c ab, lrouter_ port=lrp- 195beff8- 09e9-42b4- abfd-0fc72a726c ab, is_gw_por\ router) ,
t=True, lsp_address=
AddStaticRouteC ommand( lrouter= neutron- 74ff4a1f- ff0a-4bd1- 8e68-547dee654f 5e, columns= {'ip_prefix' : '0.0.0.0/0', 'external_ids': {'neutron: subnet_ id': u'1637c183-a5e9-4\ b152c41ec6ae' , 'neutron: is_ext_ gw': 'true'}, 'nexthop': '172.24.4.1'}),
e73-8b2c-
UpdateLRouterCo mmand(if_ exists= True, columns= {'external_ ids': {'neutron: gw_port_ id': u'195beff8- 09e9-42b4- abfd-0fc72a726c ab', 'neutron: router_ name': u'router2', 'neut\ number' : '3'}, 'enabled': True}, name=neutron- 74ff4a1f- ff0a-4bd1- 8e68-547dee654f 5e)
ron:revision_