Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions templates/common/_base/files/configure-ovs-network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,16 @@ contents:
for conn in "${connections[@]}"; do
local slave_type=$(nmcli -g connection.slave-type connection show "$conn")
if [ "$slave_type" = "team" ] || [ "$slave_type" = "bond" ]; then
# Work around a Cisco switch issue: if a slave is detached from a bond
# (e.g. during NM reactivation) before LACP negotiation completes, the
# switch may mishandle LACP packets with agg=0. To avoid this, wait for
# LACP to finish (only applies to LACP bonds in state UP).
slave=$(nmcli -g connection.interface-name connection show "$conn")
if ip -d link show "$slave" | tr '\n' ' ' | grep -q 'state UP.*ad_aggregator_id'; then
if ! timeout 5 bash -c "while [ \$(ip -d link show \"$slave\" | grep -o \"collecting,distributing\" | wc -l) -lt 2 ]; do sleep 1; done"; then
echo "WARNING: LACP negotiation is not yet done on slave $conn."
fi
fi
mod_nm_conn "$conn" connection.autoconnect yes
fi
done
Expand Down