[OVN]: fix ovn-db-sync to include gateway chassis
When we sync the SegmentHostMappings with the OVN southbound on start up, the chassis that are a gateway are being skipped from updating. The rest of the code base includes those in writing to the SegmentHostMappings so we should keep those in sync on ovn-db-sync as well. Closes-Bug: #2116960 Change-Id: Ie1b375f5c23864d7fa17c9dd05f0453b439835f1 Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
This commit is contained in:
@@ -1448,7 +1448,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:
|
||||
|
@@ -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),
|
||||
|
@@ -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 <https://bugs.launchpad.net/neutron/+bug/2116960>`_.
|
Reference in New Issue
Block a user