28 lines
945 B
Diff
28 lines
945 B
Diff
commit acaf9c45a340f9bb49d6b21ba7ad60c21326ea73
|
|
Author: Mingming Cao <mmc@linux.vnet.ibm.com>
|
|
Date: Mon Nov 7 14:39:02 2022 -0800
|
|
|
|
hcnmgr: Fix setting primary slave across reboots
|
|
|
|
Using nmcli to set bonding of primary slave so that is set correctly
|
|
across reboots.
|
|
|
|
Signed-off-by: Mingming Cao <mmc@linux.vnet.ibm.com>
|
|
[tyreld: Reworded commit log]
|
|
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
|
|
|
|
diff --git a/scripts/hcnmgr b/scripts/hcnmgr
|
|
index 6946ff9..b5a6bfb 100644
|
|
--- a/scripts/hcnmgr
|
|
+++ b/scripts/hcnmgr
|
|
@@ -375,7 +375,8 @@ do_config_vdevice_nm() {
|
|
# if the device is primary, and link is up, force it as primary se
|
|
if [[ $MODE == "primary" ]]; then
|
|
hcnlog INFO "Change bonding primary slave to $DEVNAME"
|
|
- echo "$DEVNAME" >"$BOND_PATH"/primary
|
|
+ nmcli con mod id "$BONDNAME" +bond.options "primary=$DEVNAME"
|
|
+ nmcli con up "$BONDNAME"
|
|
fi
|
|
|
|
hcnlog DEBUG "do_config_vdevice: exit"
|