diff --git a/SOURCES/openvswitch-3.5.0.patch b/SOURCES/openvswitch-3.5.0.patch index acc929c..f9324d6 100644 --- a/SOURCES/openvswitch-3.5.0.patch +++ b/SOURCES/openvswitch-3.5.0.patch @@ -53,6 +53,174 @@ index e59ff17ade..d9962765f1 100644 if (err) { nh_s_ip6 = s_ip6; } +diff --git a/python/ovs/db/idl.py b/python/ovs/db/idl.py +index c8cc543465..384428c3fc 100644 +--- a/python/ovs/db/idl.py ++++ b/python/ovs/db/idl.py +@@ -1731,7 +1731,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] +@@ -1856,7 +1856,7 @@ 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" +diff --git a/tests/ovsdb-idl.at b/tests/ovsdb-idl.at +index f9f79f1941..bac6bf2764 100644 +--- a/tests/ovsdb-idl.at ++++ b/tests/ovsdb-idl.at +@@ -494,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([ovsdb-idl - $1 - Python3]) + AT_KEYWORDS([ovsdb server idl positive Python $5]) +@@ -2817,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]) + +@@ -2829,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]) + +@@ -2867,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 ++]]) + + OVSDB_CHECK_IDL_PY([simple idl, python, add_op], + [], +diff --git a/tests/test-ovsdb.c b/tests/test-ovsdb.c +index 710341b655..8011850fdf 100644 +--- a/tests/test-ovsdb.c ++++ b/tests/test-ovsdb.c +@@ -2451,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); +@@ -2502,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; + +@@ -2515,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; + +@@ -2583,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); +diff --git a/tests/test-ovsdb.py b/tests/test-ovsdb.py +index 57fc1d4497..b690b4f076 100644 +--- a/tests/test-ovsdb.py ++++ b/tests/test-ovsdb.py +@@ -508,6 +508,8 @@ 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') +@@ -516,6 +518,17 @@ def idl_set(idl, commands, step): + 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 == "add_op": + if len(args) != 1: + sys.stderr.write('"add_op" command requires 1 argument\n') diff --git a/dpdk/VERSION b/dpdk/VERSION index 0a492611a0..9e2934aa34 100644 --- a/dpdk/VERSION diff --git a/SPECS/openvswitch3.5.spec b/SPECS/openvswitch3.5.spec index ca73d71..6d2f153 100644 --- a/SPECS/openvswitch3.5.spec +++ b/SPECS/openvswitch3.5.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 3.5.0 -Release: 6%{?dist} +Release: 7%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -788,6 +788,13 @@ exit 0 %endif %changelog +* Fri Feb 28 2025 Open vSwitch CI - 3.5.0-7 +- Merging upstream branch-3.5 [RH git: 66800bd643] + Commit list: + 0aa6a73d33 python: ovsdb-idl: Fix persist_uuid references. + b11084dc7d python: ovsdb-idl: Handle inserts w/o changes. + + * Fri Feb 28 2025 Open vSwitch CI - 3.5.0-6 - Merging upstream branch-3.5 [RH git: af1bdb9d4d] Commit list: