[OVN] Fix Router Availability Zones for segmented networks

This patch changes the get_candidates_for_scheduling() method to also
consider all gateway chassis as potential candidates (limited by
Availability Zones) in case physnet parameter is empty (as for the
segmented networks case).

This patch is a simpler/backportable fix for the segmented networks +
Router AZs use case. In the future we should consider refactoring the
code responsible for scheduling the gateway router ports, a more detailed
explanation of what is happening/needed can be found at LP #1939144.

Change-Id: I8dc5336c6e2acd0b0a2cad0e80eee91280b9f945
Closes-Bug: #1939144
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
(cherry picked from commit 8ac9e2fe6d)
This commit is contained in:
Lucas Alvares Gomes 2021-08-06 13:32:08 +01:00
parent f48b43c6cb
commit 715ecb1a67
1 changed files with 2 additions and 2 deletions

View File

@ -1308,7 +1308,7 @@ class OVNClient(object):
cms_bmaps.append(chassis)
else:
bmaps.append(chassis)
candidates = cms_bmaps or bmaps
candidates = cms_bmaps or bmaps or cms
# Filter for availability zones
if availability_zone_hints:
@ -1322,7 +1322,7 @@ class OVNClient(object):
if not cms_bmaps:
LOG.debug("No eligible chassis with external connectivity"
" through ovn-cms-options for %s", physnet)
LOG.debug("Chassis candidates with external connectivity: %s",
LOG.debug("Chassis candidates for scheduling gateway router ports: %s",
candidates)
return candidates