Skip to content

Commit

Permalink
Give bonding slaves time to implicitly activate.
Browse files Browse the repository at this point in the history
With bonded network configurations slaves interfaces will be
implicitly activate after br-ex is explicitly activated. This
implicit activation can take a number of seconds, during this
time if one and only one slave is explicitly activated the bonding
driver may set the same MAC address to both slaves. This will
cause the bond to fail when option fail_over_mac=follow is set.
This change gives bond slaves up to 5 seconds to implicitly
activate preventing the issue.

Link: openshift#4605
Signed-off-by: David Wilder <[email protected]>
  • Loading branch information
DaveWilder committed Dec 9, 2024
1 parent a6773f6 commit 7671280
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions templates/common/_base/files/configure-ovs-network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,13 @@ contents:
fi
fi
# slaves should implicitly activate, give them a chance to do so
if $is_slave; then
if ! timeout 5 bash -c "while ! nmcli -g GENERAL.STATE conn show "$conn" | grep activated; do sleep 1; done"; then
echo "WARNING: slave $conn did not implicitly activate in 5s, activating explicitly."
fi
fi
# Do not activate interfaces that are already active
# But set the entry in master_interfaces to true if this is a slave
# Also set autoconnect to yes
Expand Down

0 comments on commit 7671280

Please sign in to comment.