From 718dc8fca794307f4cda2d01c9552be8682e0fca Mon Sep 17 00:00:00 2001 From: Dumitru Ceara Date: Tue, 11 Jan 2022 17:37:41 +0100 Subject: python: idl: Resend requested but not acked conditions when reconnecting. When reconnecting forget about in-flight monitor condition changes if the user requested a newer condition already. This matches the C implementation, in ovsdb_cs_db_sync_condition(). Fixes: 46d44cf3be0d ("python: idl: Add monitor_cond_since support.") Signed-off-by: Dumitru Ceara Acked-By: Terry Wilson Signed-off-by: Ilya Maximets --- python/ovs/db/idl.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/ovs/db/idl.py b/python/ovs/db/idl.py index 02fc4c736..035191fc5 100644 --- a/python/ovs/db/idl.py +++ b/python/ovs/db/idl.py @@ -132,8 +132,10 @@ class ConditionState(object): def reset(self): """Reset a requested condition change back to new""" - if self._req_cond is not None and self._new_cond is None: - self._new_cond, self._req_cond = (self._req_cond, None) + if self._req_cond is not None: + if self._new_cond is None: + self._new_cond = self._req_cond + self._req_cond = None class Idl(object): -- cgit v1.2.1