diff --git a/SOURCES/openvswitch-2.17.0.patch b/SOURCES/openvswitch-2.17.0.patch index 48590fe..bb4ef2a 100644 --- a/SOURCES/openvswitch-2.17.0.patch +++ b/SOURCES/openvswitch-2.17.0.patch @@ -59514,7 +59514,7 @@ index d4a9e34cc4..df2e373c3c 100644 free(leader); } diff --git a/ovsdb/ovsdb.c b/ovsdb/ovsdb.c -index e6d866182c..91b4a01af8 100644 +index e6d866182c..3eb6ce870a 100644 --- a/ovsdb/ovsdb.c +++ b/ovsdb/ovsdb.c @@ -571,8 +571,8 @@ ovsdb_replace(struct ovsdb *dst, struct ovsdb *src) @@ -59528,6 +59528,15 @@ index e6d866182c..91b4a01af8 100644 ovsdb_trigger_prereplace_db(trigger); } +@@ -587,5 +587,8 @@ ovsdb_replace(struct ovsdb *dst, struct ovsdb *src) + + dst->rbac_role = ovsdb_get_table(dst, "RBAC_Role"); + ++ /* Get statistics from the new database. */ ++ dst->n_atoms = src->n_atoms; ++ + ovsdb_destroy(src); + } diff --git a/ovsdb/query.c b/ovsdb/query.c index de74519989..eebe564127 100644 --- a/ovsdb/query.c @@ -64359,7 +64368,7 @@ index 62e2b63832..092d9f81a2 100644 +006: done +]]) diff --git a/tests/ovsdb-server.at b/tests/ovsdb-server.at -index 876cb836cd..d49de0daa4 100644 +index 876cb836cd..4a183bf186 100644 --- a/tests/ovsdb-server.at +++ b/tests/ovsdb-server.at @@ -4,7 +4,7 @@ m4_define([OVSDB_SERVER_SHUTDOWN], @@ -64461,7 +64470,32 @@ index 876cb836cd..d49de0daa4 100644 n=0 fi echo $n -@@ -1319,15 +1318,14 @@ m4_define([OVSDB_CHECK_EXECUTION], +@@ -1293,6 +1292,24 @@ dnl After removing all the bridges, the number of atoms in the database + dnl should return to its initial value. + AT_CHECK([test $(get_memory_value atoms) -eq $initial_db_atoms]) + ++dnl Add a few more resources. ++for i in $(seq 1 10); do ++ cmd=$(add_ports $i $(($i / 4 + 1))) ++ AT_CHECK([ovs-vsctl --no-wait add-br br$i $cmd]) ++done ++check_atoms ++ ++db_atoms_before_conversion=$(get_memory_value atoms) ++ ++dnl Trigger online conversion. ++AT_CHECK([ovsdb-client convert $abs_top_srcdir/vswitchd/vswitch.ovsschema], ++ [0], [ignore], [ignore]) ++ ++dnl Check that conversion didn't change the number of atoms and the history ++dnl still has a reasonable size. ++check_atoms ++AT_CHECK([test $(get_memory_value atoms) -eq $db_atoms_before_conversion]) ++ + OVS_APP_EXIT_AND_WAIT([ovsdb-server]) + AT_CLEANUP + +@@ -1319,15 +1336,14 @@ m4_define([OVSDB_CHECK_EXECUTION], $2 > schema PKIDIR=$abs_top_builddir/tests AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore]) @@ -64480,7 +64514,7 @@ index 876cb836cd..d49de0daa4 100644 OVSDB_SERVER_SHUTDOWN AT_CLEANUP]) -@@ -1356,16 +1354,15 @@ m4_define([OVSDB_CHECK_EXECUTION], +@@ -1356,16 +1372,15 @@ m4_define([OVSDB_CHECK_EXECUTION], AT_SKIP_IF([test $HAVE_IPV6 = no]) $2 > schema PKIDIR=$abs_top_builddir/tests @@ -64500,7 +64534,7 @@ index 876cb836cd..d49de0daa4 100644 OVSDB_SERVER_SHUTDOWN AT_CLEANUP]) -@@ -1392,16 +1389,15 @@ m4_define([OVSDB_CHECK_EXECUTION], +@@ -1392,16 +1407,15 @@ m4_define([OVSDB_CHECK_EXECUTION], AT_KEYWORDS([ovsdb server positive tcp $5]) $2 > schema PKIDIR=$abs_top_builddir/tests @@ -64520,7 +64554,7 @@ index 876cb836cd..d49de0daa4 100644 OVSDB_SERVER_SHUTDOWN AT_CLEANUP]) -@@ -1429,16 +1425,15 @@ m4_define([OVSDB_CHECK_EXECUTION], +@@ -1429,16 +1443,15 @@ m4_define([OVSDB_CHECK_EXECUTION], AT_SKIP_IF([test $HAVE_IPV6 = no]) $2 > schema PKIDIR=$abs_top_builddir/tests @@ -64540,7 +64574,7 @@ index 876cb836cd..d49de0daa4 100644 OVSDB_SERVER_SHUTDOWN AT_CLEANUP]) -@@ -1518,9 +1513,9 @@ m4_define([OVSDB_CHECK_EXECUTION], +@@ -1518,9 +1531,9 @@ m4_define([OVSDB_CHECK_EXECUTION], target=4 $2 > schema schema_name=`ovsdb-tool schema-name schema` @@ -64551,7 +64585,7 @@ index 876cb836cd..d49de0daa4 100644 AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server1.log dnl --pidfile --remote=punix:db1.sock db1 ], [0], [ignore], [ignore]) -@@ -1576,12 +1571,11 @@ m4_define([OVSDB_CHECK_EXECUTION], +@@ -1576,12 +1589,11 @@ m4_define([OVSDB_CHECK_EXECUTION], AT_CHECK([ovsdb-tool create db1 schema], [0], [stdout], [ignore]) AT_CHECK([ovsdb-tool create db2 schema], [0], [stdout], [ignore]) @@ -64566,7 +64600,7 @@ index 876cb836cd..d49de0daa4 100644 m4_foreach([txn], [$3], [AT_CHECK([ovsdb-client transact 'txn'], [0], [stdout], [ignore]) -@@ -1622,11 +1616,10 @@ m4_define([OVSDB_CHECK_REPLICATION], +@@ -1622,11 +1634,10 @@ m4_define([OVSDB_CHECK_REPLICATION], AT_CHECK([ovsdb-tool create db1 schema], [0], [stdout], [ignore]) AT_CHECK([ovsdb-tool create db2 schema], [0], [stdout], [ignore]) @@ -64580,7 +64614,7 @@ index 876cb836cd..d49de0daa4 100644 m4_foreach([txn], [$3], [AT_CHECK([ ovsdb-client transact 'txn' ], [0], [stdout], [ignore]) -@@ -1694,6 +1687,7 @@ AT_CLEANUP +@@ -1694,6 +1705,7 @@ AT_CLEANUP #ovsdb-server/set-sync-exclude-tables command AT_SETUP([ovsdb-server/set-sync-exclude-tables]) @@ -64588,7 +64622,7 @@ index 876cb836cd..d49de0daa4 100644 AT_KEYWORDS([ovsdb server replication set-exclude-tables]) AT_SKIP_IF([test $DIFF_SUPPORTS_NORMAL_FORMAT = no]) -@@ -1702,12 +1696,10 @@ AT_CHECK([ovsdb-tool create db1 schema], [0], [stdout], [ignore]) +@@ -1702,12 +1714,10 @@ AT_CHECK([ovsdb-tool create db1 schema], [0], [stdout], [ignore]) AT_CHECK([ovsdb-tool create db2 schema], [0], [stdout], [ignore]) AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server1.log --pidfile --remote=punix:db.sock db1], [0], [ignore], [ignore]) @@ -64603,7 +64637,7 @@ index 876cb836cd..d49de0daa4 100644 AT_CHECK([ovsdb-client transact unix:db.sock \ '[["mydb", -@@ -1716,11 +1708,9 @@ AT_CHECK([ovsdb-client transact unix:db.sock \ +@@ -1716,11 +1726,9 @@ AT_CHECK([ovsdb-client transact unix:db.sock \ "row": {"number": 0, "name": "zero"}}, {"op": "insert", "table": "b", @@ -64617,7 +64651,7 @@ index 876cb836cd..d49de0daa4 100644 cat stdout > dump1 OVS_WAIT_UNTIL([ ovsdb-client dump unix:db2.sock | grep zero ]) AT_CHECK([ovsdb-client dump unix:db2.sock], [0], [stdout], [ignore]) -@@ -1744,16 +1734,15 @@ AT_CLEANUP +@@ -1744,16 +1752,15 @@ AT_CLEANUP #ovsdb-server/connect-active-ovsdb-server AT_SETUP([ovsdb-server/connect-active-server]) @@ -64636,7 +64670,7 @@ index 876cb836cd..d49de0daa4 100644 dnl Try to connect without specifying the active server. AT_CHECK([ovs-appctl -t "`pwd`"/unixctl2 ovsdb-server/connect-active-ovsdb-server], [0], -@@ -1783,6 +1772,7 @@ AT_CLEANUP +@@ -1783,6 +1790,7 @@ AT_CLEANUP #ovsdb-server/disconnect-active-server command AT_SETUP([ovsdb-server/disconnect-active-server]) @@ -64644,7 +64678,7 @@ index 876cb836cd..d49de0daa4 100644 AT_KEYWORDS([ovsdb server replication disconnect-active-server]) AT_SKIP_IF([test $DIFF_SUPPORTS_NORMAL_FORMAT = no]) -@@ -1791,10 +1781,8 @@ AT_CHECK([ovsdb-tool create db1 schema], [0], [stdout], [ignore]) +@@ -1791,10 +1799,8 @@ AT_CHECK([ovsdb-tool create db1 schema], [0], [stdout], [ignore]) AT_CHECK([ovsdb-tool create db2 schema], [0], [stdout], [ignore]) AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server1.log --pidfile --remote=punix:db.sock db1], [0], [ignore], [ignore]) @@ -64656,7 +64690,7 @@ index 876cb836cd..d49de0daa4 100644 AT_CHECK([ovsdb-client transact unix:db.sock \ '[["mydb", -@@ -1840,7 +1828,7 @@ AT_CHECK([uuidfilt output], [0], [7,9c7,8 +@@ -1840,7 +1846,7 @@ AT_CHECK([uuidfilt output], [0], [7,9c7,8 --- > _uuid name number > ----- ---- ------ @@ -64665,7 +64699,7 @@ index 876cb836cd..d49de0daa4 100644 dnl The backup server now become active, and can accept write transactions. AT_CHECK([ovsdb-client transact unix:db2.sock \ -@@ -1891,13 +1879,12 @@ dnl Start both 'db1' and 'db2' in backup mode. Let them backup from each +@@ -1891,13 +1897,12 @@ dnl Start both 'db1' and 'db2' in backup mode. Let them backup from each dnl other. This is not an supported operation state, but to simulate a start dnl up condition where an HA manger can select which one to be an active dnl server soon after. @@ -64682,7 +64716,7 @@ index 876cb836cd..d49de0daa4 100644 dnl dnl make sure both servers reached the replication state -@@ -1965,8 +1952,8 @@ AT_CHECK([ovsdb-tool transact db \ +@@ -1965,8 +1970,8 @@ AT_CHECK([ovsdb-tool transact db \ "row": {"number": 9, "name": "nine"}}]]'], [0], [ignore], [ignore]) dnl Start 'db', then try to be a back up server of itself. @@ -64693,7 +64727,7 @@ index 876cb836cd..d49de0daa4 100644 dnl Save the current content AT_CHECK([ovsdb-client dump unix:db.sock], [0], [stdout]) -@@ -1984,6 +1971,7 @@ AT_CHECK([diff dump1 dump2]) +@@ -1984,6 +1989,7 @@ AT_CHECK([diff dump1 dump2]) AT_CLEANUP AT_SETUP([ovsdb-server/read-only db:ptcp connection]) @@ -64701,7 +64735,7 @@ index 876cb836cd..d49de0daa4 100644 AT_KEYWORDS([ovsdb server read-only]) AT_DATA([schema], [[{"name": "mydb", -@@ -2072,12 +2060,10 @@ AT_CHECK([ovsdb-tool transact db2 \ +@@ -2072,12 +2078,10 @@ AT_CHECK([ovsdb-tool transact db2 \ "row": {"number": 10, "name": "ten"}}]]'], [0], [ignore], [ignore]) dnl Start both 'db1' and 'db2'. @@ -64717,7 +64751,7 @@ index 876cb836cd..d49de0daa4 100644 OVS_WAIT_UNTIL([ovs-appctl -t "`pwd`"/unixctl ovsdb-server/sync-status |grep active]) OVS_WAIT_UNTIL([ovs-appctl -t "`pwd`"/unixctl2 ovsdb-server/sync-status |grep active]) -@@ -2177,7 +2163,7 @@ dnl Starting a dummy server only to reserve some tcp port. +@@ -2177,7 +2181,7 @@ dnl Starting a dummy server only to reserve some tcp port. AT_CHECK([cp db db.tmp]) AT_CHECK([ovsdb-server -vfile -vvlog:off --log-file=listener.log dnl --detach --no-chdir dnl diff --git a/SPECS/openvswitch2.17.spec b/SPECS/openvswitch2.17.spec index 99a258f..74a7520 100644 --- a/SPECS/openvswitch2.17.spec +++ b/SPECS/openvswitch2.17.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.17.0 -Release: 71%{?dist} +Release: 72%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -743,6 +743,12 @@ exit 0 %endif %changelog +* Wed Jan 18 2023 Open vSwitch CI - 2.17.0-72 +- Merging upstream branch-2.17 [RH git: 2a84e6d692] + Commit list: + 206409bb79 ovsdb: Fix database statistics during the database replacement. + + * Mon Jan 09 2023 Open vSwitch CI - 2.17.0-71 - Merging upstream branch-2.17 [RH git: 96d27acbea] Commit list: