From 7b80e922432b6e4e5a7154dcbc5768192c1f1337 Mon Sep 17 00:00:00 2001 From: caomengmeng Date: Tue, 27 Sep 2016 04:08:38 -0400 Subject: [PATCH] update cases after review --- .../{cases0 => rhels_xcatdebugmode_diskful} | 310 +++++++++++++---- .../xcatdebugmode/sles_xcatdebugmode_diskful | 319 ++++++++++++++++++ .../ubuntu_xcatdebugmode_diskful | 232 +++++++++++++ 3 files changed, 803 insertions(+), 58 deletions(-) rename xCAT-test/autotest/testcase/xcatdebugmode/{cases0 => rhels_xcatdebugmode_diskful} (54%) create mode 100644 xCAT-test/autotest/testcase/xcatdebugmode/sles_xcatdebugmode_diskful create mode 100644 xCAT-test/autotest/testcase/xcatdebugmode/ubuntu_xcatdebugmode_diskful diff --git a/xCAT-test/autotest/testcase/xcatdebugmode/cases0 b/xCAT-test/autotest/testcase/xcatdebugmode/rhels_xcatdebugmode_diskful similarity index 54% rename from xCAT-test/autotest/testcase/xcatdebugmode/cases0 rename to xCAT-test/autotest/testcase/xcatdebugmode/rhels_xcatdebugmode_diskful index ec612c1f0..9e5bd01d9 100644 --- a/xCAT-test/autotest/testcase/xcatdebugmode/cases0 +++ b/xCAT-test/autotest/testcase/xcatdebugmode/rhels_xcatdebugmode_diskful @@ -1,11 +1,36 @@ -start:xcatdebugmode_off_rhels +start:reg_set_xcatdebugmode_off_rhels_diskful_flat os:linux description:site.xcatdebugmode value is 0, the following logs will be shown and ssh is not supported. +cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi +cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN +check:rc==0 +cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p && mkvm $$CN; else rmvm $$CN -f -p && mkvm $$CN -s 20G; fi;fi +check:rc=0 +cmd:makedns -n +check:rc==0 +cmd:makeconservercf +check:rc==0 +cmd:cat /etc/conserver.cf | grep $$CN +check:output=~$$CN +cmd:sleep 20 +cmd:if [ "__GETNODEATTR($$CN,arch)__" = "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]; then getmacs -D $$CN; fi +check:rc==0 +cmd:makedhcp -n +check:rc==0 +cmd:makedhcp -a +check:rc==0 +cmd:sleep 10 +cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.leases|grep $$CN;elif cat /etc/*release |grep "Red Hat" >/dev/null;then cat /var/lib/dhcpd/dhcpd.leases|grep $$CN;fi +check:output=~$$CN +cmd:copycds $$ISO +check:rc==0 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 +cmd:if [[ "__GETNODEATTR($$CN,mgt)__" = "ipmi" ]]; then rsetboot $$CN net; fi +check:rc==0 +cmd:if [ "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [ "__GETNODEATTR($$CN,arch)__" = "ppc64" ];then rnetboot $$CN;else rpower $$CN boot;fi else rpower $$CN boot;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 @@ -29,16 +54,47 @@ cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"\/xcatpost\/mypostscript\.po check:output=~\/xcatpost\/mypostscript\.post return cmd:xdsh $$CN "file \/var\/log\/anaconda*" check:output!~No such file or directory +cmd:rpower $$SN on +check:rc==0 end -start:set_xcatdebugmode_one_rhels + +start:reg_set_xcatdebugmode_value_one_rhels_diskful_flat os:linux description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. +cmd:echo " " > /var/log/xcat/computes.log +check:rc==0 + +cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi +cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN +check:rc==0 +cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p && mkvm $$CN; else rmvm $$CN -f -p && mkvm $$CN -s 20G; fi;fi +check:rc=0 +cmd:makedns -n +check:rc==0 +cmd:makeconservercf +check:rc==0 +cmd:cat /etc/conserver.cf | grep $$CN +check:output=~$$CN +cmd:sleep 20 +cmd:if [ "__GETNODEATTR($$CN,arch)__" = "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]; then getmacs -D $$CN; fi +check:rc==0 +cmd:makedhcp -n +check:rc==0 +cmd:makedhcp -a +check:rc==0 +cmd:sleep 10 +cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.leases|grep $$CN;elif cat /etc/*release |grep "Red Hat" >/dev/null;then cat /var/lib/dhcpd/dhcpd.leases|grep $$CN;fi +check:output=~$$CN +cmd:copycds $$ISO +check:rc==0 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 +cmd:if [[ "__GETNODEATTR($$CN,mgt)__" = "ipmi" ]]; then rsetboot $$CN net; fi +check:rc==0 +cmd:if [ "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [ "__GETNODEATTR($$CN,arch)__" = "ppc64" ];then rnetboot $$CN;else rpower $$CN boot;fi else rpower $$CN boot;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 @@ -92,16 +148,46 @@ cmd:xdsh $$CN "file \/var\/log\/anaconda*" check:output!~No such file or directory cmd:chtab key=xcatdebugmode site.value="0" check:rc==0 +cmd:rpower $$SN on +check:rc==0 end -start:set_xcatdebugmode_value_two_rhels +start:reg_set_xcatdebugmode_value_two_rhels_diskful_flat os:linux description:site.xcatdebugmode value is 2, , the following logs will be shown and ssh is supported. +cmd:echo " " > /var/log/xcat/computes.log +check:rc==0 + +cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi +cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN +check:rc==0 +cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p && mkvm $$CN; else rmvm $$CN -f -p && mkvm $$CN -s 20G; fi;fi +check:rc=0 +cmd:makedns -n +check:rc==0 +cmd:makeconservercf +check:rc==0 +cmd:cat /etc/conserver.cf | grep $$CN +check:output=~$$CN +cmd:sleep 20 +cmd:if [ "__GETNODEATTR($$CN,arch)__" = "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]; then getmacs -D $$CN; fi +check:rc==0 +cmd:makedhcp -n +check:rc==0 +cmd:makedhcp -a +check:rc==0 +cmd:sleep 10 +cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.leases|grep $$CN;elif cat /etc/*release |grep "Red Hat" >/dev/null;then cat /var/lib/dhcpd/dhcpd.leases|grep $$CN;fi +check:output=~$$CN +cmd:copycds $$ISO +check:rc==0 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 +cmd:if [[ "__GETNODEATTR($$CN,mgt)__" = "ipmi" ]]; then rsetboot $$CN net; fi +check:rc==0 +cmd:if [ "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [ "__GETNODEATTR($$CN,arch)__" = "ppc64" ];then rnetboot $$CN;else rpower $$CN boot;fi else rpower $$CN boot;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 @@ -153,56 +239,91 @@ cmd:cat /var/log/xcat/computes.log | grep "running mypostscript" check:output=~running mypostscript cmd:chtab key=xcatdebugmode site.value="0" check:rc==0 +cmd:rpower $$SN on +check:rc==0 end -start:xcatdebugmode_off_sles -os:linux + +start:set_xcatdebugmode_off_rhels_diskful_flat_p8_le +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:copycds $$ISO +check:rc==0 +cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu" ]];then mkdir /tmp/iso; mount -o loop $$MINIISO /tmp/iso ; mkdir -p /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot; cp /tmp/iso/install/initrd.gz /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot;umount /tmp/iso; rmdir /tmp/iso; fi +check:rc==0 +cmd:makedhcp -n +check:rc==0 +cmd:makedhcp -a +check:rc==0 +cmd:makedns -n +check:rc==0 +cmd:makeconservercf $$CN +check:rc==0 +cmd:cat /etc/conserver.cf | grep $$CN +check:output=~$$CN 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 +cmd:rpower $$CN boot 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:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 60;((a++));if [ $a -gt 50 ];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 \"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 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\"" +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\/YaST2" +cmd:xdsh $$CN "file \/var\/log\/anaconda*" check:output!~No such file or directory +cmd:rpower $$SN on +check:rc==0 end -start:set_xcatdebugmode_one_sles -os:linux + +start:set_xcatdebugmode_value_one_rhels_diskful_flat_p8_le +os:Linux description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. +cmd:echo " " > /var/log/xcat/computes.log +check:rc==0 + cmd:chtab key=xcatdebugmode site.value="1" check:rc==0 +cmd:copycds $$ISO +check:rc==0 +cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu" ]];then mkdir /tmp/iso; mount -o loop $$MINIISO /tmp/iso ; mkdir -p /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot; cp /tmp/iso/install/initrd.gz /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot;umount /tmp/iso; rmdir /tmp/iso; fi +check:rc==0 +cmd:makedhcp -n +check:rc==0 +cmd:makedhcp -a +check:rc==0 +cmd:makedns -n +check:rc==0 +cmd:makeconservercf $$CN +check:rc==0 +cmd:cat /etc/conserver.cf | grep $$CN +check:output=~$$CN 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 +cmd:rpower $$CN boot 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 @@ -211,34 +332,34 @@ 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 \"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\/bar\.awk \'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 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 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 \"finished node installation\, reporting status\"" -check:output=~\+ echo \'finished node installation\, reporting status\.\.\.\' +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" @@ -253,36 +374,109 @@ 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" +cmd:xdsh $$CN "file \/var\/log\/anaconda*" check:output!~No such file or directory +cmd:chtab key=xcatdebugmode site.value="0" +check:rc==0 +cmd:rpower $$SN on +check:rc==0 + 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" + + +start:set_xcatdebugmode_value_two_rhels_diskful_flat_p8_le +os:Linux +description:site.xcatdebugmode value is 2, the following logs will be shown and ssh is supported. +cmd:echo " " > /var/log/xcat/computes.log check:rc==0 + +cmd:chtab key=xcatdebugmode site.value="2" +check:rc==0 +cmd:copycds $$ISO +check:rc==0 +cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu" ]];then mkdir /tmp/iso; mount -o loop $$MINIISO /tmp/iso ; mkdir -p /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot; cp /tmp/iso/install/initrd.gz /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot;umount /tmp/iso; rmdir /tmp/iso; fi +check:rc==0 +cmd:makedhcp -n +check:rc==0 +cmd:makedhcp -a +check:rc==0 +cmd:makedns -n +check:rc==0 +cmd:makeconservercf $$CN +check:rc==0 +cmd:cat /etc/conserver.cf | grep $$CN +check:output=~$$CN 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 +cmd:rpower $$CN boot 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 +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 preseeding early\_command Installation script\"" -check:output=~Running preseeding early\_command Installation script + +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=~\[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 +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 +cmd:rpower $$SN on +check:rc==0 + +cmd:chtab key=xcatdebugmode site.value="0" +check:rc==0 end + + + + + + + + diff --git a/xCAT-test/autotest/testcase/xcatdebugmode/sles_xcatdebugmode_diskful b/xCAT-test/autotest/testcase/xcatdebugmode/sles_xcatdebugmode_diskful new file mode 100644 index 000000000..3ba3a5bca --- /dev/null +++ b/xCAT-test/autotest/testcase/xcatdebugmode/sles_xcatdebugmode_diskful @@ -0,0 +1,319 @@ +start:reg_set_xcatdebugmode_off_sles_diskful_flat +os:linux +description:site.xcatdebugmode value is 0, the following logs will be shown and ssh is not supported. + +cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi +cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN +check:rc==0 +cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p && mkvm $$CN; else rmvm $$CN -f -p && mkvm $$CN -s 20G; fi;fi +check:rc=0 +cmd:makedns -n +check:rc==0 +cmd:makeconservercf +check:rc==0 +cmd:cat /etc/conserver.cf | grep $$CN +check:output=~$$CN +cmd:sleep 20 +cmd:if [ "__GETNODEATTR($$CN,arch)__" = "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]; then getmacs -D $$CN; fi +check:rc==0 +cmd:makedhcp -n +check:rc==0 +cmd:makedhcp -a +check:rc==0 +cmd:sleep 10 +cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.leases|grep $$CN;elif cat /etc/*release |grep "Red Hat" >/dev/null;then cat /var/lib/dhcpd/dhcpd.leases|grep $$CN;fi +check:output=~$$CN +cmd:copycds $$ISO +check:rc==0 +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,mgt)__" = "ipmi" ]]; then rsetboot $$CN net; fi +check:rc==0 +cmd:if [ "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [ "__GETNODEATTR($$CN,arch)__" = "ppc64" ];then rnetboot $$CN;else rpower $$CN boot;fi else rpower $$CN boot;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:rc==0 +check:output!~No such file or directory + +cmd:rpower $$SN on +check:rc==0 +end + +start:reg_set_xcatdebugmode_value_one_sles_diskful_flat +os:linux +description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. +cmd:echo " " > /var/log/xcat/computes.log +check:rc==0 + +cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi +cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN +check:rc==0 +cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p && mkvm $$CN; else rmvm $$CN -f -p && mkvm $$CN -s 20G; fi;fi +check:rc=0 +cmd:makedns -n +check:rc==0 +cmd:makeconservercf +check:rc==0 +cmd:cat /etc/conserver.cf | grep $$CN +check:output=~$$CN +cmd:sleep 20 +cmd:if [ "__GETNODEATTR($$CN,arch)__" = "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]; then getmacs -D $$CN; fi +check:rc==0 +cmd:makedhcp -n +check:rc==0 +cmd:makedhcp -a +check:rc==0 +cmd:sleep 10 +cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.leases|grep $$CN;elif cat /etc/*release |grep "Red Hat" >/dev/null;then cat /var/lib/dhcpd/dhcpd.leases|grep $$CN;fi +check:output=~$$CN +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,mgt)__" = "ipmi" ]]; then rsetboot $$CN net; fi +check:rc==0 +cmd:if [ "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [ "__GETNODEATTR($$CN,arch)__" = "ppc64" ];then rnetboot $$CN;else rpower $$CN boot;fi else rpower $$CN boot;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:rc==0 +check:output!~No such file or directory + +cmd:chtab key=xcatdebugmode site.value="0" +check:rc==0 +cmd:rpower $$SN on +check:rc==0 +end + + +start:set_xcatdebugmode_off_sles_diskful_flat_p8_le +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:copycds $$ISO +check:rc==0 +cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu" ]];then mkdir /tmp/iso; mount -o loop $$MINIISO /tmp/iso ; mkdir -p /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot; cp /tmp/iso/install/initrd.gz /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot;umount /tmp/iso; rmdir /tmp/iso; fi +check:rc==0 +cmd:makedhcp -n +check:rc==0 +cmd:makedhcp -a +check:rc==0 +cmd:makedns -n +check:rc==0 +cmd:makeconservercf $$CN +check:rc==0 +cmd:cat /etc/conserver.cf | grep $$CN +check:output=~$$CN +cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +check:rc==0 +cmd:rpower $$CN boot +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:rc==0 +check:output!~No such file or directory + +cmd:rpower $$SN on +check:rc==0 +end + + +start:set_xcatdebugmode_value_one_sles_diskful_flat_p8_le +os:linux +description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. +cmd:echo " " > /var/log/xcat/computes.log +check:rc==0 + +cmd:chtab key=xcatdebugmode site.value="1" +check:rc==0 + +cmd:copycds $$ISO +check:rc==0 +cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu" ]];then mkdir /tmp/iso; mount -o loop $$MINIISO /tmp/iso ; mkdir -p /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot; cp /tmp/iso/install/initrd.gz /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot;umount /tmp/iso; rmdir /tmp/iso; fi +check:rc==0 +cmd:makedhcp -n +check:rc==0 +cmd:makedhcp -a +check:rc==0 +cmd:makedns -n +check:rc==0 +cmd:makeconservercf $$CN +check:rc==0 +cmd:cat /etc/conserver.cf | grep $$CN +check:output=~$$CN +cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +check:rc==0 +cmd:rpower $$CN boot +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:rc==0 +check:output!~No such file or directory + +cmd:chtab key=xcatdebugmode site.value="0" +check:rc==0 +end + + diff --git a/xCAT-test/autotest/testcase/xcatdebugmode/ubuntu_xcatdebugmode_diskful b/xCAT-test/autotest/testcase/xcatdebugmode/ubuntu_xcatdebugmode_diskful new file mode 100644 index 000000000..babb2402f --- /dev/null +++ b/xCAT-test/autotest/testcase/xcatdebugmode/ubuntu_xcatdebugmode_diskful @@ -0,0 +1,232 @@ +start:set_xcatdebugmode_off_ubuntule_diskful +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:copycds $$ISO +check:rc==0 +cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu" ]];then mkdir /tmp/iso; mount -o loop $$MINIISO /tmp/iso ; mkdir -p /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot; cp /tmp/iso/install/initrd.gz /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot;umount /tmp/iso; rmdir /tmp/iso; fi +check:rc==0 +cmd:makedhcp -n +check:rc==0 +cmd:makedhcp -a +check:rc==0 +cmd:makedns -n +check:rc==0 +cmd:makeconservercf $$CN +check:rc==0 +cmd:cat /etc/conserver.cf | grep $$CN +check:output=~$$CN +cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +check:rc==0 +cmd:rpower $$CN boot +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:rc==0 +check:output!~No such file or directory +end + + +start:set_xcatdebugmode_off_ubuntux_vm_diskful +os:linux +description:site.xcatdebugmode value is 0, the following logs will be shown and ssh is not supported. +cmd:makedns -n +check:rc==0 +cmd:sleep 60 +cmd:makedhcp -n +check:rc==0 +cmd:makedhcp -a +check:rc==0 +cmd:makeconservercf $$CN +check:rc==0 +cmd:cat /etc/conserver.cf | grep $$CN +check:output=~$$CN +cmd:copycds $$ISO +check:rc==0 +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:rpower $$CN boot +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:rc==0 +check:output!~No such file or directory +end + + +start:set_xcatdebugmode_value_one_ubuntule_diskful +os:linux +description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. +cmd:echo " " > /var/log/xcat/computes.log +check:rc==0 +cmd:chtab key=xcatdebugmode site.value="1" +check:rc==0 +cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu" ]];then mkdir /tmp/iso; mount -o loop $$MINIISO /tmp/iso ; mkdir -p /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot; cp /tmp/iso/install/initrd.gz /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot;umount /tmp/iso; rmdir /tmp/iso; fi +check:rc==0 +cmd:makedhcp -n +check:rc==0 +cmd:makedhcp -a +check:rc==0 +cmd:makedns -n +check:rc==0 +cmd:makeconservercf $$CN +check:rc==0 +cmd:cat /etc/conserver.cf | grep $$CN +check:output=~$$CN +cmd:copycds $$ISO +check:rc==0 +cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +check:rc==0 +cmd:rpower $$CN boot +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\"" +checkoutput=~Running preseeding late\_command Installation script +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"postscripts downloaded successfully\"" +check:output=~\+ echo \'postscripts downloaded successfully\' +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep -c \"postscripts downloaded successfully\"" +checkoutput=~2 +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"mypostscript returned\"" +check:output=~\+ echo \'mypostscript returned\' +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep -c \"mypostscript returned\"" +checkoutput=~2 +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 -c \"finished node installation, reporting status\"" +checkoutput=~2 +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\/installer" +check:rc==0 +check:output!~No such file or directory +cmd:chtab key=xcatdebugmode site.value="0" +check:rc==0 +end + + +start:set_xcatdebugmode_value_one_ubuntux_vm_diskful +os:linux +description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. +cmd:echo " " > /var/log/xcat/computes.log +check:rc==0 + +cmd:chtab key=xcatdebugmode site.value="1" +check:rc==0 +cmd:makedns -n +check:rc==0 +cmd:sleep 60 +cmd:makedhcp -n +check:rc==0 +cmd:makedhcp -a +check:rc==0 +cmd:makeconservercf $$CN +check:rc==0 +cmd:cat /etc/conserver.cf | grep $$CN +check:output=~$$CN +cmd:copycds $$ISO +check:rc==0 +cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +check:rc==0 +cmd:rpower $$CN boot +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\"" +checkoutput=~Running preseeding late\_command Installation script +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"postscripts downloaded successfully\"" +check:output=~\+ echo \'postscripts downloaded successfully\' +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep -c \"postscripts downloaded successfully\"" +checkoutput=~2 +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep \"mypostscript returned\"" +check:output=~\+ echo \'mypostscript returned\' +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log | grep -c \"mypostscript returned\"" +checkoutput=~2 +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 -c \"finished node installation, reporting status\"" +checkoutput=~2 +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\/installer" +check:rc==0 +check:output!~No such file or directory +cmd:chtab key=xcatdebugmode site.value="0" +check:rc==0 +end + + +