diff options
author | Dumitru Ceara <dceara@redhat.com> | 2022-01-11 17:37:41 +0100 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2022-01-31 21:23:47 +0100 |
commit | 718dc8fca794307f4cda2d01c9552be8682e0fca (patch) | |
tree | 531f16b83480fdeb53e50a820761baebbbd8847a /python | |
parent | 9632f5551f2ed5f38eeef1cc791253b4ee6263ce (diff) | |
download | openvswitch-718dc8fca794307f4cda2d01c9552be8682e0fca.tar.gz |
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 <dceara@redhat.com>
Acked-By: Terry Wilson <twilson@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'python')
-rw-r--r-- | python/ovs/db/idl.py | 6 |
1 files changed, 4 insertions, 2 deletions
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): |