diff --git a/SOURCES/openvswitch-2.17.0.patch b/SOURCES/openvswitch-2.17.0.patch index 0cd0470..46bc388 100644 --- a/SOURCES/openvswitch-2.17.0.patch +++ b/SOURCES/openvswitch-2.17.0.patch @@ -99821,7 +99821,7 @@ index 482400d8d1..4d57efa5ce 100644 } /* Release the RX queue. */ diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c -index b6b29c75e3..dbdd540d09 100644 +index b6b29c75e3..4e9aa6fd1c 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -622,9 +622,9 @@ dpdk_mp_full(const struct rte_mempool *mp) OVS_REQUIRES(dpdk_mp_mutex) @@ -99845,7 +99845,33 @@ index b6b29c75e3..dbdd540d09 100644 bool reuse = false; ovs_mutex_lock(&dpdk_mp_mutex); -@@ -2561,90 +2561,6 @@ netdev_dpdk_vhost_update_tx_counters(struct netdev_dpdk *dev, +@@ -1963,17 +1963,16 @@ netdev_dpdk_set_config(struct netdev *netdev, const struct smap *args, + struct eth_addr mac; + + if (!dpdk_port_is_representor(dev)) { +- VLOG_WARN_BUF(errp, "'%s' is trying to set the VF MAC '%s' " +- "but 'options:dpdk-vf-mac' is only supported for " +- "VF representors.", +- netdev_get_name(netdev), vf_mac); ++ VLOG_WARN("'%s' is trying to set the VF MAC '%s' " ++ "but 'options:dpdk-vf-mac' is only supported for " ++ "VF representors.", ++ netdev_get_name(netdev), vf_mac); + } else if (!eth_addr_from_string(vf_mac, &mac)) { +- VLOG_WARN_BUF(errp, "interface '%s': cannot parse VF MAC '%s'.", +- netdev_get_name(netdev), vf_mac); ++ VLOG_WARN("interface '%s': cannot parse VF MAC '%s'.", ++ netdev_get_name(netdev), vf_mac); + } else if (eth_addr_is_multicast(mac)) { +- VLOG_WARN_BUF(errp, +- "interface '%s': cannot set VF MAC to multicast " +- "address '%s'.", netdev_get_name(netdev), vf_mac); ++ VLOG_WARN("interface '%s': cannot set VF MAC to multicast " ++ "address '%s'.", netdev_get_name(netdev), vf_mac); + } else if (!eth_addr_equals(dev->requested_hwaddr, mac)) { + dev->requested_hwaddr = mac; + netdev_request_reconfigure(netdev); +@@ -2561,90 +2560,6 @@ netdev_dpdk_vhost_update_tx_counters(struct netdev_dpdk *dev, } } @@ -99936,7 +99962,7 @@ index b6b29c75e3..dbdd540d09 100644 static void netdev_dpdk_extbuf_free(void *addr OVS_UNUSED, void *opaque) { -@@ -2749,76 +2665,69 @@ dpdk_copy_dp_packet_to_mbuf(struct rte_mempool *mp, struct dp_packet *pkt_orig) +@@ -2749,76 +2664,69 @@ dpdk_copy_dp_packet_to_mbuf(struct rte_mempool *mp, struct dp_packet *pkt_orig) return pkt_dest; } @@ -100068,7 +100094,7 @@ index b6b29c75e3..dbdd540d09 100644 } static int -@@ -2826,25 +2735,92 @@ netdev_dpdk_vhost_send(struct netdev *netdev, int qid, +@@ -2826,25 +2734,92 @@ netdev_dpdk_vhost_send(struct netdev *netdev, int qid, struct dp_packet_batch *batch, bool concurrent_txq OVS_UNUSED) { @@ -100171,7 +100197,7 @@ index b6b29c75e3..dbdd540d09 100644 } if (OVS_UNLIKELY(concurrent_txq)) { -@@ -2852,56 +2828,27 @@ netdev_dpdk_send__(struct netdev_dpdk *dev, int qid, +@@ -2852,56 +2827,27 @@ netdev_dpdk_send__(struct netdev_dpdk *dev, int qid, rte_spinlock_lock(&dev->tx_q[qid].tx_lock); } @@ -100240,7 +100266,7 @@ index b6b29c75e3..dbdd540d09 100644 return 0; } -@@ -4686,11 +4633,11 @@ trtcm_policer_qos_construct(const struct smap *details, +@@ -4686,11 +4632,11 @@ trtcm_policer_qos_construct(const struct smap *details, static void trtcm_policer_qos_destruct(struct qos_conf *conf) { @@ -111349,7 +111375,7 @@ index 30760233ee..e685c8103b 100644 raft_server_destroy(s); } diff --git a/ovsdb/raft.c b/ovsdb/raft.c -index 1a3447a8dd..1ad74bf124 100644 +index 1a3447a8dd..bbd57be2e9 100644 --- a/ovsdb/raft.c +++ b/ovsdb/raft.c @@ -74,9 +74,13 @@ enum raft_failure_test { @@ -111411,7 +111437,23 @@ index 1a3447a8dd..1ad74bf124 100644 if (!raft_find_server(raft, &s->sid)) { VLOG(level, "server %s added to configuration", s->nickname); -@@ -1240,10 +1252,30 @@ raft_transfer_leadership(struct raft *raft, const char *reason) +@@ -995,8 +1007,13 @@ raft_conn_update_probe_interval(struct raft *raft, struct raft_conn *r_conn) + * inactivity probe follower will just try to initiate election + * indefinitely staying in 'candidate' role. And the leader will continue + * to send heartbeats to the dead connection thinking that remote server +- * is still part of the cluster. */ +- int probe_interval = raft->election_timer + ELECTION_RANGE_MSEC; ++ * is still part of the cluster. ++ * ++ * While joining, the real value of the election timeout is not known to ++ * this server, so using the maximum. */ ++ int probe_interval = (raft->joining ? ELECTION_MAX_MSEC ++ : raft->election_timer) ++ + ELECTION_RANGE_MSEC; + + jsonrpc_session_set_probe_interval(r_conn->js, probe_interval); + } +@@ -1240,10 +1257,30 @@ raft_transfer_leadership(struct raft *raft, const char *reason) return; } @@ -111445,7 +111487,7 @@ index 1a3447a8dd..1ad74bf124 100644 struct raft_conn *conn = raft_find_conn_by_sid(raft, &s->sid); if (!conn) { continue; -@@ -1259,7 +1291,10 @@ raft_transfer_leadership(struct raft *raft, const char *reason) +@@ -1259,7 +1296,10 @@ raft_transfer_leadership(struct raft *raft, const char *reason) .term = raft->term, } }; @@ -111457,7 +111499,7 @@ index 1a3447a8dd..1ad74bf124 100644 raft_record_note(raft, "transfer leadership", "transferring leadership to %s because %s", -@@ -1267,6 +1302,23 @@ raft_transfer_leadership(struct raft *raft, const char *reason) +@@ -1267,6 +1307,23 @@ raft_transfer_leadership(struct raft *raft, const char *reason) break; } } @@ -111481,7 +111523,7 @@ index 1a3447a8dd..1ad74bf124 100644 } /* Send a RemoveServerRequest to the rest of the servers in the cluster. -@@ -1376,8 +1428,8 @@ raft_close__(struct raft *raft) +@@ -1376,8 +1433,8 @@ raft_close__(struct raft *raft) raft->remove_server = NULL; } @@ -111492,7 +111534,7 @@ index 1a3447a8dd..1ad74bf124 100644 raft_conn_close(conn); } } -@@ -1713,8 +1765,8 @@ raft_waiters_run(struct raft *raft) +@@ -1713,8 +1770,8 @@ raft_waiters_run(struct raft *raft) } uint64_t cur = ovsdb_log_commit_progress(raft->log); @@ -111503,7 +111545,7 @@ index 1a3447a8dd..1ad74bf124 100644 if (cur < w->commit_ticket) { break; } -@@ -1736,8 +1788,8 @@ raft_waiters_wait(struct raft *raft) +@@ -1736,8 +1793,8 @@ raft_waiters_wait(struct raft *raft) static void raft_waiters_destroy(struct raft *raft) { @@ -111514,7 +111556,7 @@ index 1a3447a8dd..1ad74bf124 100644 raft_waiter_destroy(w); } } -@@ -1867,6 +1919,8 @@ raft_open_conn(struct raft *raft, const char *address, const struct uuid *sid) +@@ -1867,6 +1924,8 @@ raft_open_conn(struct raft *raft, const char *address, const struct uuid *sid) static void raft_conn_close(struct raft_conn *conn) { @@ -111523,7 +111565,7 @@ index 1a3447a8dd..1ad74bf124 100644 jsonrpc_session_close(conn->js); ovs_list_remove(&conn->list_node); free(conn->nickname); -@@ -1921,6 +1975,13 @@ raft_run(struct raft *raft) +@@ -1921,6 +1980,13 @@ raft_run(struct raft *raft) return; } @@ -111537,7 +111579,7 @@ index 1a3447a8dd..1ad74bf124 100644 raft_waiters_run(raft); if (!raft->listener && time_msec() >= raft->listen_backoff) { -@@ -1957,16 +2018,29 @@ raft_run(struct raft *raft) +@@ -1957,16 +2023,29 @@ raft_run(struct raft *raft) } /* Close unneeded sessions. */ @@ -111570,7 +111612,7 @@ index 1a3447a8dd..1ad74bf124 100644 HMAP_FOR_EACH (server, hmap_node, &raft->servers) { raft_open_conn(raft, server->address, &server->sid); } -@@ -2039,11 +2113,18 @@ raft_run(struct raft *raft) +@@ -2039,11 +2118,18 @@ raft_run(struct raft *raft) * commands becomes new leader: the pending commands can still complete * if the crashed leader has replicated the transactions to majority of * followers before it crashed. */ @@ -111592,7 +111634,7 @@ index 1a3447a8dd..1ad74bf124 100644 } } raft_reset_ping_timer(raft); -@@ -2235,6 +2316,9 @@ raft_command_initiate(struct raft *raft, +@@ -2235,6 +2321,9 @@ raft_command_initiate(struct raft *raft, if (failure_test == FT_CRASH_AFTER_SEND_APPEND_REQ) { ovs_fatal(0, "Raft test: crash after sending append_request."); } @@ -111602,7 +111644,7 @@ index 1a3447a8dd..1ad74bf124 100644 raft_reset_ping_timer(raft); return cmd; -@@ -2243,8 +2327,12 @@ raft_command_initiate(struct raft *raft, +@@ -2243,8 +2332,12 @@ raft_command_initiate(struct raft *raft, static void log_all_commands(struct raft *raft) { @@ -111617,7 +111659,7 @@ index 1a3447a8dd..1ad74bf124 100644 VLOG_DBG("raft command eid: "UUID_FMT, UUID_ARGS(&cmd->eid)); } } -@@ -2398,8 +2486,8 @@ raft_command_complete(struct raft *raft, +@@ -2398,8 +2491,8 @@ raft_command_complete(struct raft *raft, static void raft_complete_all_commands(struct raft *raft, enum raft_command_status status) { @@ -111628,7 +111670,7 @@ index 1a3447a8dd..1ad74bf124 100644 raft_command_complete(raft, cmd, status); } } -@@ -2601,11 +2689,24 @@ raft_become_follower(struct raft *raft) +@@ -2601,11 +2694,24 @@ raft_become_follower(struct raft *raft) * configuration is already part of the log. Possibly the configuration * log entry will not be committed, but until we know that we must use the * new configuration. Our AppendEntries processing will properly update @@ -111655,7 +111697,7 @@ index 1a3447a8dd..1ad74bf124 100644 } if (raft->remove_server) { raft_send_remove_server_reply__(raft, &raft->remove_server->sid, -@@ -2615,8 +2716,6 @@ raft_become_follower(struct raft *raft) +@@ -2615,8 +2721,6 @@ raft_become_follower(struct raft *raft) raft_server_destroy(raft->remove_server); raft->remove_server = NULL; } @@ -111664,7 +111706,21 @@ index 1a3447a8dd..1ad74bf124 100644 } static void -@@ -2708,6 +2807,18 @@ raft_become_leader(struct raft *raft) +@@ -2671,6 +2775,13 @@ raft_send_heartbeats(struct raft *raft) + raft_reset_ping_timer(raft); + } + ++static void ++raft_join_complete(struct raft *raft) ++{ ++ raft->joining = false; ++ raft_update_probe_intervals(raft); ++} ++ + /* Initializes the fields in 's' that represent the leader's view of the + * server. */ + static void +@@ -2708,6 +2819,18 @@ raft_become_leader(struct raft *raft) raft_reset_election_timer(raft); raft_reset_ping_timer(raft); @@ -111677,13 +111733,13 @@ index 1a3447a8dd..1ad74bf124 100644 + * we're becoming a cluster leader without receiving reply for a + * join request and will commit addition of this server ourselves. */ + VLOG_INFO_RL(&rl, "elected as leader while joining"); -+ raft->joining = false; ++ raft_join_complete(raft); + } + struct raft_server *s; HMAP_FOR_EACH (s, hmap_node, &raft->servers) { raft_server_init_leader(raft, s); -@@ -2865,61 +2976,85 @@ raft_update_commit_index(struct raft *raft, uint64_t new_commit_index) +@@ -2865,61 +2988,85 @@ raft_update_commit_index(struct raft *raft, uint64_t new_commit_index) return false; } @@ -111813,14 +111869,14 @@ index 1a3447a8dd..1ad74bf124 100644 + "added to configuration without reply " + "(eid: "UUID_FMT", commit index: %"PRIu64")", + UUID_ARGS(&e->eid), index); -+ raft->joining = false; ++ raft_join_complete(raft); + } + } + raft_servers_destroy(&servers); } } -@@ -3354,12 +3489,6 @@ raft_find_peer(struct raft *raft, const struct uuid *uuid) +@@ -3354,12 +3501,6 @@ raft_find_peer(struct raft *raft, const struct uuid *uuid) return s && !uuid_equals(&raft->sid, &s->sid) ? s : NULL; } @@ -111833,7 +111889,7 @@ index 1a3447a8dd..1ad74bf124 100644 /* Figure 3.1: "If there exists an N such that N > commitIndex, a * majority of matchIndex[i] >= N, and log[N].term == currentTerm, set * commitIndex = N (sections 3.5 and 3.6)." */ -@@ -3838,6 +3967,10 @@ raft_handle_add_server_request(struct raft *raft, +@@ -3838,6 +3979,10 @@ raft_handle_add_server_request(struct raft *raft, "to cluster "CID_FMT, s->nickname, SID_ARGS(&s->sid), rq->address, CID_ARGS(&raft->cid)); raft_send_append_request(raft, s, 0, "initialize new server"); @@ -111844,7 +111900,16 @@ index 1a3447a8dd..1ad74bf124 100644 } static void -@@ -4000,7 +4133,7 @@ raft_write_snapshot(struct raft *raft, struct ovsdb_log *log, +@@ -3852,7 +3997,7 @@ raft_handle_add_server_reply(struct raft *raft, + } + + if (rpy->success) { +- raft->joining = false; ++ raft_join_complete(raft); + + /* It is tempting, at this point, to check that this server is part of + * the current configuration. However, this is not necessarily the +@@ -4000,7 +4145,7 @@ raft_write_snapshot(struct raft *raft, struct ovsdb_log *log, if (error) { return error; } @@ -111853,7 +111918,7 @@ index 1a3447a8dd..1ad74bf124 100644 /* Write log records. */ for (uint64_t index = new_log_start; index < raft->log_end; index++) { -@@ -4142,6 +4275,10 @@ static void +@@ -4142,6 +4287,10 @@ static void raft_handle_install_snapshot_request( struct raft *raft, const struct raft_install_snapshot_request *rq) { @@ -111864,7 +111929,15 @@ index 1a3447a8dd..1ad74bf124 100644 if (raft_handle_install_snapshot_request__(raft, rq)) { union raft_rpc rpy = { .install_snapshot_reply = { -@@ -4940,6 +5077,8 @@ raft_unixctl_failure_test(struct unixctl_conn *conn OVS_UNUSED, +@@ -4820,6 +4969,7 @@ raft_get_election_timer_from_log(struct raft *raft) + break; + } + } ++ raft_update_probe_intervals(raft); + } + + static void +@@ -4940,6 +5090,8 @@ raft_unixctl_failure_test(struct unixctl_conn *conn OVS_UNUSED, failure_test = FT_CRASH_AFTER_SEND_EXEC_REQ; } else if (!strcmp(test, "crash-after-receiving-append-request-update")) { failure_test = FT_CRASH_AFTER_RECV_APPEND_REQ_UPDATE; @@ -111873,7 +111946,7 @@ index 1a3447a8dd..1ad74bf124 100644 } else if (!strcmp(test, "delay-election")) { failure_test = FT_DELAY_ELECTION; struct raft *raft; -@@ -4952,6 +5091,13 @@ raft_unixctl_failure_test(struct unixctl_conn *conn OVS_UNUSED, +@@ -4952,6 +5104,13 @@ raft_unixctl_failure_test(struct unixctl_conn *conn OVS_UNUSED, failure_test = FT_DONT_SEND_VOTE_REQUEST; } else if (!strcmp(test, "stop-raft-rpc")) { failure_test = FT_STOP_RAFT_RPC; @@ -113355,6 +113428,15 @@ index 220e5c7472..8ee8a99c22 100644 /usr/share/openvswitch/vswitch.ovsschema /usr/share/openvswitch/vtep.ovsschema %doc NOTICE README.rst NEWS rhel/README.RHEL.rst +diff --git a/rhel/usr_lib_systemd_system_ovsdb-server.service b/rhel/usr_lib_systemd_system_ovsdb-server.service +index 49dc06e38c..558632320c 100644 +--- a/rhel/usr_lib_systemd_system_ovsdb-server.service ++++ b/rhel/usr_lib_systemd_system_ovsdb-server.service +@@ -29,3 +29,4 @@ ExecStop=/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd stop + ExecReload=/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd \ + ${OVS_USER_OPT} \ + --no-monitor restart $OPTIONS ++TimeoutSec=300 diff --git a/tests/.gitignore b/tests/.gitignore index a3d927e5d5..4c52fb2534 100644 --- a/tests/.gitignore diff --git a/SPECS/openvswitch2.17.spec b/SPECS/openvswitch2.17.spec index 9dbcb4e..7ec8dd3 100644 --- a/SPECS/openvswitch2.17.spec +++ b/SPECS/openvswitch2.17.spec @@ -63,7 +63,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.17.0 -Release: 163%{?dist} +Release: 165%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -749,6 +749,20 @@ exit 0 %endif %changelog +* Wed Apr 24 2024 Open vSwitch CI - 2.17.0-165 +- Merging upstream branch-2.17 [RH git: 838851db38] + Commit list: + b2e1911039 netdev-dpdk: Fix possible memory leak configuring VF MAC address. + + +* Tue Apr 23 2024 Open vSwitch CI - 2.17.0-164 +- Merging upstream branch-2.17 [RH git: f12e5b0242] + Commit list: + 091961542a ovsdb: raft: Fix probe intervals after install snapshot request. + 15720a3e24 ovsdb: raft: Fix inability to join a cluster with a large database. + 856cf68bca rhel/systemd: Set ovsdb-server timeout to 5 minutes. + + * Thu Apr 11 2024 Open vSwitch CI - 2.17.0-163 - Merging upstream branch-2.17 [RH git: 8ddde31ed4] Commit list: