Skip to content

Commit 2a2fda2

Browse files
committed
[OVN][FT] Also update nb_cfg along with nb_cfg_timestamp
FT ``test_agent_updated_at_use_nb_cfg_timestamp`` updates "nb_cfg_timestamp" in Chassis_Private table and then checks if agent cache get's updated to the same value. But "ChassisAgentWriteEvent" which is responsible for updating AgentCache doesn't get triggered with updates on "nb_cfg_timestamp", so this patch proposes also to increment "nb_cfg" by 1 to trigger the Event as in general scenario timestamep get's updated along with nb_cfg. Closes-Bug: #1974149 Change-Id: I8889746ff2ee2629ee7c38ac162ea7c4d9ee0734 (cherry picked from commit 1c89db4)
1 parent 2bf242a commit 2a2fda2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

neutron/tests/functional/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_ovsdb_monitor.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,12 @@ def check_agent_ts():
470470
nb_cfg_timestamp = timestamp * 1000
471471
self.sb_api.db_set('Chassis_Private', self.chassis_name, (
472472
'nb_cfg_timestamp', nb_cfg_timestamp)).execute(check_error=True)
473+
# Also increment nb_cfg by 1 to trigger ChassisAgentWriteEvent which
474+
# is responsible to update AgentCache
475+
old_nb_cfg = self.sb_api.db_get('Chassis_Private', self.chassis_name,
476+
'nb_cfg').execute(check_error=True)
477+
self.sb_api.db_set('Chassis_Private', self.chassis_name, (
478+
'nb_cfg', old_nb_cfg + 1)).execute(check_error=True)
473479
try:
474480
n_utils.wait_until_true(check_agent_ts, timeout=5)
475481
except n_utils.WaitTimeout:

0 commit comments

Comments
 (0)