Skip to content

Commit c8bd6ae

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "[OVN]: fix ovn-db-sync to include gateway chassis" into stable/2025.1
2 parents 9e0c9dd + b3bef32 commit c8bd6ae

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1411,7 +1411,7 @@ def sync_hostname_and_physical_networks(self, ctx):
14111411
host_phynets_map = self.ovn_api.get_chassis_hostname_and_physnets()
14121412
current_hosts = set(host_phynets_map)
14131413
previous_hosts = segments_db.get_hosts_mapped_with_segments(
1414-
ctx, include_agent_types={ovn_const.OVN_CONTROLLER_AGENT})
1414+
ctx, include_agent_types=set(ovn_const.OVN_CONTROLLER_TYPES))
14151415

14161416
stale_hosts = previous_hosts - current_hosts
14171417
for host in stale_hosts:

neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_ovn_db_sync.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,8 @@ def test_ovn_sb_sync(self):
12411241
return_value=hosts_in_neutron) as mock_ghmws:
12421242
ovn_sb_synchronizer.sync_hostname_and_physical_networks(mock.ANY)
12431243
mock_ghmws.assert_called_once_with(
1244-
mock.ANY, include_agent_types={ovn_const.OVN_CONTROLLER_AGENT})
1244+
mock.ANY,
1245+
include_agent_types=set(ovn_const.OVN_CONTROLLER_TYPES))
12451246
all_hosts = set(hostname_with_physnets.keys()) | hosts_in_neutron
12461247
self.assertEqual(
12471248
len(all_hosts),
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
fixes:
3+
- |
4+
``ovn-db-sync`` skipped chassis that were also gateways for syncing the
5+
segment host mappings but all other operations included them so add syncing
6+
them to ``ovn-db-sync``. For more information see bug
7+
`2116960 <https://bugs.launchpad.net/neutron/+bug/2116960>`_.

0 commit comments

Comments
 (0)