diff --git a/SOURCES/openvswitch-3.1.0.patch b/SOURCES/openvswitch-3.1.0.patch index ae6698d..a152e8c 100644 --- a/SOURCES/openvswitch-3.1.0.patch +++ b/SOURCES/openvswitch-3.1.0.patch @@ -6140,6 +6140,18 @@ index d00911828..b0f444169 100644 install-data-local: ovs-install-data-local UNINSTALL_LOCAL += ovs-uninstall-local +diff --git a/python/ovs/db/idl.py b/python/ovs/db/idl.py +index 9fc2159b0..16ece0334 100644 +--- a/python/ovs/db/idl.py ++++ b/python/ovs/db/idl.py +@@ -494,6 +494,7 @@ class Idl(object): + if not msg.result[0]: + self.__clear() + self.__parse_update(msg.result[2], OVSDB_UPDATE3) ++ self.last_id = msg.result[1] + elif self.state == self.IDL_S_DATA_MONITOR_COND_REQUESTED: + self.__clear() + self.__parse_update(msg.result, OVSDB_UPDATE2) diff --git a/python/ovs/stream.py b/python/ovs/stream.py index ac5b0fd0c..b32341076 100644 --- a/python/ovs/stream.py @@ -6869,7 +6881,7 @@ index e72bf0606..fd1c7a239 100644 [{"count":1},{"details":"cannot delete b row <0> because of 2 remaining reference(s)","error":"referential integrity violation"}] [{"count":1}] diff --git a/tests/ovsdb-idl.at b/tests/ovsdb-idl.at -index 5a7e76eaa..9d28672ef 100644 +index 5a7e76eaa..1dd334325 100644 --- a/tests/ovsdb-idl.at +++ b/tests/ovsdb-idl.at @@ -94,7 +94,7 @@ m4_define([OVSDB_CHECK_IDL_WRITE_CHANGED_ONLY_C], @@ -6890,6 +6902,59 @@ index 5a7e76eaa..9d28672ef 100644 [0], [stdout], [ignore]) AT_CHECK([sort stdout | uuidfilt]m4_if([$6],,, [[| $6]]), [0], [$4]) +@@ -2296,6 +2296,23 @@ CHECK_STREAM_OPEN_BLOCK([Python3], [$PYTHON3 $srcdir/test-stream.py], + CHECK_STREAM_OPEN_BLOCK([Python3], [$PYTHON3 $srcdir/test-stream.py], + [tcp6], [[[::1]]]) + ++dnl OVSDB_CLUSTER_CHECK_MONITOR_COND_SINCE_TXN_IDS(LOG) ++dnl ++dnl Looks up transaction IDs in the log of OVSDB client application. ++dnl All-zero UUID should not be sent within a monitor request more than once, ++dnl unless some database requests were lost (not replied). ++m4_define([OVSDB_CLUSTER_CHECK_MONITOR_COND_SINCE_TXN_IDS], ++[ ++ requests=$(grep -c 'send request' $1) ++ replies=$(grep -c 'received reply' $1) ++ ++ if test "$requests" -eq "$replies"; then ++ AT_CHECK([grep 'monitor_cond_since' $1 \ ++ | grep -c "00000000-0000-0000-0000-000000000000" | tr -d '\n'], ++ [0], [1]) ++ fi ++]) ++ + # same as OVSDB_CHECK_IDL but uses Python IDL implementation with tcp + # with multiple remotes to assert the idl connects to the leader of the Raft cluster + m4_define([OVSDB_CHECK_IDL_LEADER_ONLY_PY], +@@ -2311,10 +2328,11 @@ m4_define([OVSDB_CHECK_IDL_LEADER_ONLY_PY], + pids=$(cat s2.pid s3.pid s1.pid | tr '\n' ',') + echo $pids + AT_CHECK([$PYTHON3 $srcdir/test-ovsdb.py -t30 idl-cluster $srcdir/idltest.ovsschema $remotes $pids $3], +- [0], [stdout], [ignore]) ++ [0], [stdout], [stderr]) + remote=$(ovsdb_cluster_leader $remotes "idltest") + leader=$(echo $remote | cut -d'|' -f 1) + AT_CHECK([grep -F -- "${leader}" stdout], [0], [ignore]) ++ OVSDB_CLUSTER_CHECK_MONITOR_COND_SINCE_TXN_IDS([stderr]) + AT_CLEANUP]) + + OVSDB_CHECK_IDL_LEADER_ONLY_PY([Check Python IDL connects to leader], 3, ['remote']) +@@ -2357,6 +2375,7 @@ m4_define([OVSDB_CHECK_CLUSTER_IDL_C], + AT_CHECK([sort stdout | uuidfilt]m4_if([$7],,, [[| $7]]), + [0], [$5]) + m4_ifval([$8], [AT_CHECK([grep '$8' stderr], [1])], [], []) ++ OVSDB_CLUSTER_CHECK_MONITOR_COND_SINCE_TXN_IDS([stderr]) + AT_CLEANUP]) + + # Same as OVSDB_CHECK_CLUSTER_IDL_C but uses the Python IDL implementation. +@@ -2377,6 +2396,7 @@ m4_define([OVSDB_CHECK_CLUSTER_IDL_PY], + AT_CHECK([sort stdout | uuidfilt]m4_if([$7],,, [[| $7]]), + [0], [$5]) + m4_if([$8], [AT_CHECK([grep '$8' stderr], [1])], [], []) ++ OVSDB_CLUSTER_CHECK_MONITOR_COND_SINCE_TXN_IDS([stderr]) + AT_CLEANUP]) + + m4_define([OVSDB_CHECK_CLUSTER_IDL], diff --git a/tests/ovsdb-monitor.at b/tests/ovsdb-monitor.at index 3b622b3ec..82b0e9362 100644 --- a/tests/ovsdb-monitor.at diff --git a/SPECS/openvswitch3.1.spec b/SPECS/openvswitch3.1.spec index 6258d63..4672a30 100644 --- a/SPECS/openvswitch3.1.spec +++ b/SPECS/openvswitch3.1.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 3.1.0 -Release: 54%{?dist} +Release: 55%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -754,6 +754,12 @@ exit 0 %endif %changelog +* Mon Sep 18 2023 Open vSwitch CI - 3.1.0-55 +- Merging upstream branch-3.1 [RH git: e7379c38f3] + Commit list: + 95394b83c0 python: idl: Fix last-id update from a monitor reply. + + * Sat Sep 09 2023 Open vSwitch CI - 3.1.0-54 - Merging upstream branch-3.1 [RH git: 31ed7bcbea] Commit list: