diff --git a/SOURCES/openvswitch-3.3.0.patch b/SOURCES/openvswitch-3.3.0.patch index 6f74add..84d9bc6 100644 --- a/SOURCES/openvswitch-3.3.0.patch +++ b/SOURCES/openvswitch-3.3.0.patch @@ -2498,6 +2498,89 @@ index f463afcb3d..ac3d37ac40 100644 } else if (!strcmp(test, "transfer-leadership")) { failure_test = FT_TRANSFER_LEADERSHIP; } else if (!strcmp(test, "clear")) { +diff --git a/python/ovs/db/idl.py b/python/ovs/db/idl.py +index a80da84e7a..c1341fc2a1 100644 +--- a/python/ovs/db/idl.py ++++ b/python/ovs/db/idl.py +@@ -35,9 +35,9 @@ ROW_CREATE = "create" + ROW_UPDATE = "update" + ROW_DELETE = "delete" + +-OVSDB_UPDATE = 0 +-OVSDB_UPDATE2 = 1 +-OVSDB_UPDATE3 = 2 ++OVSDB_UPDATE = "update" ++OVSDB_UPDATE2 = "update2" ++OVSDB_UPDATE3 = "update3" + + CLUSTERED = "clustered" + RELAY = "relay" +@@ -77,7 +77,7 @@ class ColumnDefaultDict(dict): + return item in self.keys() + + +-class Monitor(enum.IntEnum): ++class Monitor(enum.Enum): + monitor = OVSDB_UPDATE + monitor_cond = OVSDB_UPDATE2 + monitor_cond_since = OVSDB_UPDATE3 +@@ -465,23 +465,18 @@ class Idl(object): + self.__parse_update(msg.params[2], OVSDB_UPDATE3) + self.last_id = msg.params[1] + elif (msg.type == ovs.jsonrpc.Message.T_NOTIFY +- and msg.method == "update2" +- and len(msg.params) == 2): +- # Database contents changed. +- self.__parse_update(msg.params[1], OVSDB_UPDATE2) +- elif (msg.type == ovs.jsonrpc.Message.T_NOTIFY +- and msg.method == "update" ++ and msg.method in (OVSDB_UPDATE, OVSDB_UPDATE2) + and len(msg.params) == 2): + # Database contents changed. + if msg.params[0] == str(self.server_monitor_uuid): +- self.__parse_update(msg.params[1], OVSDB_UPDATE, ++ self.__parse_update(msg.params[1], msg.method, + tables=self.server_tables) + self.change_seqno = previous_change_seqno + if not self.__check_server_db(): + self.force_reconnect() + break + else: +- self.__parse_update(msg.params[1], OVSDB_UPDATE) ++ self.__parse_update(msg.params[1], msg.method) + elif self.handle_monitor_canceled(msg): + break + elif self.handle_monitor_cancel_reply(msg): +@@ -540,7 +535,7 @@ class Idl(object): + # Reply to our "monitor" of _Server request. + try: + self._server_monitor_request_id = None +- self.__parse_update(msg.result, OVSDB_UPDATE, ++ self.__parse_update(msg.result, OVSDB_UPDATE2, + tables=self.server_tables) + self.change_seqno = previous_change_seqno + if self.__check_server_db(): +@@ -579,6 +574,11 @@ class Idl(object): + elif msg.type == ovs.jsonrpc.Message.T_NOTIFY and msg.id == "echo": + # Reply to our echo request. Ignore it. + pass ++ elif (msg.type == ovs.jsonrpc.Message.T_ERROR and ++ self.state == self.IDL_S_SERVER_MONITOR_REQUESTED and ++ msg.id == self._server_monitor_request_id): ++ self._server_monitor_request_id = None ++ self.__send_monitor_request() + elif (msg.type == ovs.jsonrpc.Message.T_ERROR and + self.state == ( + self.IDL_S_DATA_MONITOR_COND_SINCE_REQUESTED) and +@@ -912,7 +912,7 @@ class Idl(object): + monitor_request = {"columns": columns} + monitor_requests[table.name] = [monitor_request] + msg = ovs.jsonrpc.Message.create_request( +- 'monitor', [self._server_db.name, ++ 'monitor_cond', [self._server_db.name, + str(self.server_monitor_uuid), + monitor_requests]) + self._server_monitor_request_id = msg.id diff --git a/python/ovs/fatal_signal.py b/python/ovs/fatal_signal.py index cb2e99e87d..16a7e78a03 100644 --- a/python/ovs/fatal_signal.py @@ -3046,6 +3129,40 @@ index 481afc08b3..9d8b4d06a4 100644 OVS_START_SHELL_HELPERS +diff --git a/tests/ovsdb-idl.at b/tests/ovsdb-idl.at +index fb568dd823..a8df11ac48 100644 +--- a/tests/ovsdb-idl.at ++++ b/tests/ovsdb-idl.at +@@ -1119,6 +1119,19 @@ OVSDB_CHECK_IDL_FETCH_COLUMNS([simple idl, initially populated], + 003: done + ]]) + ++m4_define([OVSDB_CHECK_IDL_WO_MONITOR_COND_C], ++ [AT_SETUP([$1 - C]) ++ AT_KEYWORDS([ovsdb server idl monitor $4]) ++ OVSDB_START_IDLTEST ++ AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/disable-monitor-cond]) ++ ++ AT_CHECK([test-ovsdb '-vPATTERN:console:test-ovsdb|%c|%m' -vjsonrpc -t10 idl unix:socket $2], ++ [0], [stdout], [ignore]) ++ AT_CHECK([sort stdout | uuidfilt]m4_if([$5],,, [[| $5]]), ++ [0], [$3]) ++ OVSDB_SERVER_SHUTDOWN ++ AT_CLEANUP]) ++ + m4_define([OVSDB_CHECK_IDL_WO_MONITOR_COND_PY], + [AT_SETUP([$1 - Python3]) + AT_KEYWORDS([ovsdb server idl Python monitor $4]) +@@ -1132,7 +1145,8 @@ m4_define([OVSDB_CHECK_IDL_WO_MONITOR_COND_PY], + AT_CLEANUP]) + + m4_define([OVSDB_CHECK_IDL_WO_MONITOR_COND], +- [OVSDB_CHECK_IDL_WO_MONITOR_COND_PY($@)]) ++ [OVSDB_CHECK_IDL_WO_MONITOR_COND_C($@) ++ OVSDB_CHECK_IDL_WO_MONITOR_COND_PY($@)]) + + + OVSDB_CHECK_IDL_WO_MONITOR_COND([simple idl disable monitor-cond], diff --git a/tests/ovsdb-server.at b/tests/ovsdb-server.at index b8ccc4c8e2..ce6d32aee1 100644 --- a/tests/ovsdb-server.at diff --git a/SPECS/openvswitch3.3.spec b/SPECS/openvswitch3.3.spec index 9ddbb7a..479a97b 100644 --- a/SPECS/openvswitch3.3.spec +++ b/SPECS/openvswitch3.3.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 3.3.0 -Release: 24%{?dist} +Release: 25%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -767,6 +767,13 @@ exit 0 %endif %changelog +* Mon Jun 03 2024 Open vSwitch CI - 3.3.0-25 +- Merging upstream branch-3.3 [RH git: 05cf3a52ce] + Commit list: + 5cfbc915de python: ovsdb-idl: Use monitor_cond for _Server DB. + 84c83589b6 ovsdb-idl: Add C IDL test for "monitor" fallback. + + * Mon Jun 03 2024 Open vSwitch CI - 3.3.0-24 - Merging upstream branch-3.3 [RH git: 0a6f4082a3] Commit list: