diff --git a/SOURCES/openvswitch-3.3.0.patch b/SOURCES/openvswitch-3.3.0.patch index 73c8fd8..71a4fd5 100644 --- a/SOURCES/openvswitch-3.3.0.patch +++ b/SOURCES/openvswitch-3.3.0.patch @@ -6060,7 +6060,7 @@ index 587caf5e3e..3fa03d3c95 100644 index.remove(val) diff --git a/python/ovs/db/idl.py b/python/ovs/db/idl.py -index a80da84e7a..b6d5ed6972 100644 +index a80da84e7a..25faf3b764 100644 --- a/python/ovs/db/idl.py +++ b/python/ovs/db/idl.py @@ -35,9 +35,9 @@ ROW_CREATE = "create" @@ -6179,7 +6179,22 @@ index a80da84e7a..b6d5ed6972 100644 if changed: return Notice(op, row, Row.from_json(self, table, uuid, old)) return False -@@ -1854,7 +1859,7 @@ class Transaction(object): +@@ -1724,7 +1729,7 @@ class Transaction(object): + and ovs.ovsuuid.is_valid_string(json[1])): + uuid = ovs.ovsuuid.from_string(json[1]) + row = self._txn_rows.get(uuid, None) +- if row and row._data is None: ++ if row and row._data is None and not row._persist_uuid: + return ["named-uuid", _uuid_name_from_uuid(uuid)] + else: + return [self._substitute_uuids(elem) for elem in json] +@@ -1849,12 +1854,12 @@ class Transaction(object): + else: + # Let ovsdb-server decide whether to really delete it. + pass +- elif row._changes: ++ else: + op = {"table": row._table.name} if row._data is None: op["op"] = "insert" if row._persist_uuid: @@ -7427,7 +7442,7 @@ index 481afc08b3..9d8b4d06a4 100644 OVS_START_SHELL_HELPERS diff --git a/tests/ovsdb-idl.at b/tests/ovsdb-idl.at -index fb568dd823..0f6ebd4d34 100644 +index fb568dd823..2c7c53f296 100644 --- a/tests/ovsdb-idl.at +++ b/tests/ovsdb-idl.at @@ -167,8 +167,17 @@ m4_define([OVSDB_CHECK_IDL_REGISTER_COLUMNS_PY], @@ -7450,7 +7465,23 @@ index fb568dd823..0f6ebd4d34 100644 AT_CHECK([sort stdout | uuidfilt]m4_if([$6],,, [[| $6]]), [0], [$4]) OVSDB_SERVER_SHUTDOWN -@@ -747,6 +756,31 @@ OVSDB_CHECK_IDL([simple idl, conditional, multiple tables], +@@ -485,6 +494,15 @@ OVSDB_CHECK_IDL([simple idl, writing via IDL with unicode], + 003: done + ]]) + ++OVSDB_CHECK_IDL([simple idl, inserting without modifying a column, insert_no_columns_changed], ++ [], ++ [['insert_no_columns_changed']], ++ [[000: empty ++001: commit, status=success ++002: table simple: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1> ++003: done ++]]) ++ + m4_define([OVSDB_CHECK_IDL_PY_WITH_EXPOUT], + [AT_SETUP([$1 - Python3]) + AT_KEYWORDS([ovsdb server idl positive Python $5]) +@@ -747,6 +765,31 @@ OVSDB_CHECK_IDL([simple idl, conditional, multiple tables], 009: done ]]) @@ -7482,7 +7513,7 @@ index fb568dd823..0f6ebd4d34 100644 OVSDB_CHECK_IDL([self-linking idl, consistent ops], [], [['["idltest", -@@ -1119,6 +1153,19 @@ OVSDB_CHECK_IDL_FETCH_COLUMNS([simple idl, initially populated], +@@ -1119,6 +1162,19 @@ OVSDB_CHECK_IDL_FETCH_COLUMNS([simple idl, initially populated], 003: done ]]) @@ -7502,7 +7533,7 @@ index fb568dd823..0f6ebd4d34 100644 m4_define([OVSDB_CHECK_IDL_WO_MONITOR_COND_PY], [AT_SETUP([$1 - Python3]) AT_KEYWORDS([ovsdb server idl Python monitor $4]) -@@ -1132,7 +1179,8 @@ m4_define([OVSDB_CHECK_IDL_WO_MONITOR_COND_PY], +@@ -1132,7 +1188,8 @@ m4_define([OVSDB_CHECK_IDL_WO_MONITOR_COND_PY], AT_CLEANUP]) m4_define([OVSDB_CHECK_IDL_WO_MONITOR_COND], @@ -7512,7 +7543,7 @@ index fb568dd823..0f6ebd4d34 100644 OVSDB_CHECK_IDL_WO_MONITOR_COND([simple idl disable monitor-cond], -@@ -1274,6 +1322,33 @@ OVSDB_CHECK_IDL_TRACK([track, simple idl, initially populated], +@@ -1274,6 +1331,33 @@ OVSDB_CHECK_IDL_TRACK([track, simple idl, initially populated], 003: done ]]) @@ -7546,7 +7577,7 @@ index fb568dd823..0f6ebd4d34 100644 dnl This test creates database with weak references and checks that orphan dnl rows created for weak references are not available for iteration via dnl list of tracked changes. -@@ -1806,7 +1881,10 @@ OVSDB_CHECK_IDL_PARTIAL_UPDATE_MAP_COLUMN([map, simple2 idl-partial-update-map-c +@@ -1806,7 +1890,10 @@ OVSDB_CHECK_IDL_PARTIAL_UPDATE_MAP_COLUMN([map, simple2 idl-partial-update-map-c 007: name=String2 smap=[[key2 : value2]] imap=[[3 : myids2]] 008: After trying to delete a deleted element 009: name=String2 smap=[[key2 : value2]] imap=[[3 : myids2]] @@ -7558,7 +7589,7 @@ index fb568dd823..0f6ebd4d34 100644 ]]) OVSDB_CHECK_IDL_PY([partial-map idl], -@@ -1869,7 +1947,9 @@ OVSDB_CHECK_IDL_PARTIAL_UPDATE_SET_COLUMN([set, simple3 idl-partial-update-set-c +@@ -1869,7 +1956,9 @@ OVSDB_CHECK_IDL_PARTIAL_UPDATE_SET_COLUMN([set, simple3 idl-partial-update-set-c 009: table simple3: name=String2 uset=[<0>,<1>,<4>] uref=[] uuid=<2> 010: After add to other table + set of strong ref 011: table simple3: name=String2 uset=[<0>,<1>,<4>] uref=[<5>] uuid=<2> @@ -7569,7 +7600,7 @@ index fb568dd823..0f6ebd4d34 100644 ]]) OVSDB_CHECK_IDL_PY([partial-set idl], -@@ -2022,6 +2102,36 @@ OVSDB_CHECK_IDL_NOTIFY([simple idl verify notify], +@@ -2022,6 +2111,36 @@ OVSDB_CHECK_IDL_NOTIFY([simple idl verify notify], 015: done ]]) @@ -7606,6 +7637,39 @@ index fb568dd823..0f6ebd4d34 100644 # Tests to verify the functionality of the one column compound index. # It tests index for one column string and integer indexes. # The run of test-ovsdb generates the output of the display of data using the different indexes defined in +@@ -2707,7 +2826,7 @@ m4_define([OVSDB_CHECK_IDL_PERS_UUID_INSERT_C], + [0], [stdout], [stderr]) + AT_CHECK([sort stdout], + [0], [$3]) +- AT_CHECK([grep $4 stderr], [0], [ignore]) ++ m4_if([$4], [], [], [AT_CHECK([grep $4 stderr], [0], [ignore])]) + OVSDB_SERVER_SHUTDOWN + AT_CLEANUP]) + +@@ -2719,7 +2838,7 @@ m4_define([OVSDB_CHECK_IDL_PERS_UUID_INSERT_PY], + [0], [stdout], [stderr]) + AT_CHECK([sort stdout], + [0], [$3]) +- AT_CHECK([grep $4 stderr], [0], [ignore]) ++ m4_if([$4], [], [], [AT_CHECK([grep $4 stderr], [0], [ignore])]) + OVSDB_SERVER_SHUTDOWN + AT_CLEANUP]) + +@@ -2757,6 +2876,14 @@ OVSDB_CHECK_IDL_PERS_UUID_INSERT([simple idl, persistent uuid insert], + ]], + [['This UUID would duplicate a UUID already present within the table or deleted within the same transaction']]) + ++OVSDB_CHECK_IDL_PERS_UUID_INSERT([simple idl, persistent uuid insert uref], ++ [['insert_uuid_uref d7f2845f-2e8d-46a9-8330-f6d0b7d2ca36 689420a0-515b-4c0f-8eba-7ad59a344b54']], ++ [[000: empty ++001: commit, status=success ++002: table simple3: name= uset=[] uref=[689420a0-515b-4c0f-8eba-7ad59a344b54] uuid=d7f2845f-2e8d-46a9-8330-f6d0b7d2ca36 ++002: table simple4: name= uuid=689420a0-515b-4c0f-8eba-7ad59a344b54 ++003: done ++]]) + + m4_define([OVSDB_CHECK_IDL_CHANGE_AWARE], + [AT_SETUP([simple idl, database change aware, online conversion - $1]) diff --git a/tests/ovsdb-server.at b/tests/ovsdb-server.at index b8ccc4c8e2..ce6d32aee1 100644 --- a/tests/ovsdb-server.at @@ -10215,7 +10279,7 @@ index 08d2cbaebf..4e9a3ab5c2 100644 mp.max_link = n - 1; multipath_execute(&mp, &flow, &wc); diff --git a/tests/test-ovsdb.c b/tests/test-ovsdb.c -index c4ab899d45..710341b655 100644 +index c4ab899d45..8011850fdf 100644 --- a/tests/test-ovsdb.c +++ b/tests/test-ovsdb.c @@ -2023,6 +2023,24 @@ print_idl_row_updated_link2(const struct idltest_link2 *l2, int step) @@ -10303,7 +10367,65 @@ index c4ab899d45..710341b655 100644 if (!n) { print_and_log("%03d: empty", step); -@@ -2977,6 +3020,29 @@ do_idl_partial_update_map_column(struct ovs_cmdl_context *ctx) +@@ -2408,6 +2451,10 @@ idl_set(struct ovsdb_idl *idl, char *commands, int step) + struct ovsdb_idl_txn *txn; + enum ovsdb_idl_txn_status status; + bool increment = false; ++ /* FIXME: ovsdb_idl_check_consistency() doesn't currently handle refs added ++ * in the same txn, so if any op does this, we need to skip the check until ++ * that is fixed. */ ++ bool skip_pre_commit_consistency_check = false; + + txn = ovsdb_idl_txn_create(idl); + ovsdb_idl_check_consistency(idl); +@@ -2459,6 +2506,8 @@ idl_set(struct ovsdb_idl *idl, char *commands, int step) + + s = idltest_simple_insert(txn); + idltest_simple_set_i(s, atoi(arg1)); ++ } else if (!strcmp(name, "insert_no_columns_changed")) { ++ idltest_simple_insert(txn); + } else if (!strcmp(name, "insert_uuid")) { + struct idltest_simple *s; + +@@ -2472,6 +2521,26 @@ idl_set(struct ovsdb_idl *idl, char *commands, int step) + } + s = idltest_simple_insert_persist_uuid(txn, &s_uuid); + idltest_simple_set_i(s, atoi(arg2)); ++ } else if (!strcmp(name, "insert_uuid_uref")) { ++ struct idltest_simple3 *s3; ++ struct idltest_simple4 *s4; ++ ++ if (!arg1 || !arg2) { ++ ovs_fatal(0, ++ "\"insert_uuid_uref\" command requires 2 arguments"); ++ } ++ ++ struct uuid s3_uuid; ++ struct uuid s4_uuid; ++ if (!uuid_from_string(&s3_uuid, arg1) || ++ !uuid_from_string(&s4_uuid, arg2)) { ++ ovs_fatal( ++ 0, "\"insert_uuid_uref\" command requires 2 valid uuids"); ++ } ++ s4 = idltest_simple4_insert_persist_uuid(txn, &s4_uuid); ++ s3 = idltest_simple3_insert_persist_uuid(txn, &s3_uuid); ++ idltest_simple3_set_uref(s3, &s4, 1); ++ skip_pre_commit_consistency_check = true; + } else if (!strcmp(name, "delete")) { + const struct idltest_simple *s; + +@@ -2540,7 +2609,9 @@ idl_set(struct ovsdb_idl *idl, char *commands, int step) + } else { + ovs_fatal(0, "unknown command %s", name); + } +- ovsdb_idl_check_consistency(idl); ++ if (!skip_pre_commit_consistency_check) { ++ ovsdb_idl_check_consistency(idl); ++ } + } + + status = ovsdb_idl_txn_commit_block(txn); +@@ -2977,6 +3048,29 @@ do_idl_partial_update_map_column(struct ovs_cmdl_context *ctx) printf("%03d: After trying to delete a deleted element\n", step++); dump_simple2(idl, myRow, step++); @@ -10333,7 +10455,7 @@ index c4ab899d45..710341b655 100644 ovsdb_idl_destroy(idl); printf("%03d: End test\n", step); } -@@ -3075,6 +3141,21 @@ do_idl_partial_update_set_column(struct ovs_cmdl_context *ctx) +@@ -3075,6 +3169,21 @@ do_idl_partial_update_set_column(struct ovs_cmdl_context *ctx) ovsdb_idl_get_initial_snapshot(idl); printf("%03d: After add to other table + set of strong ref\n", step++); dump_simple3(idl, myRow, step++); @@ -10356,7 +10478,7 @@ index c4ab899d45..710341b655 100644 printf("%03d: End test\n", step); } diff --git a/tests/test-ovsdb.py b/tests/test-ovsdb.py -index 48f8ee2d70..67a45f044b 100644 +index 48f8ee2d70..fece1040c4 100644 --- a/tests/test-ovsdb.py +++ b/tests/test-ovsdb.py @@ -228,6 +228,10 @@ def get_link2_table_printable_row(row): @@ -10385,7 +10507,14 @@ index 48f8ee2d70..67a45f044b 100644 if "singleton" in idl.tables: sng = idl.tables["singleton"].rows for row in sng.values(): -@@ -434,7 +446,7 @@ def idl_set(idl, commands, step): +@@ -429,14 +441,26 @@ def idl_set(idl, commands, step): + + s = txn.insert(idl.tables["simple"]) + s.i = int(args[0]) ++ elif name == "insert_no_columns_changed": ++ txn.insert(idl.tables["simple"]) + elif name == "insert_uuid": + if len(args) != 2: sys.stderr.write('"set" command requires 2 argument\n') sys.exit(1) @@ -10393,8 +10522,20 @@ index 48f8ee2d70..67a45f044b 100644 + s = txn.insert(idl.tables["simple"], new_uuid=uuid.UUID(args[0]), persist_uuid=True) s.i = int(args[1]) ++ elif name == "insert_uuid_uref": ++ if len(args) != 2: ++ sys.stderr.write('"set" command requires 2 argument\n') ++ sys.exit(1) ++ ++ s4 = txn.insert(idl.tables["simple4"], new_uuid=uuid.UUID(args[1]), ++ persist_uuid=True) ++ s3 = txn.insert(idl.tables["simple3"], new_uuid=uuid.UUID(args[0]), ++ persist_uuid=True) ++ s3.uref = s4 elif name == "delete": -@@ -690,6 +702,9 @@ def do_idl(schema_file, remote, *commands): + if len(args) != 1: + sys.stderr.write('"delete" command requires 1 argument\n') +@@ -690,6 +714,9 @@ def do_idl(schema_file, remote, *commands): idl = ovs.db.idl.Idl(remote, schema_helper, leader_only=False) if "simple3" in idl.tables: idl.index_create("simple3", "simple3_by_name") diff --git a/SPECS/openvswitch3.3.spec b/SPECS/openvswitch3.3.spec index 7f7d6ee..acdc8a0 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.4 -Release: 98%{?dist} +Release: 99%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -786,6 +786,13 @@ exit 0 %endif %changelog +* Fri Feb 28 2025 Open vSwitch CI - 3.3.0-99 +- Merging upstream branch-3.3 [RH git: 09c9d5435f] + Commit list: + 640aaf88a7 python: ovsdb-idl: Fix persist_uuid references. + 7d4beb67b3 python: ovsdb-idl: Handle inserts w/o changes. + + * Thu Feb 27 2025 Open vSwitch CI - 3.3.0-98 - Merging upstream branch-3.3 [RH git: 5c6d415158] Commit list: