diff --git a/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py b/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py index 9ff605edfb2..f00e120fcfe 100644 --- a/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py +++ b/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py @@ -1474,7 +1474,7 @@ class OvnSbSynchronizer(OvnDbSynchronizer): host_phynets_map = self.ovn_api.get_chassis_hostname_and_physnets() current_hosts = set(host_phynets_map) previous_hosts = segments_db.get_hosts_mapped_with_segments( - ctx, include_agent_types={ovn_const.OVN_CONTROLLER_AGENT}) + ctx, include_agent_types=set(ovn_const.OVN_CONTROLLER_TYPES)) stale_hosts = previous_hosts - current_hosts for host in stale_hosts: diff --git a/neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_ovn_db_sync.py b/neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_ovn_db_sync.py index 39d1d1e7de3..370bfd06d85 100644 --- a/neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_ovn_db_sync.py +++ b/neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_ovn_db_sync.py @@ -1241,7 +1241,7 @@ class TestOvnSbSyncML2(test_mech_driver.OVNMechanismDriverTestCase): return_value=hosts_in_neutron) as mock_ghmws: ovn_sb_synchronizer.sync_hostname_and_physical_networks(mock.ANY) mock_ghmws.assert_called_once_with( - mock.ANY, include_agent_types={ovn_const.OVN_CONTROLLER_AGENT}) + mock.ANY, include_agent_types=set(ovn_const.OVN_CONTROLLER_TYPES)) all_hosts = set(hostname_with_physnets.keys()) | hosts_in_neutron self.assertEqual( len(all_hosts), diff --git a/releasenotes/notes/ovn-db-sync-gw-agent-cd049668511ac730.yaml b/releasenotes/notes/ovn-db-sync-gw-agent-cd049668511ac730.yaml new file mode 100644 index 00000000000..babb0015d6d --- /dev/null +++ b/releasenotes/notes/ovn-db-sync-gw-agent-cd049668511ac730.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + ``ovn-db-sync`` skipped chassis that were also gateways for syncing the + segment host mappings but all other operations included them so add syncing + them to ``ovn-db-sync``. For more information see bug + `2116960 `_.