summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorDumitru Ceara <dceara@redhat.com>2022-12-13 18:11:18 +0100
committerIlya Maximets <i.maximets@ovn.org>2022-12-13 18:52:10 +0100
commita787fbbf9dd6a108a53053afb45fb59a0b58b514 (patch)
tree1ce87c72a83b3797aaf4151317bc6355cad4e904 /python
parent739bcf2263b3dfbc8a855c6e5b4a2b77742dd8db (diff)
downloadopenvswitch-a787fbbf9dd6a108a53053afb45fb59a0b58b514.tar.gz
ovsdb-cs: Consider default conditions implicitly acked.
When initializing a monitor table the default monitor condition is [True] which matches the behavior of the server (to send all rows of that table). There's no need to include this default condition in the initial monitor request so we can consider it implicitly acked by the server. This fixes the incorrect (one too large) expected condition sequence number reported by ovsdb_idl_set_condition() when application is trying to set a [True] condition for a new table. Reported-by: Numan Siddique <numans@ovn.org> Suggested-by: Ilya Maximets <i.maximets@ovn.org> Signed-off-by: Dumitru Ceara <dceara@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'python')
-rw-r--r--python/ovs/db/idl.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/ovs/db/idl.py b/python/ovs/db/idl.py
index fe66402cf..9fc2159b0 100644
--- a/python/ovs/db/idl.py
+++ b/python/ovs/db/idl.py
@@ -85,9 +85,9 @@ class Monitor(enum.IntEnum):
class ConditionState(object):
def __init__(self):
- self._ack_cond = None
+ self._ack_cond = [True]
self._req_cond = None
- self._new_cond = [True]
+ self._new_cond = None
def __iter__(self):
return iter([self._new_cond, self._req_cond, self._ack_cond])