diff --git a/xCAT-test/autotest/testcase/xcatdebugmode/cases0 b/xCAT-test/autotest/testcase/xcatdebugmode/cases0 new file mode 100644 index 000000000..ec612c1f0 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcatdebugmode/cases0 @@ -0,0 +1,288 @@ +start:xcatdebugmode_off_rhels +os:linux +description:site.xcatdebugmode value is 0, the following logs will be shown and ssh is not supported. +cmd:chtab key=xcatdebugmode site.value="0" +check:rc==0 +cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +check:rc==0 +cmd:if [[ "__GETNODEATTR($$CN,arch)__" =~ "ppc64le" ]]; then rpower $$CN reset;elif [[ "__GETNODEATTR($$CN,arch)__" =~ "x86_64" ]];then mgt=`lsdef $$CN | grep mgt`; if [[ $mgt =~ "bmc" ]]; then rpower $$CN boot; elif [[ $mgt =~ "ipmi" ]]; then rsetboot $$CN net; rpower $$CN reset; fi; elif [[ "__GETNODEATTR($$CN,arch)__" =~ "ppc64" ]]; then rnetboot $$CN; fi +check:rc==0 +cmd:a=0;while ! `lsdef -l $$CN|grep status|grep installing >/dev/null`; do sleep 20;((a++));if [ $a -gt 30 ];then break;fi done +cmd:sleep 120 +cmd:xdsh $$CN date +check:output=~(Connection refused|No route to host) +check:rc==1 +cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 20;((a++));if [ $a -gt 90 ];then break;fi done +cmd:lsdef -l $$CN | grep status +check:output=~booted +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"Running Kickstart Pre-Installation script\"" +check:output=~Running Kickstart Pre-Installation script +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"installstatus installing\"" +check:output=~installstatus installing +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"\[get\_install\_disk\]Information from \/proc\/partitions\:\"" +check:output=~\[get\_install\_disk\]Information from \/proc\/partitions\: +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"Running Kickstart Post\-Installation script\"" +check:output=~Running Kickstart Post\-Installation script +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"running \/xcatpost\/mypostscript.post\"" +check:output=~running \/xcatpost\/mypostscript\.post +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"\/xcatpost\/mypostscript\.post return\"" +check:output=~\/xcatpost\/mypostscript\.post return +cmd:xdsh $$CN "file \/var\/log\/anaconda*" +check:output!~No such file or directory +end + +start:set_xcatdebugmode_one_rhels +os:linux +description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. +cmd:chtab key=xcatdebugmode site.value="1" +check:rc==0 +cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +check:rc==0 +cmd:if [[ "__GETNODEATTR($$CN,arch)__" =~ "ppc64le" ]]; then rpower $$CN reset;elif [[ "__GETNODEATTR($$CN,arch)__" =~ "x86_64" ]];then mgt=`lsdef $$CN | grep mgt`; if [[ $mgt =~ "bmc" ]]; then rpower $$CN boot; elif [[ $mgt =~ "ipmi" ]]; then rsetboot $$CN net; rpower $$CN reset; fi; elif [[ "__GETNODEATTR($$CN,arch)__" =~ "ppc64" ]]; then rnetboot $$CN; fi +check:rc==0 +cmd:a=0;while ! `lsdef -l $$CN|grep status|grep installing >/dev/null`; do sleep 20;((a++));if [ $a -gt 30 ];then break;fi done +cmd:sleep 120 +cmd:xdsh $$CN date +check:output=~(Connection refused|No route to host) +check:rc==1 +cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 20;((a++));if [ $a -gt 90 ];then break;fi done +cmd:lsdef -l $$CN | grep status +check:output=~booted +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"Running Kickstart Pre\-Installation script\"" +check:output=~Running Kickstart Pre\-Installation script +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"installstatus installing\"" +check:output=~\+ \/tmp\/baz\.py \'installstatus installing\' +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep -c \"installstatus installing\"" +checkoutput=~2 +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"\[get\_install\_disk\]Information from \/proc\/partitions\:\"" +check:output=~\+ echo \'\[get\_install\_disk\]Information from \/proc\/partitions\:\' +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep -c \"\[get\_install\_disk\]Information from \/proc\/partitions\:\"" +checkoutput=~2 +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"Running Kickstart Post-Installation script\"" +check:output=~Running Kickstart Post-Installation script +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"\/opt\/xcat\/xcatinfo generated\"" +check:output=~\+ echo \'\/opt\/xcat\/xcatinfo generated\' +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep -c \"\/opt\/xcat\/xcatinfo generated\"" +check:output=~2 +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"running \/xcatpost\/mypostscript\.post\"" +check:output=~running \/xcatpost\/mypostscript\.post +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"\+ echo "\'"\/opt\/xcat\/xcatinstallpost generated"\'"\"" +check:output=~\+ echo \'\/opt\/xcat\/xcatinstallpost generated\' +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"\/opt\/xcat\/xcatinstallpost generated\"" +check:output=~\/opt\/xcat\/xcatinstallpost generated +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"\/xcatpost\/mypostscript\.post return\"" +check:output=~\/xcatpost\/mypostscript\.post return +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"service xcatpostinit1 disabled\"" +check:output=~service xcatpostinit1 disabled +cmd:cat /var/log/xcat/computes.log | grep "/opt/xcat/xcatinfo generated" +check:output=~/opt/xcat/xcatinfo generated +cmd:cat /var/log/xcat/computes.log | grep "postscripts downloaded successfully" +check:output=~postscripts downloaded successfully +cmd:cat /var/log/xcat/computes.log | grep "running /xcatpost/mypostscript.post" +check:output=~running /xcatpost/mypostscript.post +cmd:cat /var/log/xcat/computes.log | grep "/etc/init.d/xcatpostinit1 generated" +check:output=~/etc/init.d/xcatpostinit1 generated +cmd:cat /var/log/xcat/computes.log | grep "/opt/xcat/xcatinstallpost generated" +check:output=~/opt/xcat/xcatinstallpost generated +cmd:cat /var/log/xcat/computes.log | grep "/opt/xcat/xcatdsklspost generated" +check:output=~/opt/xcat/xcatdsklspost generated +cmd:cat /var/log/xcat/computes.log | grep "running mypostscript" +check:output=~running mypostscript +cmd:xdsh $$CN "file \/var\/log\/anaconda*" +check:output!~No such file or directory +cmd:chtab key=xcatdebugmode site.value="0" +check:rc==0 +end + +start:set_xcatdebugmode_value_two_rhels +os:linux +description:site.xcatdebugmode value is 2, , the following logs will be shown and ssh is supported. +cmd:chtab key=xcatdebugmode site.value="2" +check:rc==0 +cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +check:rc==0 +cmd:if [[ "__GETNODEATTR($$CN,arch)__" =~ "ppc64le" ]]; then rpower $$CN reset;elif [[ "__GETNODEATTR($$CN,arch)__" =~ "x86_64" ]];then mgt=`lsdef $$CN | grep mgt`; if [[ $mgt =~ "bmc" ]]; then rpower $$CN boot; elif [[ $mgt =~ "ipmi" ]]; then rsetboot $$CN net; rpower $$CN reset; fi; elif [[ "__GETNODEATTR($$CN,arch)__" =~ "ppc64" ]]; then rnetboot $$CN; fi +check:rc==0 +cmd:a=0;while ! `lsdef -l $$CN|grep status|grep installing >/dev/null`; do sleep 20;((a++));if [ $a -gt 30 ];then break;fi done +cmd:sleep 120 +cmd:xdsh $$CN date +check:output=~ 2016 +check:rc==0 +cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 20;((a++));if [ $a -gt 60 ];then break;fi done +cmd:lsdef -l $$CN | grep status +check:output=~booted +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"Running Kickstart Pre\-Installation script\"" +check:output=~Running Kickstart Pre\-Installation script +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"installstatus installing\"" +check:output=~\+ \/tmp\/baz\.py \'installstatus installing\' +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep -c \"installstatus installing\"" +checkoutput=~2 +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"\[get\_install\_disk\]Information from \/proc\/partitions\:\"" +check:output=~\+ echo \'\[get\_install\_disk\]Information from \/proc\/partitions\:\' +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep -c \"\[get\_install\_disk\]Information from \/proc\/partitions\:\"" +checkoutput=~2 +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"Running Kickstart Post-Installation script\"" +check:output=~Running Kickstart Post-Installation script +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"\/opt\/xcat\/xcatinfo generated\"" +check:output=~\+ echo \'\/opt\/xcat\/xcatinfo generated\' +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep -c \"\/opt\/xcat\/xcatinfo generated\"" +check:output=~2 +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"running \/xcatpost\/mypostscript\.post\"" +check:output=~running \/xcatpost\/mypostscript\.post +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"\+ echo "\'"\/opt\/xcat\/xcatinstallpost generated"\'"\"" +check:output=~\+ echo \'\/opt\/xcat\/xcatinstallpost generated\' +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"\/opt\/xcat\/xcatinstallpost generated\"" +check:output=~\/opt\/xcat\/xcatinstallpost generated +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"\/xcatpost\/mypostscript\.post return\"" +check:output=~\/xcatpost\/mypostscript\.post return +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"service xcatpostinit1 disabled\"" +check:output=~service xcatpostinit1 disabled +cmd:cat /var/log/xcat/computes.log | grep "/opt/xcat/xcatinfo generated" +check:output=~/opt/xcat/xcatinfo generated +cmd:cat /var/log/xcat/computes.log | grep "postscripts downloaded successfully" +check:output=~postscripts downloaded successfully +cmd:cat /var/log/xcat/computes.log | grep "running /xcatpost/mypostscript.post" +check:output=~running /xcatpost/mypostscript.post +cmd:cat /var/log/xcat/computes.log | grep "/etc/init.d/xcatpostinit1 generated" +check:output=~/etc/init.d/xcatpostinit1 generated +cmd:cat /var/log/xcat/computes.log | grep "/opt/xcat/xcatinstallpost generated" +check:output=~/opt/xcat/xcatinstallpost generated +cmd:cat /var/log/xcat/computes.log | grep "/opt/xcat/xcatdsklspost generated" +check:output=~/opt/xcat/xcatdsklspost generated +cmd:cat /var/log/xcat/computes.log | grep "running mypostscript" +check:output=~running mypostscript +cmd:chtab key=xcatdebugmode site.value="0" +check:rc==0 +end + +start:xcatdebugmode_off_sles +os:linux +description:site.xcatdebugmode value is 0, the following logs will be shown and ssh is not supported. +cmd:chtab key=xcatdebugmode site.value="0" +check:rc==0 +cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +check:rc==0 +cmd:if [[ "__GETNODEATTR($$CN,arch)__" =~ "ppc64le" ]]; then rpower $$CN reset;elif [[ "__GETNODEATTR($$CN,arch)__" =~ "x86_64" ]];then mgt=`lsdef $$CN | grep mgt`; if [[ $mgt =~ "bmc" ]]; then rpower $$CN boot; elif [[ $mgt =~ "ipmi" ]]; then rsetboot $$CN net; rpower $$CN reset; fi; elif [[ "__GETNODEATTR($$CN,arch)__" =~ "ppc64" ]]; then rnetboot $$CN; fi +check:rc==0 +cmd:a=0;while ! `lsdef -l $$CN|grep status|grep installing >/dev/null`; do sleep 20;((a++));if [ $a -gt 30 ];then break;fi done +cmd:sleep 120 +cmd:xdsh $$CN date +check:output=~(Connection refused|No route to host) +check:rc==1 +cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 20;((a++));if [ $a -gt 90 ];then break;fi done +cmd:lsdef -l $$CN | grep status +check:output=~booted +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"Running AutoYaST Pre-Installation script\"" +check:output=~Running AutoYaST Pre-Installation script +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"installstatus installing\"" +check:output=~installstatus installing +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"\[get\_install\_disk\]Information from \/proc\/partitions\:\"" +check:output=~\[get\_install\_disk\]Information from \/proc\/partitions\: +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"Running AutoYaST Chroot-Installation script\"" +check:output=~Running AutoYaST Chroot-Installation script +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"Running AutoYaST Post\-Installation script\"" +check:output=~Running AutoYaST Post\-Installation script +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"ready\"" +check:output=~ready +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"done\"" +check:output=~done +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"running \/xcatpost\/mypostscript\.post\"" +check:output=~running \/xcatpost\/mypostscript\.post +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"\/xcatpost\/mypostscript\.post return\"" +check:output=~\/xcatpost\/mypostscript\.post return +cmd:xdsh $$CN "file \/var\/log\/YaST2" +check:output!~No such file or directory +end + +start:set_xcatdebugmode_one_sles +os:linux +description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. +cmd:chtab key=xcatdebugmode site.value="1" +check:rc==0 +cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +check:rc==0 +cmd:if [[ "__GETNODEATTR($$CN,arch)__" =~ "ppc64le" ]]; then rpower $$CN reset;elif [[ "__GETNODEATTR($$CN,arch)__" =~ "x86_64" ]];then mgt=`lsdef $$CN | grep mgt`; if [[ $mgt =~ "bmc" ]]; then rpower $$CN boot; elif [[ $mgt =~ "ipmi" ]]; then rsetboot $$CN net; rpower $$CN reset; fi; elif [[ "__GETNODEATTR($$CN,arch)__" =~ "ppc64" ]]; then rnetboot $$CN; fi +check:rc==0 +cmd:a=0;while ! `lsdef -l $$CN|grep status|grep installing >/dev/null`; do sleep 20;((a++));if [ $a -gt 30 ];then break;fi done +cmd:sleep 120 +cmd:xdsh $$CN date +check:output=~(Connection refused|No route to host) +check:rc==1 +cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 20;((a++));if [ $a -gt 90 ];then break;fi done +cmd:lsdef -l $$CN | grep status +check:output=~booted +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"Running AutoYaST Pre-Installation script\"" +check:output=~Running AutoYaST Pre-Installation script +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"installstatus installing\"" +check:output=~\+ \/tmp\/bar\.awk \'installstatus installing\' +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep -c \"installstatus installing\"" +checkoutput=~2 +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"\[get\_install\_disk\]Information from \/proc\/partitions\:\"" +check:output=~\+ echo \'\[get\_install\_disk\]Information from \/proc\/partitions\:\' +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep -c \"\[get\_install\_disk\]Information from \/proc\/partitions\:\"" +checkoutput=~2 +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"Running AutoYaST Chroot\-Installation script\"" +check:output=~Running AutoYaST Chroot\-Installation script +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"updateflag\.awk\"" +check:output=~\+ \/tmp\/updateflag\.awk +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"ready\"" +check:output=~ready +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"done\"" +check:output=~done +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"Running AutoYaST Post-Installation script\"" +check:output=~Running AutoYaST Post-Installation script +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"running \/xcatpost\/mypostscript\.post\"" +check:output=~running \/xcatpost\/mypostscript\.post +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"finished node installation\, reporting status\"" +check:output=~\+ echo \'finished node installation\, reporting status\.\.\.\' +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"\/xcatpost\/mypostscript\.post return\"" +check:output=~\/xcatpost\/mypostscript\.post return +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"service xcatpostinit1 disabled\"" +check:output=~service xcatpostinit1 disabled +cmd:cat /var/log/xcat/computes.log | grep "/opt/xcat/xcatinfo generated" +check:output=~/opt/xcat/xcatinfo generated +cmd:cat /var/log/xcat/computes.log | grep "postscripts downloaded successfully" +check:output=~postscripts downloaded successfully +cmd:cat /var/log/xcat/computes.log | grep "running /xcatpost/mypostscript.post" +check:output=~running /xcatpost/mypostscript.post +cmd:cat /var/log/xcat/computes.log | grep "/etc/init.d/xcatpostinit1 generated" +check:output=~/etc/init.d/xcatpostinit1 generated +cmd:cat /var/log/xcat/computes.log | grep "/opt/xcat/xcatinstallpost generated" +check:output=~/opt/xcat/xcatinstallpost generated +cmd:cat /var/log/xcat/computes.log | grep "/opt/xcat/xcatdsklspost generated" +check:output=~/opt/xcat/xcatdsklspost generated +cmd:cat /var/log/xcat/computes.log | grep "running mypostscript" +check:output=~running mypostscript +cmd:xdsh $$CN "file \/var\/log\/YaST2" +check:output!~No such file or directory +cmd:chtab key=xcatdebugmode site.value="0" +check:rc==0 +end + +start:xcatdebugmode_off_ubuntu +os:linux +description:site.xcatdebugmode value is 0, the following logs will be shown and ssh is not supported. +cmd:chtab key=xcatdebugmode site.value="0" +check:rc==0 +cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +check:rc==0 +cmd:if [[ "__GETNODEATTR($$CN,arch)__" =~ "ppc64el" ]]; then rpower $$CN reset;elif [[ "__GETNODEATTR($$CN,arch)__" =~ "x86_64" ]];then mgt=`lsdef $$CN | grep mgt`; if [[ $mgt =~ "bmc" ]]; then rpower $$CN boot; elif [[ $mgt =~ "ipmi" ]]; then rsetboot $$CN net; rpower $$CN reset; fi; elif [[ "__GETNODEATTR($$CN,arch)__" =~ "ppc64" ]]; then rnetboot $$CN; fi +check:rc==0 +cmd:a=0;while ! `lsdef -l $$CN|grep status|grep installing >/dev/null`; do sleep 20;((a++));if [ $a -gt 30 ];then break;fi done +cmd:xdsh $$CN date +check:output=~(Connection refused|No route to host) +check:rc==1 +cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 20;((a++));if [ $a -gt 90 ];then break;fi done +cmd:lsdef -l $$CN | grep status +check:output=~booted +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"Running preseeding early\_command Installation script\"" +check:output=~Running preseeding early\_command Installation script +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"\[get\_install\_disk\]Information from \/proc\/partitions\:\"" +check:output=~\[get\_install\_disk\]Information from \/proc\/partitions\: +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"Running preseeding late\_command Installation script\"" +check:output=~Running preseeding late\_command Installation script +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"Generating grub configuration file\"" +check:output=~Generating grub configuration file +cmd:xdsh $$CN "file \/var\/log\/installer" +check:output!~No such file or directory +end