[ovn]Only synchronize non dynamic segments

When creating a network, only the localnet logical_switch_port
will be created for segments with dynamic=False [1][2]. when we
synchronize data, we should also add filtering criteria.

[1] be9c4d585d/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py (L1913)
[2] be9c4d585d/neutron/db/segments_db.py (L80)

Closes-Bug: #2032169

Change-Id: Iad51712a4fe192bd488c1458819fd5708eb94d78
This commit is contained in:
zhouhenglc 2023-08-21 15:08:10 +08:00
parent be9c4d585d
commit 28059598d2
1 changed files with 2 additions and 1 deletions

View File

@ -1054,7 +1054,8 @@ class OvnNbSynchronizer(OvnDbSynchronizer):
'lswitch': lswitch['name']})
db_network = db_networks[lswitch['name']]
db_segments = self.segments_plugin.get_segments(
ctx, filters={'network_id': [db_network['id']]})
ctx, filters={'network_id': [db_network['id']],
'is_dynamic': False})
segments_provnet_port_names = []
for db_segment in db_segments:
physnet = db_segment.get(segment_def.PHYSICAL_NETWORK)