Skip to content

Commit 7f1bc37

Browse files
committed
Fix ChassisAgentWriteEvent match condition
As the method description says, the ``ChassisAgentWriteEvent`` uses the ``Chassis_Private.chassis`` information to update the local OVN agent cache. If there is no chassis, the match should not pass. This method was updated in [1], during the backwards compatibility removal. This condition was incorrectly refactored. [1]https://review.opendev.org/c/openstack/neutron/+/904238 Related-Bug: #2002839 Signed-off-by: Rodolfo Alonso Hernandez <ralonsoh@redhat.com> Change-Id: I4b4768e0ee3c607dcc8511d7f1b5764d1fd0a63a (cherry picked from commit bf9e039)
1 parent 9835a8d commit 7f1bc37

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,8 @@ def match_fn(self, event, row, old=None):
339339
# On updates to Chassis_Private because the Chassis has been deleted,
340340
# don't update the AgentCache. We use chassis_private.chassis to return
341341
# data about the agent.
342-
return event == self.ROW_CREATE or hasattr(old, 'nb_cfg')
342+
return (event == self.ROW_CREATE or
343+
(hasattr(old, 'nb_cfg') and row.chassis))
343344

344345
def run(self, event, row, old):
345346
n_agent.AgentCache().update(ovn_const.OVN_CONTROLLER_AGENT, row,

0 commit comments

Comments
 (0)