diff --git a/xCAT-server/share/xcat/install/rh/compute.rhels8.pkglist b/xCAT-server/share/xcat/install/rh/compute.rhels8.pkglist index 527ec9825..5ecd9605c 100644 --- a/xCAT-server/share/xcat/install/rh/compute.rhels8.pkglist +++ b/xCAT-server/share/xcat/install/rh/compute.rhels8.pkglist @@ -5,3 +5,4 @@ nfs-utils openssh-server rsync util-linux +wget diff --git a/xCAT-server/share/xcat/netboot/rh/compute.rhels8.ppc64le.pkglist b/xCAT-server/share/xcat/netboot/rh/compute.rhels8.ppc64le.pkglist index b624d9a8a..f10a83507 100644 --- a/xCAT-server/share/xcat/netboot/rh/compute.rhels8.ppc64le.pkglist +++ b/xCAT-server/share/xcat/netboot/rh/compute.rhels8.ppc64le.pkglist @@ -31,3 +31,4 @@ tar util-linux vim-minimal xz +wget diff --git a/xCAT-server/share/xcat/netboot/rh/compute.rhels8.x86_64.pkglist b/xCAT-server/share/xcat/netboot/rh/compute.rhels8.x86_64.pkglist index 14f30306a..03f7d93ec 100644 --- a/xCAT-server/share/xcat/netboot/rh/compute.rhels8.x86_64.pkglist +++ b/xCAT-server/share/xcat/netboot/rh/compute.rhels8.x86_64.pkglist @@ -29,3 +29,4 @@ tar util-linux vim-minimal xz +wget diff --git a/xCAT-test/autotest/testcase/UT_openbmc/reventlog_resolved_cases0 b/xCAT-test/autotest/testcase/UT_openbmc/reventlog_resolved_cases0 index 448eb3435..efbace4c8 100644 --- a/xCAT-test/autotest/testcase/UT_openbmc/reventlog_resolved_cases0 +++ b/xCAT-test/autotest/testcase/UT_openbmc/reventlog_resolved_cases0 @@ -25,7 +25,7 @@ hcp:openbmc label:cn_bmc_ready,hctrl_openbmc cmd:reventlog $$CN resolved 1,2,3 check:rc==1 -check:output=~Error: (\[.*?\]: )?Usage error. Provide a comma separated +check:output=~Error: (\[.*?\]: )?Only one option is supported at the same time for reventlog end start:reventlog_resolved_parse_error4 @@ -35,7 +35,7 @@ hcp:openbmc label:cn_bmc_ready,hctrl_openbmc cmd:reventlog $$CN resolved=-1 check:rc==1 -check:output=~Error: (\[.*?\]: )?Invalid ID= +check:output=~Error: (\[.*?\]: )?Invalid ID: end start:reventlog_resolved_parse_error5 @@ -45,7 +45,7 @@ hcp:openbmc label:cn_bmc_ready,hctrl_openbmc cmd:reventlog $$CN resolved=abc check:rc==1 -check:output=~Error: (\[.*?\]: )?Invalid ID= +check:output=~Error: (\[.*?\]: )?Invalid ID: end start:reventlog_resolved_list @@ -54,7 +54,7 @@ os:Linux hcp:openbmc label:cn_bmc_ready,hctrl_openbmc cmd:reventlog $$CN resolved=100,101 -check:rc==0 +check:rc==1 check:output=~Attempting to resolve the following log entries: 100,101... end @@ -64,6 +64,6 @@ os:Linux hcp:openbmc label:cn_bmc_ready,hctrl_openbmc cmd:reventlog $$CN resolved=Led -check:rc==0 +check:rc==1 check:output=~Attempting to resolve the following log entries: Led... end diff --git a/xCAT-test/autotest/testcase/UT_openbmc/rspconfig_cases0 b/xCAT-test/autotest/testcase/UT_openbmc/rspconfig_cases0 index 01eb49a07..d6cac63f8 100644 --- a/xCAT-test/autotest/testcase/UT_openbmc/rspconfig_cases0 +++ b/xCAT-test/autotest/testcase/UT_openbmc/rspconfig_cases0 @@ -50,7 +50,7 @@ check:output=~$$CN: BMC Hostname: # Set to witherspoon first cmd:rspconfig $$CN hostname=witherspoon check:rc==0 -check:output=~$$CN: BMC Setting Hostname... +check:output=~$$CN: BMC Setting BMC Hostname... # Check that it's set to witherspoon cmd:rspconfig $$CN hostname check:rc==0 @@ -58,7 +58,7 @@ check:output=~$$CN: BMC Hostname: witherspoon # Set to -UTset cmd:rspconfig $$CN hostname=$$CN-UTset check:rc==0 -check:output=~$$CN: BMC Setting Hostname... +check:output=~$$CN: BMC Setting BMC Hostname... # Check that it's set cmd:rspconfig $$CN hostname check:rc==0 @@ -66,7 +66,7 @@ check:output=~$$CN: BMC Hostname: $$CN-UTset # Restore to saved version cmd:grep BMC /tmp/xcattest.rspconfig.hostname | cut -d' ' -f4 | xargs -i{} rspconfig $$CN hostname={} check:rc==0 -check:output=~$$CN: BMC Setting Hostname... +check:output=~$$CN: BMC Setting BMC Hostname... cmd:rspconfig $$CN hostname check:rc==0 check:output=~$$CN: BMC Hostname: diff --git a/xCAT-test/autotest/testcase/installation/setup_vm b/xCAT-test/autotest/testcase/installation/setup_vm index 781799a39..ada8c99a9 100644 --- a/xCAT-test/autotest/testcase/installation/setup_vm +++ b/xCAT-test/autotest/testcase/installation/setup_vm @@ -1,20 +1,29 @@ start:setup_vm -description:set up vm environment -cmd:var=`expr substr "__GETNODEATTR($$CN,vmstorage)__" 1 3`;echo $var;if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" -a "__GETNODEATTR($$CN,mgt)__" != "openbmc" ];then rmvm $$CN -f -p;if [[ "$var" = "phy" ]]; then mkvm $$CN;exit $? ; elif [[ "$var" = "dir" ]];then mkvm $$CN ; rmvm $$CN -f -p ; mkvm $$CN -s 20G ;exit $? ;elif [ "$var" = "nfs" -o "$var" = "lvm" ];then echo "Need to fix me. ";exit 2;else echo "Could not surpport vmstorage.";exit 3;fi;fi +description:reset up vm environment if need +label:others +cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" -a "__GETNODEATTR($$CN,mgt)__" != "openbmc" ];then echo "CN node $$CN is a vm which mgt is __GETNODEATTR($$CN,mgt)__, start to recreate the vm now"; echo "rmvm $$CN -f -p";rpower $$CN off; sleep 3; rmvm $$CN -f -p; var=`expr substr "__GETNODEATTR($$CN,vmstorage)__" 1 3`; echo "The disk create way of $$CN is $var"; if [ "$var" = "phy" ]; then echo "mkvm $$CN"; mkvm $$CN; exit $?; elif [ "$var" = "dir" ]; then echo "mkvm $$CN -s 20G"; mkvm $$CN -s 20G; exit $?; elif ["$var" = "nfs" -o "$var" = "lvm" ];then echo "Need to fix me"; exit 2; else echo "unsupported disk creation way"; exit 3;fi;else echo "CN node $$CN is a non-VM; do not need to recreate it";fi check:rc==0 -cmd:rpower $$CN on + +cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" -a "__GETNODEATTR($$CN,mgt)__" != "openbmc" ]; then echo "CN node is a vm, need to repower it on"; echo "rpower $$CN on"; rpower $$CN on; else echo "CN node $$CN is a non-VM; do not need to repower on it"; fi check:rc==0 + cmd:rpower $$CN stat check:output=~on -cmd:var=`expr substr "__GETNODEATTR($$SN,vmstorage)__" 1 3`;echo $var;if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" -a "__GETNODEATTR($$CN,mgt)__" != "openbmc" ];then rmvm $$SN -f -p;if [[ "$var" = "phy" ]]; then mkvm $$SN;exit $? ; elif [[ "$var" = "dir" ]];then mkvm $$SN ; rmvm $$SN -f -p ; mkvm $$SN -s 20G ;exit $? ;elif [ "$var" = "nfs" -o "$var" = "lvm" ];then echo "Need to fix me. ";exit 2;else echo "Could not surpport vmstorage.";exit 3;fi;fi + +cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" -a "__GETNODEATTR($$CN,mgt)__" != "openbmc" ]; then tabdump -w node==$$CN kvm_nodedata; fi check:rc==0 -cmd:rpower $$SN on + +cmd:if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" -a "__GETNODEATTR($$SN,mgt)__" != "openbmc" ];then echo "SN node $$SN is a vm which mgt is __GETNODEATTR($$SN,mgt)__, start to recreate the vm now"; echo "rmvm $$SN -f -p"; rpower $$SN off; sleep 3; rmvm $$SN -f -p; var=`expr substr "__GETNODEATTR($$SN,vmstorage)__" 1 3`; echo "The disk create way of $$SN is $var"; if [ "$var" = "phy" ]; then echo "mkvm $$SN"; mkvm $$SN; exit $?; elif [ "$var" = "dir" ]; then echo "mkvm $$SN -s 20G"; mkvm $$SN -s 20G; exit $?; elif ["$var" = "nfs" -o "$var" = "lvm" ];then echo "Need to fix me"; exit 2; else echo "unsupported disk creation way"; exit 3;fi;else echo "SN node $$SN is a non-VM; do not need to recreate it";fi check:rc==0 + + +cmd:if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" -a "__GETNODEATTR($$SN,mgt)__" != "openbmc" ];then echo "SN node $$SN is a VM, need to rpower it on"; echo "rpower $$SN on"; rpower $$SN on; fi +check:rc==0 + cmd:rpower $$SN stat check:output=~on -#Add for debug rmvm issue -cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]; then tabdump -w node==$$CN kvm_nodedata; fi + check:rc==0 -cmd:if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" ]; then tabdump -w node==$$SN kvm_nodedata; fi +cmd:if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" -a "__GETNODEATTR($$SN,mgt)__" != "openbmc" ]; then tabdump -w node==$$SN kvm_nodedata; fi check:rc==0 end diff --git a/xCAT-test/autotest/testcase/rspconfig/cases1 b/xCAT-test/autotest/testcase/rspconfig/cases1 index 1a6f93b69..ee4f552dc 100644 --- a/xCAT-test/autotest/testcase/rspconfig/cases1 +++ b/xCAT-test/autotest/testcase/rspconfig/cases1 @@ -4,7 +4,7 @@ os:Linux hcp:openbmc label:cn_bmc_ready,hctrl_openbmc cmd:rspconfig $$CN ipsrc -check:output=~$$CN\s*:\s*BMC IP Source: Static|BMC IP Source: Dynamic +check:output=~$$CN\s*:\s*BMC IP Source: Static|BMC IP Source: DHCP check:rc == 0 cmd:rspconfig $$CN hostname sshcfg check:output =~Error: (\[.*?\]: )?Configure sshcfg must be issued without other options. diff --git a/xCAT/postscripts/enablekdump b/xCAT/postscripts/enablekdump index c8e780d8e..295447b77 100755 --- a/xCAT/postscripts/enablekdump +++ b/xCAT/postscripts/enablekdump @@ -216,8 +216,27 @@ EOF fi else if (pmatch $OSVER "rhel7*") || (pmatch $OSVER "rhels7*");then - /bin/mount -o vers=3 $KDIP:$KDPATH $MOUNTPATH - #/bin/mount -o nolock $KDIP:$KDPATH $MOUNTPATH + nfsvers=$(/usr/sbin/rpcinfo -p $KDIP|grep -w nfs|awk /tcp/'{print $2}'|sort) + nfsver=0 + if [ -n "$nfsvers" ]; then + for i in $nfsvers + do + if [ $i -eq 3 ] && ! [ grep -w nfs /proc/filesystems >/dev/null 2>&1 ]; then + nfsver=3 + break + elif [ $i -eq 4 ] && ! [ grep -w nfs4 /proc/filesystems >/dev/null 2>&1 ]; then + nfsver=4 + break + fi + done + if [ $nfsver -ne 0 ]; then + /bin/mount -o vers=$nfsver $KDIP:$KDPATH $MOUNTPATH + else + /bin/mount -o nolock $KDIP:$KDPATH $MOUNTPATH + fi + else + /bin/echo "nfs server is not available" + fi [ -d $MOUNTPATH/var/crash ] || mkdir -p $MOUNTPATH/var/crash #The initramfs used in kdump does not need "root", however, the initramfs refused to continue