diff --git a/xCAT-test/autotest/testcase/installation/SN_diskless_setup_case b/xCAT-test/autotest/testcase/installation/SN_diskless_setup_case index 4b4f02075..25a8db904 100644 --- a/xCAT-test/autotest/testcase/installation/SN_diskless_setup_case +++ b/xCAT-test/autotest/testcase/installation/SN_diskless_setup_case @@ -11,10 +11,10 @@ cmd:chtab key=nameservers site.value="" check:rc==0 cmd:makedns -n check:rc==0 -cmd:makeconservercf $$SN +cmd:if [ -x /usr/bin/goconserver ]; then makegocons $$SN; else makeconservercf $$SN;fi check:rc==0 -cmd:cat /etc/conserver.cf | grep $$SN -check:output=~$$SN +#cmd:cat /etc/conserver.cf | grep $$SN +#check:output=~$$SN cmd:sleep 20 cmd:if [[ "__GETNODEATTR($$SN,arch)__" = "ppc64" ]]; then getmacs -D $$SN -V; fi check:rc==0 @@ -45,7 +45,7 @@ check:rc==0 cmd:cd /install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/xcat/xcat-core && createrepo . check:rc==0 -cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sles" ]];then path="sles";fi; ver="__GETNODEATTR($$SN,os)__"; tmp=${ver%.*};ver=`echo "$tmp"|sed 's:[a-zA-Z]::g'`;cd /install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/xcat/xcat-dep/$path$ver/__GETNODEATTR($$SN,arch)__ && createrepo .; +cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sles" ]];then path="sles";fi; ver="__GETNODEATTR($$SN,os)__"; tmp=${ver%%.*};ver=`echo "$tmp"|sed 's:[a-zA-Z]::g'`;cd /install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/xcat/xcat-dep/$path$ver/__GETNODEATTR($$SN,arch)__ && createrepo .; check:rc==0 cmd:mkdef -t osimage -o __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-netboot-service --template __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-netboot-compute profile=service provmethod=netboot postscripts=servicenode @@ -54,21 +54,24 @@ check:rc==0 cmd:chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-netboot-service otherpkgdir=/install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__ check:rc==0 -cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sles" ]];then path="sles";fi; ver="__GETNODEATTR($$SN,os)__"; chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-netboot-service otherpkglist=/opt/xcat/share/xcat/netboot/$path/service.${ver%.*}.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist pkglist=/opt/xcat/share/xcat/netboot/$path/service.${ver%.*}.__GETNODEATTR($$SN,arch)__.pkglist exlist=/opt/xcat/share/xcat/netboot/$path/service.${ver%.*}.__GETNODEATTR($$SN,arch)__.exlist postinstall=/opt/xcat/share/xcat/netboot/$path/service.${ver%.*}.__GETNODEATTR($$SN,arch)__.postinstall; echo "xcat/xcat-core/xCAT-openbmc-py" >> /opt/xcat/share/xcat/netboot/$path/service.${ver%.*}.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist; cat /opt/xcat/share/xcat/netboot/$path/service.${ver%.*}.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist +cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sles" ]];then path="sles";fi; ver="__GETNODEATTR($$SN,os)__"; chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-netboot-service otherpkglist=/opt/xcat/share/xcat/netboot/$path/service.${ver%%.*}.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist pkglist=/opt/xcat/share/xcat/netboot/$path/service.${ver%%.*}.__GETNODEATTR($$SN,arch)__.pkglist exlist=/opt/xcat/share/xcat/netboot/$path/service.${ver%%.*}.__GETNODEATTR($$SN,arch)__.exlist postinstall=/opt/xcat/share/xcat/netboot/$path/service.${ver%%.*}.__GETNODEATTR($$SN,arch)__.postinstall check:rc==0 cmd:path="/install/netboot/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/service"; if [ -d "$path" ]; then mv $path $path."org"; fi; mkdir -p $path check:rc==0 + cmd:chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-netboot-service rootimgdir=/install/netboot/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/service check:rc==0 -cmd:chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-netboot-service -p pkgdir=$$PYTHON_DEP_EPEL_DIR,$$PYTHON_DEP_EXTRAS_DIR,$$PYTHON_DEP_FED_DIR +#if there was xCAT-openbmc-py been installed in MN, install xCAT-openbmc-py in SN accordingly +cmd:if rpm -qa|grep xCAT-openbmc-py 2>&1; then osimage="__GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-netboot-service";otherpkglist=$(lsdef -t osimage $osimage -i otherpkglist -c|awk -F"=" '{print $2}'); echo "xcat/xcat-core/xCAT-openbmc-py" >> $otherpkglist; chdef -t osimage $osimage -p pkgdir=$$PYTHON_DEP_EPEL_DIR,$$PYTHON_DEP_EXTRAS_DIR,$$PYTHON_DEP_FED_DIR; else echo "there is no xCAT-openbmc-py installed in MN, skip installing xCAT-openbmc-py in SN"; exit 0;fi check:rc==0 cmd:lsdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-netboot-service check:rc==0 +cmd:osimage="__GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-netboot-service";otherpkglist=$(lsdef -t osimage $osimage -i otherpkglist -c|awk -F"=" '{print $2}'); cat $otherpkglist cmd:if [ ! -d /tmp/mountoutput ]; then mkdir -p /tmp/mountoutput; fi cmd:mount |sort > /tmp/mountoutput/file.org @@ -91,10 +94,6 @@ check:output=~Provision node\(s\)\: $$SN cmd:if [[ -f /var/lib/dhcp/db/dhcpd.leases ]]; then cat /var/lib/dhcp/db/dhcpd.leases; elif [[ -f /var/lib/dhcpd/dhcpd.leases ]];then cat /var/lib/dhcpd/dhcpd.leases;elif [[ -f /var/lib/dhcp/dhcpd.leases ]];then cat /var/lib/dhcp/dhcpd.leases; fi -cmd:sleep 180 - -cmd:a=0;while ! `lsdef -l $$SN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 60 ];then break;fi done - cmd:ping $$SN -c 3 check:rc==0 check:output=~64 bytes from $$SN @@ -112,12 +111,10 @@ check:rc==0 check:output=~NODE=$$SN check:output=~IMAGENAME='__GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-netboot-service' check:output=~IMAGEUUID='\w+-\w+-\w+-\w+-\w+' -cmd:xdsh $$SN rpm -qa|grep "xCAT-openbmc-py" +cmd:if rpm -qa|grep xCAT-openbmc-py 2>&1; then xdsh $$SN rpm -qa|grep "xCAT-openbmc-py" ;else echo "there is no xCAT-openbmc-py installed in MN, skip check xCAT-openbmc-py installation in SN"; exit 0;fi check:rc==0 -check:output=~xCAT-openbmc-py-\d -cmd:xdsh $$SN rpm -qa|grep "gevent" +cmd:if rpm -qa|grep xCAT-openbmc-py 2>&1; then xdsh $$SN rpm -qa|grep "gevent" ;else echo "there is no xCAT-openbmc-py installed in MN, skip check gevent installation in SN"; exit 0;fi check:rc==0 -check:output=~ gevent-\d cmd:xdsh $$SN "service httpd status" check:rc==0 cmd:xdsh $$SN "service systemd status" @@ -126,4 +123,5 @@ cmd:xdsh $$SN "cat /var/log/xcat/xcat.log" cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-netboot-service|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir.org ]; then rm -rf $rootimgdir; mv $rootimgdir.org $rootimgdir; fi check:rc==0 cmd:xdsh $$SN "cat /var/log/xcat/xcat.log" +cmd:if [ -x /usr/bin/goconserver ]; then makegocons -d $$SN; else makeconservercf -d $$SN;fi end diff --git a/xCAT-test/autotest/testcase/installation/SN_setup_case b/xCAT-test/autotest/testcase/installation/SN_setup_case index 18a5e1f7d..75527edf2 100644 --- a/xCAT-test/autotest/testcase/installation/SN_setup_case +++ b/xCAT-test/autotest/testcase/installation/SN_setup_case @@ -12,10 +12,10 @@ check:rc==0 cmd:makedns -n check:rc==0 -cmd:makeconservercf $$SN +cmd:if [ -x /usr/bin/goconserver ]; then makegocons $$SN; else makeconservercf $$SN;fi check:rc==0 -cmd:cat /etc/conserver.cf | grep $$SN -check:output=~$$SN +#cmd:cat /etc/conserver.cf | grep $$SN +#check:output=~$$SN cmd:sleep 20 cmd:if [[ "__GETNODEATTR($$SN,arch)__" = "ppc64" ]]; then getmacs -D $$SN -V; fi check:rc==0 @@ -23,6 +23,7 @@ cmd:makedhcp -n check:rc==0 cmd:makedhcp -a check:rc==0 +cmd:sleep 2 cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.leases|grep $$SN;elif cat /etc/*release |grep "Red Hat" >/dev/null;then cat /var/lib/dhcpd/dhcpd.leases|grep $$SN;fi check:output=~$$SN cmd:chdef -t node $$SN groups=service,all @@ -45,17 +46,20 @@ check:rc==0 cmd:cd /install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/xcat/xcat-core && createrepo . check:rc==0 -cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sles" ]];then path="sles";fi; ver="__GETNODEATTR($$SN,os)__"; tmp=${ver%.*};ver=`echo "$tmp"|sed 's:[a-zA-Z]::g'`;cd /install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/xcat/xcat-dep/$path$ver/__GETNODEATTR($$SN,arch)__ && createrepo .; +cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sles" ]];then path="sles";fi; ver="__GETNODEATTR($$SN,os)__"; tmp=${ver%%.*};ver=`echo "$tmp"|sed 's:[a-zA-Z]::g'`;cd /install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/xcat/xcat-dep/$path$ver/__GETNODEATTR($$SN,arch)__ && createrepo .; check:rc==0 cmd:chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkgdir=/install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__ check:rc==0 -cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sles" ]];then path="sles";fi; ver="__GETNODEATTR($$SN,os)__"; chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/$path/service.${ver%.*}.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist; +cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sles" ]];then path="sles";fi; ver="__GETNODEATTR($$SN,os)__"; chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/$path/service.${ver%%.*}.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist; +check:rc==0 + +#add support python in sn +#if xCAT-openbmc-py has been installed in MN, will install xCAT-openbmc-py in sn +cmd:if rpm -qa|grep xCAT-openbmc-py 2>&1; then osimage="__GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service"; otherpkgdir=$(lsdef -t osimage $osimage -i otherpkgdir -c|awk -F"=" '{print $2}'); otherpkglist=$(lsdef -t osimage $osimage -i otherpkglist -c|awk -F"=" '{print $2}');mkdir -p $otherpkgdir/xcat/Packages; cp -r $$PYTHON_DEP_FED_DIR/Packages/*.rpm $otherpkgdir/xcat/Packages; cp -r $$PYTHON_DEP_EPEL_DIR/Packages/* $otherpkgdir/xcat/Packages; cp -r $$PYTHON_DEP_EXTRAS_DIR/Packages/* $otherpkgdir/xcat/Packages; cd $otherpkgdir/xcat/Packages && createrepo .; echo "xcat/Packages/python2-gevent" >> $otherpkglist; echo "xcat/Packages/python2-greenlet" >> $otherpkglist; echo "xcat/xcat-core/xCAT-openbmc-py" >> $otherpkglist; echo "--To check otherpkgdir"; ls -Rl $otherpkgdir/xcat/Packages; if ! ls -l $otherpkgdir/xcat/Packages|grep python2-gevent- > /dev/null 2>&1; then echo "there is no python2-gevent package under $otherpkgdir/xcat/Packages";exit 1; fi; if ! ls -l $otherpkgdir/xcat/Packages|grep python2-greenlet- > /dev/null 2>&1; then echo "there is no python2-greenlet under $otherpkgdir/xcat/Packages";exit 1; fi; echo "--To check otherpkglist"; cat $otherpkglist; if ! grep python2-gevent $otherpkglist > /dev/null 2>&1; then echo "there is no entry about python2-gevent in $otherpkglist"; exit 1;fi; if ! grep python2-greenlet $otherpkglist > /dev/null 2>&1; then echo "there is no entry about python2-greenlet in $otherpkglist"; exit 1;fi; exit 0; else echo "there is no xCAT-openbmc-py installed in MN, skip installing xCAT-openbmc-py in SN"; exit 0;fi check:rc==0 -#cmd:chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service pkgdir="/install/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__" -#check:rc==0 cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$SN __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service check:rc==0 @@ -95,9 +99,16 @@ cmd:xdsh $$SN cat /opt/xcat/xcatinfo check:rc==0 check:output=~NODE=$$SN check:output=~IMAGENAME=__GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service +cmd:if rpm -qa|grep xCAT-openbmc-py 2>&1; then xdsh $$SN "rpm -qa|grep xCAT-openbmc-py";else echo "there is no xCAT-openbmc-py installed in MN, skip check xCAT-openbmc-py installation in SN"; exit 0;fi +check:rc==0 +cmd:if rpm -qa|grep xCAT-openbmc-py 2>&1; then xdsh $$SN "rpm -qa|grep python2-gevent"; else echo "there is no xCAT-openbmc-py installed in MN, skip check python2-gevent installation in SN"; exit 0;fi +check:rc==0 +cmd:if rpm -qa|grep xCAT-openbmc-py 2>&1; then xdsh $$SN "rpm -qa|grep python2-greenlet"; else echo "there is no xCAT-openbmc-py installed in MN, skip check python2-greenlet installation in SN"; exit 0;fi +check:rc==0 cmd:xdsh $$SN "cat /var/log/xcat/xcat.log" cmd:if [[ "__GETNODEATTR($$SN,arch)__" =~ "x86_64" ]]; then if [[ "__GETNODEATTR($$SN,os)__" =~ "sles" ]];then xdsh $$SN "zypper -n install perl-Sys-Virt"; elif [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]];then xdsh $$SN "yum install -y perl-Sys-Virt";fi;fi check:rc==0 cmd:makentp -a check:rc==0 +cmd:if [ -x /usr/bin/goconserver ]; then makegocons -d $$SN; else makeconservercf -d $$SN;fi end diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat index c82b55be7..b13c10e2a 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat @@ -13,10 +13,8 @@ cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver= check:rc==0 cmd:makedns -n check:rc==0 -cmd:makeconservercf +cmd:if [ -x /usr/bin/goconserver ]; then makegocons $$CN; else makeconservercf $$CN; fi check:rc==0 -cmd:cat /etc/conserver.cf | grep $$CN -check:output=~$$CN cmd:sleep 20 cmd:if [[ "__GETNODEATTR($$CN,arch)__" = "ppc64" ]] && [[ "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]]; then getmacs -D $$CN; fi check:rc==0 @@ -75,6 +73,7 @@ check:output=~64 bytes from $$CN cmd:xdsh $$CN "cat /var/log/xcat/xcat.log" cmd:xdsh $$CN "cat /test.synclist" check:rc==0 +cmd:if [ -x /usr/bin/goconserver ]; then makegocons -d $$CN; else makeconservercf -d $$CN; fi cmd:if [[ -f /test.synclist.bak ]] ;then mv -f /test.synclist.bak /tmp/test.synclist;else rm -rf /test.synclist;fi cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute synclists= end diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy index cd76021a0..f78bf840a 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy @@ -20,10 +20,10 @@ check:rc==0 cmd:makedns -n check:rc==0 -cmd:makeconservercf +cmd:if [ -x /usr/bin/goconserver ]; then makegocons $$CN; else makeconservercf $$CN;fi check:rc==0 -cmd:cat /etc/conserver.cf | grep $$CN -check:output=~$$CN +#cmd:cat /etc/conserver.cf | grep $$CN +#check:output=~$$CN cmd:sleep 20 cmd:if [[ "__GETNODEATTR($$CN,arch)__" = "ppc64" ]]; then getmacs -D $$CN; fi check:rc==0 @@ -72,6 +72,7 @@ check:output=~SERVICEGROUP=$$SN cmd:xdsh $$CN "cat /var/log/xcat/xcat.log" cmd:xdsh $$CN "cat /test.synclist" check:rc==0 +cmd:if [ -x /usr/bin/goconserver ]; then makegocons -d $$CN; else makeconservercf -d $$CN; fi cmd:if [[ -f /test.synclist.bak ]] ;then mv -f /test.synclist.bak /test.synclist;else rm -rf /test.synclist;fi cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute synclists= end diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat index 4ac192916..f3ca421d7 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat @@ -11,10 +11,8 @@ check:rc==0 cmd:makedns -n check:rc==0 -cmd:makeconservercf $$CN +cmd:if [ -x /usr/bin/goconserver ]; then makegocons $$CN; else makeconservercf $$CN; fi check:rc==0 -cmd:cat /etc/conserver.cf | grep $$CN -check:output=~$$CN cmd:sleep 20 cmd:if [[ "__GETNODEATTR($$CN,arch)__" = "ppc64" ]] && [[ "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]]; then getmacs -D $$CN; fi check:rc==0 @@ -78,6 +76,7 @@ check:rc==0 cmd:xdsh $$CN "cat /var/log/xcat/xcat.log" cmd:xdsh $$CN "cat /test.synclist" check:rc==0 +cmd:if [ -x /usr/bin/goconserver ]; then makegocons -d $$CN; else makeconservercf -d $$CN; fi cmd:if [[ -f /test.synclist.bak ]] ;then mv -f /test.synclist.bak /test.synclist;else rm -rf /test.synclist;fi cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute synclists= check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy index 12b3c6167..b24aafdd1 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy @@ -16,10 +16,8 @@ check:rc==0 cmd:makedns -n check:rc==0 -cmd:makeconservercf $$CN +cmd:if [ -x /usr/bin/goconserver ]; then makegocons $$CN; else makeconservercf $$CN; fi check:rc==0 -cmd:cat /etc/conserver.cf | grep $$CN -check:output=~$$CN cmd:sleep 20 cmd:if [[ "__GETNODEATTR($$CN,arch)__" = "ppc64" ]]; then getmacs -D $$CN; fi check:rc==0 @@ -78,6 +76,7 @@ cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,ar check:rc==0 cmd:xdsh $$CN "cat /test.synclist" check:rc==0 +cmd:if [ -x /usr/bin/goconserver ]; then makegocons -d $$CN; else makeconservercf -d $$CN; fi cmd:if [[ -f /test.synclist.bak ]] ;then mv -f /test.synclist.bak /test.synclist;else rm -rf /test.synclist;fi cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute synclists= check:rc==0 diff --git a/xCAT-test/autotest/testcase/migration/redhat_migration b/xCAT-test/autotest/testcase/migration/redhat_migration index 9e6c618b1..43d0b7864 100644 --- a/xCAT-test/autotest/testcase/migration/redhat_migration +++ b/xCAT-test/autotest/testcase/migration/redhat_migration @@ -15,10 +15,8 @@ cmd:makedns -n check:rc==0 cmd:service named restart check:rc==0 -cmd:makeconservercf $$CN +cmd:if [ -x /usr/bin/goconserver ]; then makegocons $$CN; else makeconservercf $$CN; fi check:rc==0 -cmd:cat /etc/conserver.cf | grep $$CN -check:output=~$$CN cmd:sleep 60 cmd:if [ "__GETNODEATTR($$CN,arch)__" = "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]; then getmacs -D $$CN; fi check:rc==0 @@ -54,13 +52,15 @@ cmd:xdsh $$CN "cd /oldxcat;wget $$MIGRATION1_DEP" check:rc==0 cmd:xdsh $$CN "cd /oldxcat;wget $$MIGRATION1_CORE" check:rc==0 +cmd:xdsh $$CN "type apt-get && apt-get install -y tar" +cmd:xdsh $$CN "type yum && yum install -y tar" cmd:xdsh $$CN "tar -jxvf /oldxcat/xcat-dep* -C /oldxcat" check:rc==0 cmd:xdsh $$CN "tar -jxvf /oldxcat/xcat-core* -C /oldxcat" check:rc==0 cmd:xdsh $$CN "/oldxcat/xcat-core/mklocalrepo.sh" check:rc==0 -cmd:xdsh $$CN "cd /oldxcat/xcat-dep/rh`echo __GETNODEATTR($$CN,os)__ | cut -c6`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" +cmd:tmp="__GETNODEATTR($$CN,os)__"; ver=${tmp%%.*}; tmp="rh"${ver:(-1):1}; xdsh $$CN "cd /oldxcat/xcat-dep/$tmp/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" check:rc==0 cmd:xdsh $$CN "yum clean all;yum -y install xCAT" check:rc==0 @@ -87,7 +87,7 @@ cmd:xdsh $$CN "cd /root/xcat-core;./mklocalrepo.sh" check:rc==0 cmd:xdsh $$CN "tar -jxvf /xcat-dep*.tar.bz2" check:rc==0 -cmd:xdsh $$CN "cd /root/xcat-dep/rh`echo __GETNODEATTR($$CN,os)__ | cut -c6`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" +cmd:tmp="__GETNODEATTR($$CN,os)__"; ver=${tmp%%.*}; tmp="rh"${ver:(-1):1}; xdsh $$CN "cd /root/xcat-dep/$tmp/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" check:rc==0 cmd:xdsh $$CN "yum clean metadata;yum -y update '*xCAT*'" check:rc==0 @@ -100,6 +100,7 @@ cmd:xdsh $$CN "noderm node0001" check:rc==0 cmd:latest_version_info=`lsxcatd -v`;xdsh $$CN "lsxcatd -v" | grep "$latest_version_info" check:rc==0 +cmd:if [ -x /usr/bin/goconserver ]; then makegocons -d $$CN; else makeconservercf -d $$CN; fi cmd:if [[ -f /tmp/servicelabel ]];then chdef $$SN -p groups=service;rm -rf /tmp/servicelabel;fi check:rc==0 cmd:if [[ -f /tmp/poweroffsn ]];then rpower $$SN on > /dev/null;rm -rf /tmp/poweroffsn;fi @@ -123,10 +124,8 @@ cmd:makedns -n check:rc==0 cmd:service named restart check:rc==0 -cmd:makeconservercf $$CN +cmd:if [ -x /usr/bin/goconserver ]; then makegocons $$CN; else makeconservercf $$CN; fi check:rc==0 -cmd:cat /etc/conserver.cf | grep $$CN -check:output=~$$CN cmd:sleep 60 cmd:if [ "__GETNODEATTR($$CN,arch)__" = "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]; then getmacs -D $$CN; fi check:rc==0 @@ -162,13 +161,15 @@ cmd:xdsh $$CN "cd /oldxcat;wget $$MIGRATION2_DEP" check:rc==0 cmd:xdsh $$CN "cd /oldxcat;wget $$MIGRATION2_CORE" check:rc==0 +cmd:xdsh $$CN "type apt-get && apt-get install -y tar" +cmd:xdsh $$CN "type yum && yum install -y tar" cmd:xdsh $$CN "tar -jxvf /oldxcat/xcat-dep* -C /oldxcat" check:rc==0 cmd:xdsh $$CN "tar -jxvf /oldxcat/xcat-core* -C /oldxcat" check:rc==0 cmd:xdsh $$CN "/oldxcat/xcat-core/mklocalrepo.sh" check:rc==0 -cmd:xdsh $$CN "cd /oldxcat/xcat-dep/rh`echo __GETNODEATTR($$CN,os)__ | cut -c6`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" +cmd:tmp="__GETNODEATTR($$CN,os)__"; ver=${tmp%%.*}; tmp="rh"${ver:(-1):1};xdsh $$CN "cd /oldxcat/xcat-dep/$tmp/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" check:rc==0 cmd:xdsh $$CN "yum clean all;yum -y install xCAT" check:rc==0 @@ -195,7 +196,8 @@ cmd:xdsh $$CN "cd /root/xcat-core;./mklocalrepo.sh" check:rc==0 cmd:xdsh $$CN "tar -jxvf /xcat-dep*.tar.bz2" check:rc==0 -cmd:xdsh $$CN "cd /root/xcat-dep/rh`echo __GETNODEATTR($$CN,os)__ | cut -c6`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" +#cmd:xdsh $$CN "cd /root/xcat-dep/rh`echo __GETNODEATTR($$CN,os)__ | cut -c6`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" +cmd:tmp="__GETNODEATTR($$CN,os)__"; ver=${tmp%%.*}; tmp="rh"${ver:(-1):1};xdsh $$CN "cd /root/xcat-dep/$tmp/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" check:rc==0 cmd:xdsh $$CN "yum clean metadata;yum -y update '*xCAT*'" check:rc==0 @@ -208,6 +210,7 @@ cmd:xdsh $$CN "noderm node0001" check:rc==0 cmd:latest_version_info=`lsxcatd -v`;xdsh $$CN "lsxcatd -v" | grep "$latest_version_info" check:rc==0 +cmd:if [ -x /usr/bin/goconserver ]; then makegocons -d $$CN; else makeconservercf -d $$CN; fi cmd:if [[ -f /tmp/servicelabel ]];then chdef $$SN -p groups=service;rm -rf /tmp/servicelabel;fi check:rc==0 cmd:if [[ -f /tmp/poweroffsn ]];then rpower $$SN on > /dev/null;rm -rf /tmp/poweroffsn;fi diff --git a/xCAT-test/autotest/testcase/xcatconfig/case0 b/xCAT-test/autotest/testcase/xcatconfig/case0 index e3f63cb9a..038d238fc 100644 --- a/xCAT-test/autotest/testcase/xcatconfig/case0 +++ b/xCAT-test/autotest/testcase/xcatconfig/case0 @@ -118,7 +118,9 @@ cmd:rm -rf /tmp/xcatconfig.test check:rc==0 cmd:rm -rf /etc/xcat/cabak /etc/xcat/certbak check:rc==0 -cmd:if lsdef service > /dev/null 2>&1; then updatenode service -P servicenode;makeconservercf;fi +cmd:if service goconserver status > /dev/null 2>&1; then service goconserver restart; fi +cmd:if service conserver status > /dev/null 2>&1; then service conserver restart ; fi +cmd:if lsdef service > /dev/null 2>&1; then updatenode service -P servicenode;fi check:rc==0 cmd:if lsdef service > /dev/null 2>&1; then rpower $$CN stat;fi check:rc==0 diff --git a/xCAT-test/autotest/testcase/xdcp/cases1 b/xCAT-test/autotest/testcase/xdcp/cases1 index 1f26ef5da..1aa738a7f 100644 --- a/xCAT-test/autotest/testcase/xdcp/cases1 +++ b/xCAT-test/autotest/testcase/xdcp/cases1 @@ -4,12 +4,16 @@ cmd:lsdef -t site -z clustersite > /tmp/site.stanza cmd:chdef -t site SNsyncfiledir=/tmp cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $servicenode "useradd -m xyzzy";useradd -m xyzzy;else useradd -m xyzzy;fi check:rc==0 +cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $servicenode "type apt-get && apt-get install -y tar";fi +cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $servicenode "type yum && yum install -y tar"; fi cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $servicenode "bash -c \"( cd ~root && tar cf - .xcat .ssh ) | ( cd ~xyzzy && tar xf - )\"";bash -c "( cd ~root && tar cf - .xcat .ssh ) | ( cd ~xyzzy && tar xf - )";else bash -c "( cd ~root && tar cf - .xcat .ssh ) | ( cd ~xyzzy && tar xf - )";fi check:rc==0 cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $servicenode "chown -R xyzzy ~xyzzy/.xcat ~xyzzy/.ssh";chown -R xyzzy ~xyzzy/.xcat ~xyzzy/.ssh;else chown -R xyzzy ~xyzzy/.xcat ~xyzzy/.ssh;fi check:rc==0 cmd:xdsh $$CN "useradd -m xyzzy" check:rc==0 +cmd:xdsh $$CN "type apt-get && apt-get install -y tar" +cmd:xdsh $$CN "type yum && yum install -y tar" cmd:xdsh $$CN "( cd ~ && tar cf - .ssh ) | ( cd ~xyzzy && tar xf - )" check:rc==0 cmd:xdsh $$CN "chown -R xyzzy ~xyzzy/.ssh"