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 <dce...@redhat.com> --- Note: I spotted this while reading the code when investigating a different issue and I didn't manage to find a test case that would reliably replicate it. Therefore I didn't add a test case. --- python/ovs/db/idl.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/ovs/db/idl.py b/python/ovs/db/idl.py index 02fc4c7368fa..035191fc56b9 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): _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev