From b9b1bd2585b2af84288a15f995ae43ab5c07ff33 Mon Sep 17 00:00:00 2001 From: bybai Date: Thu, 28 Mar 2019 23:32:15 -0400 Subject: [PATCH 1/2] workaround RH ip link state UNKNOWN issue --- xCAT/postscripts/configeth | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/xCAT/postscripts/configeth b/xCAT/postscripts/configeth index 31892e73e2..80e2e5d567 100755 --- a/xCAT/postscripts/configeth +++ b/xCAT/postscripts/configeth @@ -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 From 20a55f7978c297151dcca6782ea9e14994fa49ca Mon Sep 17 00:00:00 2001 From: huweihua Date: Fri, 29 Mar 2019 01:34:29 -0400 Subject: [PATCH 2/2] update linux_diskless_kdump to consistent with fix 6189 --- xCAT-test/autotest/testcase/kdump/linux_diskless_kdump | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-test/autotest/testcase/kdump/linux_diskless_kdump b/xCAT-test/autotest/testcase/kdump/linux_diskless_kdump index 6df6abca36..b357a0ba29 100644 --- a/xCAT-test/autotest/testcase/kdump/linux_diskless_kdump +++ b/xCAT-test/autotest/testcase/kdump/linux_diskless_kdump @@ -31,7 +31,7 @@ cmd:exlistfile=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arc check:rc==0 cmd:postinstallfile=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep postinstall|awk -F'=' '{print $2}'`;cp $postinstallfile $postinstallfile.bak -cmd:postinstallfile=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep postinstall|awk -F'=' '{print $2}'`; if grep SUSE /etc/*release;then sed -i "/\/tmp/ s/10/200/g" $postinstallfile; elif grep "Red Hat" /etc/*release;then sed -i /devpts/a"tmpfs /var/tmp tmpfs defaults,size=200m 0 2" $postinstallfile;fi +cmd:postinstallfile=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep postinstall|awk -F'=' '{print $2}'`; if grep SUSE /etc/*release;then sed -i "/\/tmp/ s/10/500/g" $postinstallfile; elif grep "Red Hat" /etc/*release;then sed -i /devpts/a"tmpfs /var/tmp tmpfs defaults,size=500m 0 2" $postinstallfile;fi check:rc==0 cmd:if [ ! -d /kdumpdir ]; then mkdir -p /kdumpdir && chmod 777 /kdumpdir; fi