From 17732be50e2aa1c0b94e50f637ee98c43fef897d Mon Sep 17 00:00:00 2001 From: bybai Date: Wed, 8 May 2019 00:00:32 -0400 Subject: [PATCH] extend nmcli autoconnect-retries and autoconnect-slaves instead of default value --- xCAT/postscripts/nicutils.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xCAT/postscripts/nicutils.sh b/xCAT/postscripts/nicutils.sh index 6c5e5cb23..594b7576a 100755 --- a/xCAT/postscripts/nicutils.sh +++ b/xCAT/postscripts/nicutils.sh @@ -1758,7 +1758,7 @@ function create_vlan_interface_nmcli { $nmcli con modify $con_name connection.id $tmp_con_name fi #create VLAN connetion - $nmcli con add type vlan con-name $con_name dev $ifname id $(( 10#$vlanid )) method none $_ipaddrs $_mtu connection.autoconnect-priority 9 autoconnect yes + $nmcli con add type vlan con-name $con_name dev $ifname id $(( 10#$vlanid )) method none $_ipaddrs $_mtu connection.autoconnect-priority 9 autoconnect yes connection.autoconnect-slaves 1 log_info "create NetworkManager connection for $ifname.$vlanid" #add extra params @@ -1970,7 +1970,7 @@ function create_bridge_interface_nmcli { fi fi log_info "create bridge connection $xcat_con_name" - cmd="$nmcli con add type bridge con-name $xcat_con_name ifname $ifname $_mtu connection.autoconnect-priority 9" + cmd="$nmcli con add type bridge con-name $xcat_con_name ifname $ifname $_mtu connection.autoconnect-priority 9 autoconnect yes connection.autoconnect-retries 0 connection.autoconnect-slaves 1" log_info $cmd $cmd if [ $? -ne 0 ]; then @@ -2006,10 +2006,10 @@ function create_bridge_interface_nmcli { fi con_use_same_dev=$(wait_nic_connect_intime $_port) if [ "$con_use_same_dev" != "--" -a -n "$con_use_same_dev" ]; then - cmd="$nmcli con mod "$con_use_same_dev" master $ifname $_mtu connection.autoconnect-priority 9" + cmd="$nmcli con mod "$con_use_same_dev" master $ifname $_mtu connection.autoconnect-priority 9 autoconnect yes connection.autoconnect-slaves 1" xcat_slave_con=$con_use_same_dev else - cmd="$nmcli con add type $_pretype con-name $xcat_slave_con ifname $_port master $ifname $_mtu connection.autoconnect-priority 9" + cmd="$nmcli con add type $_pretype con-name $xcat_slave_con ifname $_port master $ifname $_mtu connection.autoconnect-priority 9 autoconnect yes connection.autoconnect-slaves 1" fi log_info "create $_pretype slaves connetcion $xcat_slave_con for bridge" log_info "$cmd" @@ -2183,9 +2183,9 @@ function create_bond_interface_nmcli { log_info "create bond connection $xcat_con_name" cmd="" if [ -n "$next_nic" ]; then - cmd="$nmcli con add type bond con-name $xcat_con_name ifname $bondname bond.options $_bonding_opts autoconnect yes connection.autoconnect-priority 9" + cmd="$nmcli con add type bond con-name $xcat_con_name ifname $bondname bond.options $_bonding_opts autoconnect yes connection.autoconnect-priority 9 connection.autoconnect-slaves 1 connection.autoconnect-retries 0" else - cmd="$nmcli con add type bond con-name $xcat_con_name ifname $bondname bond.options $_bonding_opts method none ipv4.method manual ipv4.addresses $ipv4_addr/$str_prefix $_mtu connection.autoconnect-priority 9" + cmd="$nmcli con add type bond con-name $xcat_con_name ifname $bondname bond.options $_bonding_opts method none ipv4.method manual ipv4.addresses $ipv4_addr/$str_prefix $_mtu connection.autoconnect-priority 9 connection.autoconnect-slaves 1 connection.autoconnect-retries 0" fi log_info $cmd $cmd