Skip to content

Commit 6cd92e3

Browse files
committed
[OVN] HAChassisGroupRouterEvent is for router HCG only
The event ``HAChassisGroupRouterEvent`` handles the ``HA_Chassis_Group`` registers created for routers, when the external network is tunnelled. This event should only attend ``HA_Chassis_Group`` that have the key "neutron:router_id" in the external_ids field, that identifies that is created for routers only. Closes-Bug: #2126588 Signed-off-by: Rodolfo Alonso Hernandez <[email protected]> Change-Id: I4631094d7e2bfda9ddff5feb8c96960ea0cd436d (cherry picked from commit d7e8042)
1 parent b3db08f commit 6cd92e3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -693,8 +693,10 @@ def __init__(self, driver):
693693
self.event_name = 'HAChassisGroupRouterEvent'
694694

695695
def match_fn(self, event, row, old):
696-
if (ovn_const.OVN_ROUTER_ID_EXT_ID_KEY in row.external_ids or
697-
hasattr(old, 'ha_chassis')):
696+
if ovn_const.OVN_ROUTER_ID_EXT_ID_KEY not in row.external_ids:
697+
# This is not a router "HA_Chassis_Group".
698+
return False
699+
if hasattr(old, 'ha_chassis'):
698700
# "HA_Chassis_Group" has been assigned to a router or there are
699701
# changes in the "ha_chassis" list.
700702
return True

0 commit comments

Comments
 (0)