mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-08-14 07:10:21 +00:00
workaround RH ip link state UNKNOWN issue
This commit is contained in:
@@ -686,6 +686,7 @@ elif [ "$1" = "-s" ];then
|
||||
fi
|
||||
|
||||
if [ "$UPDATENODE" = "1" ] || [ "$NODESETSTATE" = "netboot" ] || [ "$NODESETSTATE" = "statelite" ] || grep "REBOOT=TRUE" /opt/xcat/xcatinfo >/dev/null 2>&1; then
|
||||
if_state=0
|
||||
if [ "$str_os_type" = "debian" ];then
|
||||
ifdown --force $str_inst_nic
|
||||
else
|
||||
@@ -696,11 +697,13 @@ elif [ "$1" = "-s" ];then
|
||||
else
|
||||
ifup $str_inst_nic
|
||||
fi
|
||||
wait_for_ifstate $str_inst_nic UP 20 5
|
||||
fi
|
||||
if [ $? -ne 0 ]; then
|
||||
log_error "bring $str_inst_nic up failed."
|
||||
error_code=1
|
||||
if [ $? -ne 0 ]; then
|
||||
if_state=$(wait_for_ifstate $str_inst_nic UP 20 5)
|
||||
fi
|
||||
if [ $if_state -ne 0 ]; then
|
||||
log_error "bring $str_inst_nic up failed."
|
||||
error_code=1
|
||||
fi
|
||||
fi
|
||||
if [ $networkmanager_active -eq 1 ] && [ -n "$tmp_con_name" ]; then
|
||||
if [ $error_code -eq 1 ]; then
|
||||
@@ -1106,14 +1109,17 @@ else
|
||||
fi
|
||||
else
|
||||
if [ $reboot_nic_bool -eq 1 ]; then
|
||||
if_state=0
|
||||
echo "bring up ip"
|
||||
if [ $networkmanager_active -eq 1 ]; then
|
||||
nmcli con up $con_name
|
||||
else
|
||||
ifup $str_nic_name
|
||||
fi
|
||||
wait_for_ifstate $str_nic_name UP 20 5
|
||||
if [ $? -ne 0 ]; then
|
||||
if_state=$(wait_for_ifstate $str_nic_name UP 20 5)
|
||||
fi
|
||||
if [ $if_state -ne 0 ]; then
|
||||
log_error "bring $str_nic_name up failed."
|
||||
error_code=1
|
||||
fi
|
||||
|
Reference in New Issue
Block a user