2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 09:13:08 +00:00

Merge branch 'master' into l_command

This commit is contained in:
Weihua Hu 2018-07-04 13:44:27 +08:00 committed by GitHub
commit 4f42c24680
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with 120 additions and 1911 deletions

View File

@ -68,9 +68,9 @@ xCATCmd () {
# $2 is the command
ARCH=`uname -m`
if [ x$ARCH = x"ppc64" -a x$OS = x"rh" ]; then
echo "<xcatrequest>\n<command>${2}</command>\n</xcatrequest>" | /usr/sbin/chroot ${MNTDIR} /usr/bin/openssl s_client -quiet -no_ssl3 -connect ${1} -rand /bin/nice 2>/dev/null
echo "<xcatrequest>\n<command>${2}</command>\n</xcatrequest>" | /usr/sbin/chroot ${MNTDIR} /usr/bin/openssl s_client -quiet -no_ssl3 -no_ssl2 -connect ${1} -rand /bin/nice 2>/dev/null
else
echo "<xcatrequest>\n<command>${2}</command>\n</xcatrequest>" | LD_LIBRARY_PATH=${MNTDIR}/lib64:${MNTDIR}/usr/lib64 ${MNTDIR}/usr/bin/openssl s_client -quiet -no_ssl3 -connect ${1} -rand /bin/nice 2>/dev/null
echo "<xcatrequest>\n<command>${2}</command>\n</xcatrequest>" | LD_LIBRARY_PATH=${MNTDIR}/lib64:${MNTDIR}/usr/lib64 ${MNTDIR}/usr/bin/openssl s_client -quiet -no_ssl3 -no_ssl2 -connect ${1} -rand /bin/nice 2>/dev/null
fi
}

View File

@ -128,7 +128,7 @@ GetSyncInfo () {
xCATCmd () {
# $1 is the xCAT server
# $2 is the command
echo "<xcatrequest>\n<command>${2}</command>\n</xcatrequest>" | LD_LIBRARY_PATH=${MNTDIR}/lib64:${MNTDIR}/usr/lib64 ${MNTDIR}/usr/bin/openssl s_client -quiet -no_ssl3 -connect ${1} -rand /bin/nice 2>/dev/null
echo "<xcatrequest>\n<command>${2}</command>\n</xcatrequest>" | LD_LIBRARY_PATH=${MNTDIR}/lib64:${MNTDIR}/usr/lib64 ${MNTDIR}/usr/bin/openssl s_client -quiet -no_ssl3 -no_ssl2 -connect ${1} -rand /bin/nice 2>/dev/null
}

View File

@ -128,7 +128,7 @@ GetSyncInfo () {
xCATCmd () {
# $1 is the xCAT server
# $2 is the command
echo "<xcatrequest>\n<command>${2}</command>\n</xcatrequest>" | /usr/sbin/chroot ${MNTDIR} /usr/bin/openssl s_client -quiet -no_ssl3 -connect ${1} -rand /bin/nice 2>/dev/null
echo "<xcatrequest>\n<command>${2}</command>\n</xcatrequest>" | /usr/sbin/chroot ${MNTDIR} /usr/bin/openssl s_client -quiet -no_ssl3 -no_ssl2 -connect ${1} -rand /bin/nice 2>/dev/null
}

View File

@ -10,7 +10,7 @@ XCATMASTER=$XCAT
STATEMNT="$(getarg STATEMNT=)"
rootlimit="$(getarg rootlimit=)"
xcatdebugmode="$(getarg xcatdebugmode=)"
rflags="$(getarg rootflags=)"
getarg nonodestatus
NODESTATUS=$?
@ -77,10 +77,14 @@ if [ -r /rootimg.sfs ]; then
elif [ -r /rootimg.cpio.gz ] || [ -r /rootimg.cpio.xz ]; then
logger $SYSLOGHOST -t $log_label -p local4.info "Setting up RAM-root tmpfs on downloaded rootimg.cpio.[gz/xz]..."
echo Setting up RAM-root tmpfs.
if [ -z $rootlimit ];then
mount -t tmpfs -o mode=755 rootfs $NEWROOT
rootopts="mode=755"
if [ -n "$rflags" ]; then
rootopts="$rootopts","$rflags"
fi
if [ -z "$rootlimit" ];then
mount -t tmpfs -o $rootopts rootfs $NEWROOT
else
mount -t tmpfs -o mode=755,size=$rootlimit rootfs $NEWROOT
mount -t tmpfs -o "$rootopts",size=$rootlimit rootfs $NEWROOT
fi
cd $NEWROOT

View File

@ -1,6 +1,6 @@
start:check_mn_cluster_log_file
os:Linux
description:check known error message in /var/log/xcat/cluster.log file. Only for redhat and sles.
label:mn_only
cmd:cat /var/log/xcat/cluster.log | grep "xcatd: Error happened when receiving data from DB access"
check:output!~xcatd: Error happened when receiving data from DB access
cmd:cat /var/log/xcat/cluster.log | grep "Undefined subroutine &main"

View File

@ -1,44 +0,0 @@
start:chkosimage_h
description:chkosimage -h and --help
os:AIX
cmd:chkosimage -h
check:output=~usage|Usage
cmd:chkosimage --help
check:output=~usage|Usage
end
start:chkosimage_imagename
description: chkosimage autotest
os:AIX
cmd:mknimimage -V -s $$SOURCE autotest
check:rc==0
cmd:lsnim | grep autotest
check:rc==0
check:output=~lpp_source
check:output=~spot
check:output=~bosinst_data
cmd:nim -o update -a packages=all -a source=$$SSHPKG autotest_lpp_source
check:rc==0
cmd:mkdir -p /install/nim/installp_bundle
cmd:cp $$SSHPKG/xCATaixCN71.bnd /install/nim/installp_bundle/
check:rc==0
cmd:nim -o define -t installp_bundle -a server=master -a location=/install/nim/installp_bundle/xCATaixCN71.bnd xCATaixCN71
cmd:chdef -t osimage -o autotest installp_bundle="xCATaixCN71"
check:rc==0
cmd:chkosimage autotest
check:rc==0
end
start:chkosimage_V_c_imagename
description:chkosimage -V -c autotest
os:AIX
cmd:lsnim | grep autotest
check:rc==0
check:output=~lpp_source
check:output=~spot
check:output=~bosinst_data
cmd:chkosimage -V -c autotest
check:rc==0
end

View File

@ -4,8 +4,10 @@
#check:rc!=0
#check:output=~Usage
#end
start:chvm_p
hcp:hmc
label:others,virtualization
cmd:mkdef -t node -o testnode mgt=hmc groups=all
cmd:mkvm testnode -i $$MaxLparID -l $$CN
check:rc==0
@ -26,8 +28,10 @@ check:output=~__GETNODEATTR($$CN, pprofile)__
cmd:rmvm testnode
cmd:rm -f /tmp/autotest.profile
end
start:chvm_attr
hcp:hmc
label:others,virtualization
cmd:mkdef -t node -o testnode mgt=hmc groups=all
cmd:mkvm testnode -i $$MaxLparID -l $$CN
check:rc==0
@ -38,12 +42,16 @@ cmd:lsvm testnode
check:output=~min_mem=1024
cmd:rmvm testnode
end
start:chvm_node
label:mn_only,virtualization
cmd:chvm $$CN
check:rc!=0
check:output=~Usage
end
start:chvm_err_node
label:mn_only,virtualization
cmd:dir="/tmp/chvm_err_node";echo ${dir}".old";if [ -d "${dir}" ];then mv ${dir} ${dir}".old"; fi; mkdir -p $dir
check:rc==0
cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/chvm_err_node/bogusnode.stanza ;rmdef bogusnode;fi

View File

@ -1,60 +0,0 @@
start:Diskless_installation_flat_p8_le
os:Linux
cmd:copycds $$ISO
check:rc==0
cmd:makedns -n
check:rc==0
cmd:makedhcp -n
check:rc==0
cmd:makedhcp -a
check:rc==0
cmd:makeconservercf $$CN
check:rc==0
cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then mv $rootimgdir $rootimgdir.regbak -f;fi
check:rc==0
cmd:if cat /etc/*release |grep SUSE >/dev/null;then if [ ! -d /install/custom/netboot/sles ]; then mkdir -p /install/custom/netboot/sles; fi; elif cat /etc/*release |grep "Red Hat" >/dev/null;then if [ ! -d /install/custom/netboot/rh ]; then mkdir -p /install/custom/netboot/rh; fi; elif cat /etc/*release |grep "Ubuntu" >/dev/null;then if [ ! -d /install/custom/netboot/ubuntu ]; then mkdir -p /install/custom/netboot/ubuntu; fi; fi
check:rc==0
cmd:if cat /etc/*release |grep SUSE >/dev/null;then if [ ! -e /install/custom/netboot/sles/compute.synclist ]; then echo "/etc/resolv.conf -> /etc/resolv.conf" > /install/custom/netboot/sles/compute.synclist; fi; elif cat /etc/*release |grep "Red Hat" >/dev/null;then if [ ! -e /install/custom/netboot/rh/compute.synclist ]; then echo "/etc/resolv.conf -> /etc/resolv.conf" > /install/custom/netboot/rh/compute.synclist; fi; elif cat /etc/*release |grep "Ubuntu" >/dev/null;then if [ ! -e /install/custom/netboot/ubuntu/compute.synclist ]; then echo "/etc/resolv.conf -> /etc/resolv.conf" > /install/custom/netboot/ubuntu/compute.synclist;fi; fi
check:rc==0
cmd:if cat /etc/*release |grep SUSE >/dev/null;then chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute synclists=/install/custom/netboot/sles/compute.synclist; elif cat /etc/*release |grep "Red Hat" >/dev/null;then chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute synclists=/install/custom/netboot/rh/compute.synclist;elif cat /etc/*release |grep "Ubuntu" >/dev/null; then chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute synclists=/install/custom/netboot/ubuntu/compute.synclist;fi
check:rc==0
cmd:if [ ! -d /tmp/mountoutput ]; then mkdir -p /tmp/mountoutput; fi
cmd:mount |sort > /tmp/mountoutput/file.org
cmd:cat /tmp/mountoutput/file.org
cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
cmd:mount |sort > /tmp/mountoutput/file.new
cmd:cat /tmp/mountoutput/file.new
cmd:diff /tmp/mountoutput/file.org /tmp/mountoutput/file.new
check:rc==0
cmd:rm -rf /tmp/mountoutput
cmd:packimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
cmd:chdef $$CN status=
check:rc==0
cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
check:output=~Provision node\(s\)\: $$CN
cmd:sleep 200
cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 100 ];then break;fi done
cmd:lsdef -l $$CN | grep status
check:output=~booted
cmd:xdsh $$CN date
check:rc==0
check:output=~\d\d:\d\d:\d\d
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
cmd:rinstall $$CN osimage
check:rc==0
cmd:sleep 200
cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 100 ];then break;fi done
cmd:lsdef -l $$CN | grep status
check:output=~booted
cmd:xdsh $$CN date
check:rc==0
check:output=~\d\d:\d\d:\d\d
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir.regbak ]; then rm -rf $rootimgdir; mv $rootimgdir.regbak $rootimgdir; fi
check:rc==0
end

View File

@ -1,46 +0,0 @@
start:Full_installation_flat_p8_le
os:Linux
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:chtab key=extntpservers site.value=""
check:rc==0
cmd:chtab key=ntpservers site.value="<xcatmaster>"
check:rc==0
cmd:makentp
check:rc==0
cmd:makedhcp -n
check:rc==0
cmd:makedhcp -a
check:rc==0
cmd:a=0;while true; do [ $a -eq 100 ] && exit 1;output=$(makedhcp -q $$CN);[ $? -ne 0 ] && exit 1;echo $output|grep $$CN 2>/dev/null && exit 0;a=$[$a+1];sleep 1;done
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:if [ "__GETNODEATTR($$CN,os)__" != "sles12.1" ];then chdef -t node -o $$CN postscripts=setupntp; fi
cmd:lsdef -l $$CN
check:rc==0
cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
check:rc==0
check:output=~Provision node\(s\)\: $$CN
cmd:sleep 600
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:ping $$CN -c 3
check:output=~64 bytes from $$CN
cmd:lsdef -l $$CN | grep status
check:output=~booted
cmd:xdsh $$CN date
check:rc==0
check:output=~\d\d:\d\d:\d\d
#comment for futher discussion.
#cmd:xdsh $$CN service ntpd status
#check:rc==0
#check:output=~running
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
end

View File

@ -1,99 +0,0 @@
start:reg_linux_SN_installation_hierarchy
os:Linux
cmd:chtab key=nameservers site.value="<xcatmaster>"
check:rc==0
cmd:makedns -n
check:rc==0
cmd:makeconservercf
check:rc==0
cmd:cat /etc/conserver.cf | grep $$SN
check:output=~$$SN
cmd:sleep 20
cmd:if [[ "__GETNODEATTR($$SN,arch)__" =~ "ppc64" ]]; then getmacs -D $$SN; fi
check:rc==0
cmd:makedhcp -n
check:rc==0
cmd:makedhcp -a
check:rc==0
cmd:a=0;while true; do [ $a -eq 100 ] && exit 1;output=$(makedhcp -q $$SN);[ $? -ne 0 ] && exit 1;echo $output|grep $$SN 2>/dev/null && exit 0;a=$[$a+1];sleep 1;done
check:rc==0
cmd:chdef -t node $$SN groups=service,all
check:rc==0
cmd:chdef -t group -o service profile=service primarynic=mac installnic=mac
check:rc==0
cmd:chdef -t group -o service setupnfs=1 setupdhcp=1 setuptftp=1 setupnameserver=1 setupconserver=1
check:rc==0
cmd:chdef -t group -o service nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN monserver=$$MN
check:rc==0
cmd:chtab node=service postscripts.postscripts="servicenode"
check:rc==0
cmd:copycds $$ISO
check:rc==0
cmd:chdef -t site clustersite installloc="/install"
check:rc==0
cmd:cd /install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/xcat/xcat-core && createrepo .
check:rc==0
#cmd:if cat /etc/*release |grep SUSE >/dev/null;then ver=`cat /etc/*release |grep "VERSION = " | sed 's:VERSION = \(.*\):\1:g'`; cd /install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/xcat/xcat-dep/sles$ver/__GETNODEATTR($$SN,arch)__ && createrepo . ;elif cat /etc/*release |grep "Red Hat" >/dev/null;then ver=`cat /etc/*release |awk '{print $7}' |awk -F"." '{print $1}'|head -n 1`;cd /install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/xcat/xcat-dep/rh$ver/__GETNODEATTR($$SN,arch)__ && createrepo . ;fi
#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 cat /etc/*release |grep SUSE >/dev/null;then ver=`cat /etc/*release |grep "VERSION = " | sed 's:VERSION = \(.*\):\1:g'`; chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/sles/service.sles$ver.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist; elif cat /etc/*release |grep "Red Hat" >/dev/null;then ver=`cat /etc/*release |awk '{print $7}' |awk -F"." '{print $1}'|head -n 1`;chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/rh/service.rhels$ver.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist;fi
#cmd:if cat /etc/*release |grep SUSE >/dev/null;then ver=`cat /etc/*release |grep "VERSION = " | sed 's:VERSION = \(.*\):\1:g'`; chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/sles/service.sles$ver.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist; elif cat /etc/*release |grep "Red Hat" >/dev/null;then chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/rh/service.__GETNODEATTR($$SN,os).__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist;fi
#check:rc==0
cmd:if cat /etc/*release |grep SUSE >/dev/null;then ver=`cat /etc/*release |grep "VERSION = " | sed 's:VERSION = \(.*\):\1:g'`; chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/sles/service.sles$ver.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist; elif cat /etc/*release |grep "7.0" |grep "Red Hat">/dev/null;then chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/rh/service.__GETNODEATTR($$SN,os)__.ppc64.otherpkgs.pkglist;elif cat /etc/*release |grep "Red Hat" |grep "6.5">/dev/null;then ver=`cat /etc/*release |awk '{print $7}' |awk -F"." '{print $1}'|head -n 1`;chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/rh/service.rhels$ver.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist;fi
check:rc==0
#cmd:if cat /etc/*release |grep SUSE >/dev/null;then ver=`cat /etc/*release |grep "VERSION = " | sed 's:VERSION = \(.*\):\1:g'`;for i in mysql-client libmysqlclient_r15 libqt4-sql-mysql libmysqlclient15 perl-DBD-mysql mysql; do cat /opt/xcat/share/xcat/install/sles/service.sles$ver.pkglist|grep "$i$";if [ $? -ne 0 ] ; then echo "$i" >> /opt/xcat/share/xcat/install/sles/service.sles$ver.pkglist; fi done; elif cat /etc/*release |grep "Red Hat" >/dev/null;then ver=`cat /etc/*release |awk '{print $7}' |awk -F"." '{print $1}'|head -n 1`;for i in mysql; do cat /opt/xcat/share/xcat/install/rh/service.rhels$ver.ppc64.pkglist|grep "$i$";if [ $? -ne 0 ] ; then echo "$i" >> /opt/xcat/share/xcat/install/rh/service.rhels$ver.ppc64.pkglist; fi done;fi
#cmd:if cat /etc/*release |grep SUSE >/dev/null;then ver=`cat /etc/*release |grep "VERSION = " | sed 's:VERSION = \(.*\):\1:g'`;for i in mariadb-devel-5.5.35-3.el7 mariadb-libs-5.5.35-3.el7 mariadb-server-5.5.35-3.el7 mariadb-bench-5.5.35-3.el7 mariadb-5.5.35-3.el7 perl-DBD-MySQL mysql-connector-odbc unixODBC; do cat /opt/xcat/share/xcat/install/sles/service.sles$ver.pkglist|grep "$i$";if [ $? -ne 0 ] ; then echo "$i" >> /opt/xcat/share/xcat/install/sles/service.sles$ver.pkglist; fi done; elif cat /etc/*release |grep "Red Hat" >/dev/null;then ver=__GETNODEATTR($$SN,os)__;for i in mysql; do cat /opt/xcat/share/xcat/install/rh/service.$ver.ppc64.pkglist|grep "$i$";if [ $? -ne 0 ] ; then echo "$i" >> /opt/xcat/share/xcat/install/rh/service.$ver.ppc64.pkglist; fi done;fi
check:rc==0
#cmd:if cat /etc/*release |grep SUSE >/dev/null;then ver=`cat /etc/*release |grep "VERSION = " | sed 's:VERSION = \(.*\):\1:g'`;chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service pkglist=/opt/xcat/share/xcat/install/sles/service.sles$ver.pkglist; elif cat /etc/*release |grep "Red Hat" >/dev/null;then ver=`cat /etc/*release |awk '{print $7}' |awk -F"." '{print $1}'|head -n 1`;chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service pkglist=/opt/xcat/share/xcat/install/rh/service.rhels$ver.__GETNODEATTR($$SN,arch)__.pkglist;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:rinstall $$SN osimage=__GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service
check:rc==0
check:output=~Provision node\(s\)\: $$SN
cmd:sleep 600
cmd:a=0;while ! `lsdef -l $$SN|grep status|grep booted >/dev/null`; do sleep 60;((a++));if [ $a -gt 70 ];then break;fi done
cmd:ping $$SN -c 3
check:rc==0
check:output=~64 bytes from $$SN
cmd:lsdef -l $$SN | grep status
check:rc==0
check:output=~booted
cmd:xdsh $$SN date
check:rc==0
check:output=~\d\d:\d\d:\d\d
cmd:xdsh $$SN "ps -ef |grep xcatd"
check:rc==0
check:output=~xcatd:
cmd:xdsh $$SN "lsdef"
check:rc==0
check:output=~$$SN: $$SN
cmd:xdsh $$SN "tabdump site"
check:rc==0
check:output=~tftpdir
cmd:xdsh $$SN "mount"
check:rc==0
check:output=~/install on /install
cmd:xdsh $$SN "mount"
check:rc==0
check:output=~/tftpboot on /tftpboot
#cmd:xdsh $$SN "nslookup $$CN"
#check:rc==0
#check:output!~server can't find $$CN
cmd:if [[ "__GETNODEATTR($$SN,arch)__" =~ "x86_64" ]]; then if cat /etc/*release |grep SUSE >/dev/null;then xdsh $$SN "zypper -n install perl-Sys-Virt"; elif cat /etc/*release |grep "Red Hat" >/dev/null;then xdsh $$SN "yum install -y perl-Sys-Virt";fi;fi
check:rc==0
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
end

View File

@ -1,50 +0,0 @@
start:Ubuntu_diskless_installation_flat_x86_vm
os:Linux
cmd:copycds $$ISO
check:rc==0
cmd:if [[ "__GETNODEATTR($$CN,arch)__" != "ppc64" ]]; then tabdump -w node==$$CN kvm_nodedata; fi
check:rc=0
#comment for vm debug
#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
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;rmvm $$CN -f -p;mkvm $$CN -s 20G; fi;fi
check:rc=0
cmd:makedns -n
check:rc==0
cmd:makedhcp -n
check:rc==0
cmd:makedhcp -a
check:rc==0
cmd:a=0;while true; do [ $a -eq 100 ] && exit 1;output=$(makedhcp -q $$CN);[ $? -ne 0 ] && exit 1;echo $output|grep $$CN 2>/dev/null && exit 0;a=$[$a+1];sleep 1;done
check:rc==0
cmd:makeconservercf $$CN
check:rc==0
cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then mv $rootimgdir $rootimgdir.regbak -f;fi
check:rc==0
cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
cmd:packimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
check:output=~Provision node\(s\)\: $$CN
cmd:sleep 200
cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 300 ];then break;fi done
cmd:lsdef -l $$CN | grep status
check:output=~booted
cmd:xdsh $$CN date
check:rc==0
check:output=~\d\d:\d\d:\d\d
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
cmd:rinstall $$CN osimage
check:rc==0
cmd:sleep 200
cmd:lsdef -l $$CN | grep status
check:output=~booted
cmd:xdsh $$CN date
check:rc==0
check:output=~\d\d:\d\d:\d\d
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir.regbak ]; then rm -rf $rootimgdir; mv $rootimgdir.regbak $rootimgdir; fi
check:rc==0
end

View File

@ -1,32 +0,0 @@
start:Ubuntu_full_installation_flat_x86_vm
os:Linux
cmd:copycds $$ISO
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:a=0;while true; do [ $a -eq 100 ] && exit 1;output=$(makedhcp -q $$CN);[ $? -ne 0 ] && exit 1;echo $output|grep $$CN 2>/dev/null && exit 0;a=$[$a+1];sleep 1;done
check:rc==0
cmd:makeconservercf $$CN
check:rc==0
cmd:cat /etc/conserver.cf | grep $$CN
check:output=~$$CN
cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
check:rc==0
check:output=~Provision node\(s\)\: $$CN
cmd:sleep 300
cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 300 ];then break;fi done
cmd:ping $$CN -c 3
check:output=~64 bytes from $$CN
cmd:lsdef -l $$CN | grep status
check:output=~booted
cmd:xdsh $$CN date
check:rc==0
check:output=~\d\d:\d\d:\d\d
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
end

View File

@ -1,11 +1,13 @@
start:lsxcatd_null
description:lsxcatd without any flag
label:mn_only,xcatd
cmd:lsxcatd
check:output=~lsxcatd
end
start:lsxcatd_h
description:lsxcatd -h
label:mn_only,xcatd
cmd:lsxcatd -h
check:rc==0
check:output=~lsxcatd
@ -13,6 +15,7 @@ end
start:lsxcatd_d
description:lsxcatd -d
label:mn_only,xcatd
cmd:lsxcatd -d
check:rc==0
check:output=~(cfgloc|dbengine|dbinstance|dbname|dbloc)
@ -20,6 +23,7 @@ end
start:lsxcatd_a
description:lsxcatd -a
label:mn_only,xcatd
cmd:lsxcatd -a
check:rc==0
check:output=~Version

View File

@ -32,6 +32,20 @@ check:rc==0
check:output=~Usage
end
start:makedhcp_n_linux
description:Create a new dhcp configuration file with a network statement for each network the dhcp daemon should listen on
os:Linux
cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then mv -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then mv -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi
cmd:makedhcp -n
check:rc==0
cmd:ls /etc/dhcp/dhcpd.conf || ls /etc/dhcpd.conf
check:rc==0
cmd:ps -e | grep dhcpd
check:rc==0
check:output=~dhcpd
cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then mv -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then mv -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi
end
start:makedhcp_a_linux
description:Define all nodes to the DHCP server. (Will only add nodes that can be reached, network-wise, by this DHCP server.) The dhcp daemon does not have to be restarted after this.
os:Linux

View File

@ -19,19 +19,6 @@ check:rc==0
check:output=~Version
end
start:makenetworks_d
os:AIX
cmd:makenetworks -d > /tmp/mynetworksstanzas
check:rc==0
cmd:echo "auto-testnetworks:\n objtype=network\n gateway=1.2.3.0\n mask=255.255.255.0\n net=1.2.3.1\n" >> /tmp/mynetworksstanzas
cmd:cat /tmp/mynetworksstanzas | chdef -z
check:rc==0
cmd:tabdump networks
check:output=~("auto-testnetworks","1.2.3.1","255.255.255.0",,"1.2.3.0",,,,,,,,,,,,)
cmd:chtab -d netname=auto-testnetworks networks
cmd:rm -f /tmp/mynetworksstanzas
end
start:makenetworks_d
os:Linux
cmd:makenetworks -d > /tmp/mynetworksstanzas

View File

@ -1,114 +0,0 @@
start:mkdsklsnode_h
os:AIX
cmd:mkdsklsnode -h
check:rc==0
check:output=~Usage
end
start:mkdsklsnode_i_f
os:AIX
cmd:mknimimage -r -t diskless -s $$SOURCE autotestdsklsimage
check:rc==0
cmd:mkdsklsnode -i autotestdsklsimage $$CN -f
check:rc==0
check:output=~Initializing NIM machine '$$CN'
check:output=~AIX/NIM diskless nodes were initialized
cmd:lsnim -l $$CN
check:rc==0
cmd:rmdsklsnode $$CN
cmd:nim -o remove autotestdsklsimage
cmd:nim -o remove autotestdsklsimage_lpp_source
cmd:nim -o remove autotestdsklsimage_shared_root
cmd:nim -o remove autotestdsklsimage_paging
cmd:chtab -d imagename=autotestdsklsimage osimage
cmd:rm -rf /install/nim/lpp_source/autotestdsklsimage_lpp_source
cmd:rm -rf /install/nim/paging/autotestdsklsimage_paging
cmd:rm -rf /install/nim/spot/autotestdsklsimage
cmd:rm -rf /install/nim/shared_root/autotestdsklsimage_shared_root
end
start:mkdsklsnode_i_f_V
os:AIX
cmd:mknimimage -r -t diskless -s $$SOURCE autotestdsklsimage
check:rc==0
cmd:mkdsklsnode -i autotestdsklsimage $$CN -f
check:rc==0
check:output=~$$MN: AIX/NIM diskless nodes were initialized
check:output=~Initializing NIM machine '$$CN'
check:output=~AIX/NIM diskless nodes were initialized
cmd:lsnim -l $$CN
check:rc==0
cmd:rmdsklsnode $$CN
cmd:nim -o remove autotestdsklsimage
cmd:nim -o remove autotestdsklsimage_lpp_source
cmd:nim -o remove autotestdsklsimage_shared_root
cmd:nim -o remove autotestdsklsimage_paging
cmd:chtab -d imagename=autotestdsklsimage osimage
cmd:rm -rf /install/nim/lpp_source/autotestdsklsimage_lpp_source
cmd:rm -rf /install/nim/paging/autotestdsklsimage_paging
cmd:rm -rf /install/nim/spot/autotestdsklsimage
cmd:rm -rf /install/nim/shared_root/autotestdsklsimage_shared_root
end
start:mkdsklsnode_n_i
os:AIX
cmd:mknimimage -r -t diskless -s $$SOURCE autotestdsklsimage
check:rc==0
cmd:mkdsklsnode -n -i autotestdsklsimage $$CN
check:rc==0
cmd:lsnim |grep $$CN|sed -e 's/_/ /g'|cut -d" " -f2 |grep ^autotestdsklsimage$
check:rc==0
cmd:rmdsklsnode -i autotestdsklsimage $$CN
cmd:nim -o remove autotestdsklsimage
cmd:nim -o remove autotestdsklsimage_lpp_source
cmd:nim -o remove autotestdsklsimage_shared_root
cmd:nim -o remove autotestdsklsimage_paging
cmd:chtab -d imagename=autotestdsklsimage osimage
cmd:rm -rf /install/nim/lpp_source/autotestdsklsimage_lpp_source
cmd:rm -rf /install/nim/paging/autotestdsklsimage_paging
cmd:rm -rf /install/nim/spot/autotestdsklsimage
cmd:rm -rf /install/nim/shared_root/autotestdsklsimage_shared_root
end
start:mkdsklsnode_node
os:AIX
cmd:mknimimage -r -t diskless -s $$SOURCE autotestdsklsimage
check:rc==0
cmd:mkdsklsnode $$CN
check:rc==0
check:output=~Initializing NIM machine '$$CN'
cmd:lsnim -l $$CN
check:rc==0
cmd:rmdsklsnode $$CN
cmd:nim -o remove autotestdsklsimage
cmd:nim -o remove autotestdsklsimage_lpp_source
cmd:nim -o remove autotestdsklsimage_shared_root
cmd:nim -o remove autotestdsklsimage_paging
cmd:chtab -d imagename=autotestdsklsimage osimage
cmd:rm -rf /install/nim/lpp_source/autotestdsklsimage_lpp_source
cmd:rm -rf /install/nim/paging/autotestdsklsimage_paging
cmd:rm -rf /install/nim/shared_root/autotestdsklsimage_shared_root
cmd:rm -rf /install/nim/spot/autotestdsklsimage
end
start:mkdsklsnode_i_psize_sparse_paging
os:AIX
cmd:mknimimage -r -t diskless -s $$SOURCE autotestdsklsimage
check:rc==0
cmd:mkdsklsnode -i autotestdsklsimage $$CN psize=128 sparse_paging=yes
check:rc==0
cmd:lsnim -l $$CN
check:rc==0
cmd:rmdsklsnode $$CN
cmd:nim -o remove autotestdsklsimage
cmd:nim -o remove autotestdsklsimage_lpp_source
cmd:nim -o remove autotestdsklsimage_shared_root
cmd:nim -o remove autotestdsklsimage_paging
cmd:chtab -d imagename=autotestdsklsimage osimage
cmd:rm -rf /install/nim/lpp_source/autotestdsklsimage_lpp_source
cmd:rm -rf /install/nim/paging/autotestdsklsimage_paging
cmd:rm -rf /install/nim/spot/autotestdsklsimage
cmd:rm -rf /install/nim/shared_root/autotestdsklsimage_shared_root
end

View File

@ -1,113 +0,0 @@
start:mknimimage_h
description:mknimimage -h and --help
os:AIX
cmd:mknimimage -h
check:output=~Usage|usage
cmd:mknimimage --help
check:output=~Usage|usage
end
start:mknimimage_s
description:mknimimage -s source imagename
os:AIX
cmd:mknimimage -s $$SOURCE testimage
check:rc==0
check:output=~lpp_source=testimage_lpp_source
check:output=~bosinst_data=testimage_bosinst_data
check:output=~testimage
cmd:lsnim |grep testimage
check:rc==0
check:output=~testimage
check:output=~testimage_lpp_source
check:output=~testimage_bosinst_data
cmd:nim -o remove testimage
cmd:nim -o remove testimage_lpp_source
cmd:nim -o remove testimage_bosinst_data
cmd:chtab -d imagename=testimage osimage
cmd:rm -rf /install/nim/lpp_source/testimage_lpp_source
cmd:rm -rf /install/nim/bosinst_data/testimage_bosinst_data
cmd:rm -rf /install/nim/spot/testimage
end
start:mknimimage_s_iamgename_attr
description:mknimimage -s source imagename attr=val
os:AIX
cmd:mknimimage -s $$SOURCE testimage installp_bundle=mybndlres
check:rc==0
check:output=~installp_bundle=mybndlres
check:output=~lpp_source=testimage_lpp_source
check:output=~bosinst_data=testimage_bosinst_data
check:output=~testimage
cmd:lsnim |grep testimage
check:rc==0
check:output=~testimage
check:output=~testimage_lpp_source
check:output=~testimage_bosinst_data
cmd:nim -o remove testimage
cmd:nim -o remove testimage_lpp_source
cmd:nim -o remove testimage_bosinst_data
cmd:chtab -d imagename=testimage osimage
cmd:rm -rf /install/nim/lpp_source/testimage_lpp_source
cmd:rm -rf /install/nim/bosinst_data/testimage_bosinst_data
cmd:rm -rf /install/nim/spot/testimage
end
start:mknimimage_t_s
description:mknimimage -t diskless -s source imagename
os:AIX
cmd:mknimimage -t diskless -s $$SOURCE testimage
check:rc==0
check:output=~lpp_source=testimage_lpp_source
check:ouput=~nimtype=diskless
check:output=~testimage
cmd:lsnim |grep testimage
check:rc==0
check:output=~testimage
check:output=~testimage_lpp_source
cmd:nim -o remove testimage
cmd:nim -o remove testimage_lpp_source
cmd:nim -o remove testimage_bosinst_data
cmd:nim -o remove testimage_paging
cmd:chtab -d imagename=testimage osimage
cmd:rm -rf /install/nim/lpp_source/testimage_lpp_source
cmd:rm -rf /install/nim/paging/testimage_paging
cmd:rm -rf /install/nim/spot/testimage
end
start:mknimimage_t_i
description:mknimimage -t diskless -i imagename imagename
os:AIX
cmd:mknimimage -s $$SOURCE testimage
check:rc==0
check:output=~lpp_source=testimage_lpp_source
check:output=~bosinst_data=testimage_bosinst_data
check:output=~testimage
cmd:mknimimage -t diskless -i testimage testimage_updt
check:rc==0
check:output=~spot=testimage_updt
check:output=~root=testimage_updt_root
check:output=~testimage_updt
cmd:lsnim |grep testimage_updt
ckeck:rc==0
check:output=~testimage_updt
check:output=~testimage_updt_root
cmd:nim -o remove testimage
cmd:nim -o remove testimage_lpp_source
cmd:nim -o remove testimage_bosinst_data
cmd:nim -o remove testimage_updt
cmd:nim -o remove testimage_root
cmd:nim -o remove testimage_updt_root
cmd:chtab -d imagename=testimage osimage
cmd:chtab -d imagename=testimage_updt osimage
cmd:rm -rf /install/nim/lpp_source/testimage_lpp_source
cmd:rm -rf /install/nim/paging/testimage_paging
cmd:rm -rf /install/nim/spot/testimage
cmd:rm -rf /install/nim/lpp_source/testimage_updt_lpp_source
cmd:rm -rf /install/nim/paging/testimage_updt_paging
cmd:rm -rf /install/nim/spot/testimage_updt
cmd:rm -rf /install/nim/bosinst_data/testimage_bosinst_data
end

View File

@ -1,405 +0,0 @@
start:query_8233-E8B_reset
description:Reset the value of power saving and capping to a default one
type:8233-E8B-E8B
cmd:renergy $$CN savingstatus=off
check:rc==0
check:output=~Set savingstatus succeeded
cmd:renergy $$CN dsavingstatus=off
check:rc==0
check:output=~Set dsavingstatus succeeded
cmd:renergy $$CN cappingstatus=off
check:rc==0
check:output=~Set cappingstatus succeeded
cmd:renergy $$CN cappingwatt=2000
check:rc==0
end
start:query_8233-E8B_all
description:query all the attributes of the node
type:8233-E8B
cmd:renergy $$CN all
check:rc==0
check:output=~savingstatus: off
check:output=~cappingstatus: off
check:output=~dsavingstatus: off
check:output=~cappingmin: 1716
check:output=~cappingmax: 2121
check:output=~cappingvalue: 2000
check:output=~cappingsoftmin: 304
check:output=~averageAC: na
check:output~~averageDC: 681
check:output~~ambienttemp: 22
check:output~~ exhausttemp: 38
check:output~~CPUspeed: 3556
check:output=~syssbpower: na
check:output~~sysIPLtime: 900
end
start:query_8233-E8B_savingstatus
description:
type:8233-E8B
cmd:renergy $$CN savingstatus
check:rc==0
check:output=~savingstatus: off
check:output!~dsavingstatus
check:output!~cappingstatus
end
start:query_8233-E8B_dsavingstatus
description:
type:8233-E8B
cmd:renergy $$CN dsavingstatus
check:rc==0
check:output=~dsavingstatus: off
check:output!~: savingstatus
check:output!~cappingstatus
end
start:query_8233-E8B_cappingstatus
description:
type:8233-E8B
cmd:renergy $$CN cappingstatus
check:rc==0
check:output=~cappingstatus: off
check:output!~dsavingstatus
check:output!~savingstatus
end
start:query_8233-E8B_cappingmaxmin
description:
type:8233-E8B
cmd:renergy $$CN cappingmaxmin
check:rc==0
check:output=~cappingmin: 1716
check:output=~cappingmax: 2121
check:output!~cappingvalue
check:output!~cappingsoftmin
end
start:query_8233-E8B_cappingvalue
description:
type:8233-E8B
cmd:renergy $$CN cappingvalue
check:rc==0
check:output=~cappingvalue: 2000
check:output!~cappingmin
check:output!~cappingmax
check:output!~cappingsoftmin
end
start:query_8233-E8B_cappingsoftmin
description:
type:8233-E8B
cmd:renergy $$CN cappingsoftmin
check:rc==0
check:output=~cappingsoftmin: 304
check:output!~cappingmin
check:output!~cappingmax
check:output!~cappingvalue
end
start:query_8233-E8B_averageAC
description:
type:8233-E8B
cmd:renergy $$CN averageAC
check:rc==0
check:output=~averageAC: na
check:output!~averageDC
check:output!~ambienttemp
check:output!~exhausttemp
check:output!~CPUspeed
end
start:query_8233-E8B_averageDC
description:
type:8233-E8B
cmd:renergy $$CN averageDC
check:rc==0
check:output~~averageDC: 620
check:output!~averageAC
check:output!~ambienttemp
check:output!~exhausttemp
check:output!~CPUspeed
end
start:query_8233-E8B_ambienttemp
description:
type:8233-E8B
cmd:renergy $$CN ambienttemp
check:rc==0
check:output~~ambienttemp: 22
check:output!~averageAC
check:output!~averageDC
check:output!~exhausttemp
check:output!~CPUspeed
end
start:query_8233-E8B_exhausttemp
description:
type:8233-E8B
cmd:renergy $$CN exhausttemp
check:rc==0
check:output~~exhausttemp: 38
check:output!~averageAC
check:output!~ambienttemp
check:output!~averageDC
check:output!~CPUspeed
end
start:query_8233-E8B_CPUspeed
description:
type:8233-E8B
cmd:renergy $$CN CPUspeed
check:rc==0
check:output~~CPUspeed: 3556
check:output!~averageAC
check:output!~ambienttemp
check:output!~exhausttemp
check:output!~averageDC
end
start:query_8233-E8B_syssbpower
description:
type:8233-E8B
cmd:renergy $$CN syssbpower
check:rc==0
check:output=~syssbpower: na
check:output!~averageAC
check:output!~ambienttemp
check:output!~exhausttemp
check:output!~averageDC
check:output!~sysIPLtime
end
start:query_8233-E8B_sysIPLtime
description:
type:8233-E8B
cmd:renergy $$CN sysIPLtime
check:rc==0
check:output=~sysIPLtime: 900
check:output!~averageAC
check:output!~ambienttemp
check:output!~exhausttemp
check:output!~averageDC
check:output!~syssbpower
end
start:set_8233-E8B_savingstatus
description:
type:8233-E8B
cmd:renergy $$CN savingstatus=on
check:rc==0
check:output=~Set savingstatus succeeded
check:output=~This setting may need several minutes to take effect.
check:output!~Set savingstatus failed.
cmd:sleep 60
cmd:renergy $$CN savingstatus
check:rc==0
check:output=~savingstatus: on
cmd:renergy $$CN CPUspeed
check:rc==0
check:output~~CPUspeed: 2492
cmd:renergy $$CN savingstatus=onxx
check:rc!=0
check:output=~Usage:
cmd:renergy $$CN dsavingstatus=on-norm
check:rc!=0
check:output=~Cannot enable static and dynamic power
check:output=~Set dsavingstatus failed.
cmd:renergy $$CN savingstatus=off
check:rc==0
check:output=~Set savingstatus succeeded.
check:output=~This setting may need several minutes to take effect.
check:output!~Set savingstatus failed.
cmd:sleep 60
cmd:renergy $$CN savingstatus
check:rc==0
check:output=~savingstatus: off
cmd:renergy $$CN CPUspeed
check:rc==0
check:output~~CPUspeed: 3556
end
start:set_8233-E8B_dsavingstatus
description:
type:8233-E8B
cmd:renergy $$CN dsavingstatus=on
check:rc!=0
check:output=~ Usage:
cmd:renergy $$CN dsavingstatus=on-norm
check:rc==0
check:output=~Set dsavingstatus succeeded.
check:output=~This setting may need several minutes to take effect.
check:output!~Set dsavingstatus failed.
cmd:sleep 60
cmd:renergy $$CN dsavingstatus
check:rc==0
check:output=~dsavingstatus: on-norm
cmd:renergy $$CN CPUspeed
check:rc==0
check:output~~CPUspeed: 1652
cmd:renergy $$CN savingstatus=on
check:rc!=0
check:output=~Cannot enable static and dynamic power
check:output=~Set savingstatus failed.
cmd:renergy $$CN dsavingstatus=onxx
check:rc!=0
check:output=~ Usage:
cmd:renergy $$CN dsavingstatus=on-maxp
check:rc==0
check:output=~Set dsavingstatus succeeded.
check:output=~This setting may need several minutes to take effect.
check:output!~Set dsavingstatus failed.
cmd:renergy $$CN dsavingstatus
check:rc==0
check:output=~dsavingstatus: on-maxp
cmd:renergy $$CN CPUspeed
check:rc==0
check:output~~CPUspeed: 3864
cmd:renergy $$CN dsavingstatus=off
check:rc==0
check:output=~Set dsavingstatus succeeded.
check:output=~This setting may need several minutes to take effect.
check:output!~Set dsavingstatus failed.
cmd:sleep 60
cmd:renergy $$CN dsavingstatus
check:rc==0
check:output=~dsavingstatus: off
cmd:renergy $$CN CPUspeed
check:rc==0
check:output~~CPUspeed: 3556
end
start:set_8233-E8B_cappingstatus
description:
type:8233-E8B
cmd:renergy $$CN cappingstatus=on
check:rc==0
check:output=~Set cappingstatus succeeded.
check:output=~This setting may need several minutes to take effect.
check:output!~Set cappingstatus failed.
cmd:sleep 60
cmd:renergy $$CN cappingstatus
check:rc==0
check:output=~cappingstatus: on
cmd:renergy $$CN cappingstatus=onxx
check:rc!=0
check:output=~Usage:
cmd:renergy $$CN cappingstatus=off
check:rc==0
check:output=~Set cappingstatus succeeded.
check:output=~This setting may need several minutes to take effect.
check:output!~Set cappingstatus failed.
cmd:sleep 60
cmd:renergy $$CN cappingstatus
check:rc==0
check:output=~cappingstatus: off
end
start:set_8233-E8B_cappingwatt
description:
type:8233-E8B
cmd:renergy $$CN cappingwatt=2050
check:rc==0
check:output=~Set cappingwatt succeeded.
check:output=~cappingvalue: 2050
check:output!~Set cappingwatt failed.
cmd:renergy $$CN cappingvalue
check:rc==0
check:output=~cappingvalue: 2050
cmd:renergy $$CN cappingwatt=100
check:rc!=0
check:output!~Set cappingwatt succeeded.
check:output=~Set cappingwatt failed.
check:output=~Invalid value for cappingwatt.
cmd:renergy $$CN cappingwatt=3000
check:rc!=0
check:output!~Set cappingwatt succeeded.
check:output=~Set cappingwatt failed.
check:output=~Invalid value for cappingwatt.
cmd:renergy $$CN cappingvalue
check:rc==0
check:output=~cappingvalue: 2050
cmd:renergy $$CN cappingwatt=2000
check:rc==0
check:output=~Set cappingwatt succeeded.
check:output=~cappingvalue: 2000
check:output!~Set cappingwatt failed.
cmd:renergy $$CN cappingvalue
check:rc==0
check:output=~cappingvalue: 2000
end
start:set_8233-E8B_cappingperc
description:
type:8233-E8B
cmd:renergy $$CN cappingperc=0
check:rc==0
check:output=~Set cappingperc succeeded.
check:output=~cappingvalue: 1716
check:output!~Set cappingperc failed.
cmd:renergy $$CN cappingperc=50
check:rc==0
check:output=~Set cappingperc succeeded.
check:output=~cappingvalue: 1918
check:output!~Set cappingperc failed.
cmd:renergy $$CN cappingperc=100
check:rc==0
check:output=~Set cappingperc succeeded.
check:output=~cappingvalue: 2121
check:output!~Set cappingperc failed.
cmd:renergy $$CN cappingperc=110
check:rc!=0
check:output!~Set cappingperc succeeded.
check:output=~Invalid value for cappingperc.
check:output=~Set cappingperc failed.
cmd:renergy $$CN cappingwatt=2000
check:rc==0
check:output=~Set cappingwatt succeeded.
check:output=~cappingvalue: 2000
check:output!~Set cappingwatt failed.
cmd:renergy $$CN cappingvalue
check:rc==0
check:output=~cappingvalue: 2000
end

View File

@ -1,534 +0,0 @@
start:query_9125-F2C_reset
description:Reset the value of power saving and capping to a default one
type:9125-F2C
cmd:renergy $$CN savingstatus=off
check:rc==0
check:output=~Set savingstatus succeeded
cmd:renergy $$CN dsavingstatus=off
check:rc==0
check:output=~Set dsavingstatus succeeded
cmd:renergy $$CN cappingstatus=off
check:rc==0
check:output=~Set cappingstatus succeeded
cmd:renergy $$CN fsavingstatus=off
check:rc==0
check:output=~Set fsavingstatus succeeded
cmd:renergy $$CN ffovalue=3000
check:rc==0
cmd:renergy $$CN cappingwatt=14555
check:rc==0
end
start:query_9125-F2C_all
description:query all the attributes of the node
type:9125-F2C
cmd:renergy $$CN all
check:rc==0
check:output=~savingstatus: off
check:output=~cappingstatus: off
check:output=~dsavingstatus: off
check:output=~cappingmin: 14505
check:output=~cappingmax: 14585
check:output=~cappingvalue: 14555
check:output=~cappingsoftmin: 5556
check:output=~averageAC: na
check:output~~averageDC: 6976
check:output~~ambienttemp: 24
check:output~~ exhausttemp: 24
check:output~~CPUspeed: 3836
check:output=~syssbpower: na
check:output~~sysIPLtime: 900
check:output=~fsavingstatus: off
check:output=~ffoMin: 2856 MHz
check:output=~ffoVmin: 2856 MHz
check:output=~ffoTurbo: 3836 MHz
check:output=~ffoNorm: 3836 MHz
check:output=~ffovalue: 3000 MHz
end
start:query_9125-F2C_savingstatus
description:
type:9125-F2C
cmd:renergy $$CN savingstatus
check:rc==0
check:output=~savingstatus: off
check:output!~dsavingstatus
check:output!~cappingstatus
end
start:query_9125-F2C_dsavingstatus
description:
type:9125-F2C
cmd:renergy $$CN dsavingstatus
check:rc==0
check:output=~dsavingstatus: off
check:output!~: savingstatus
check:output!~cappingstatus
end
start:query_9125-F2C_cappingstatus
description:
type:9125-F2C
cmd:renergy $$CN cappingstatus
check:rc==0
check:output=~cappingstatus: off
check:output!~dsavingstatus
check:output!~savingstatus
end
start:query_9125-F2C_cappingmaxmin
description:
type:9125-F2C
cmd:renergy $$CN cappingmaxmin
check:rc==0
check:output=~cappingmin: 14505
check:output=~cappingmax: 14585
check:output!~cappingvalue
check:output!~cappingsoftmin
end
start:query_9125-F2C_cappingvalue
description:
type:9125-F2C
cmd:renergy $$CN cappingvalue
check:rc==0
check:output=~cappingvalue: 14555
check:output!~cappingmin
check:output!~cappingmax
check:output!~cappingsoftmin
end
start:query_9125-F2C_cappingsoftmin
description:
type:9125-F2C
cmd:renergy $$CN cappingsoftmin
check:rc==0
check:output=~cappingsoftmin: 5556
check:output!~cappingmin
check:output!~cappingmax
check:output!~cappingvalue
end
start:query_9125-F2C_averageAC
description:
type:9125-F2C
cmd:renergy $$CN averageAC
check:rc==0
check:output=~averageAC: na
check:output!~averageDC
check:output!~ambienttemp
check:output!~exhausttemp
check:output!~CPUspeed
end
start:query_9125-F2C_averageDC
description:
type:9125-F2C
cmd:renergy $$CN averageDC
check:rc==0
check:output~~averageDC: 6976
check:output!~averageAC
check:output!~ambienttemp
check:output!~exhausttemp
check:output!~CPUspeed
end
start:query_9125-F2C_ambienttemp
description:
type:9125-F2C
cmd:renergy $$CN ambienttemp
check:rc==0
check:output~~ambienttemp: 24
check:output!~averageAC
check:output!~averageDC
check:output!~exhausttemp
check:output!~CPUspeed
end
start:query_9125-F2C_exhausttemp
description:
type:9125-F2C
cmd:renergy $$CN exhausttemp
check:rc==0
check:output~~exhausttemp: 24
check:output!~averageAC
check:output!~ambienttemp
check:output!~averageDC
check:output!~CPUspeed
end
start:query_9125-F2C_CPUspeed
description:
type:9125-F2C
cmd:renergy $$CN CPUspeed
check:rc==0
check:output~~CPUspeed: 3836
check:output!~averageAC
check:output!~ambienttemp
check:output!~exhausttemp
check:output!~averageDC
end
start:query_9125-F2C_syssbpower
description:
type:9125-F2C
cmd:renergy $$CN syssbpower
check:rc==0
check:output=~syssbpower: 20 W
check:output!~averageAC
check:output!~ambienttemp
check:output!~exhausttemp
check:output!~averageDC
check:output!~sysIPLtime
end
start:query_9125-F2C_sysIPLtime
description:
type:9125-F2C
cmd:renergy $$CN sysIPLtime
check:rc==0
check:output=~sysIPLtime: 900
check:output!~averageAC
check:output!~ambienttemp
check:output!~exhausttemp
check:output!~averageDC
check:output!~syssbpower
end
start:query_9125-F2C_fsavingstatus
description:
type:9125-F2C
cmd:renergy $$CN fsavingstatus
check:rc==0
check:output=~fsavingstatus: off
check:output!~dsavingstatus
check:output!~cappingstatus
end
start:query_9125-F2C_ffoMin
description:
type:9125-F2C
cmd:renergy $$CN ffoMin
check:rc==0
check:output=~ffoMin: 2856 MHz
check:output!~ffoVmin
check:output!~ffoTurbo
check:output!~ffoNorm
check:output!~ffovalue
end
start:query_9125-F2C_ffoVmin
description:
type:9125-F2C
cmd:renergy $$CN ffoVmin
check:rc==0
check:output=~ffoVmin: 2856 MHz
check:output!~ffomin
check:output!~ffoTurbo
check:output!~ffoNorm
check:output!~ffovalue
end
start:query_9125-F2C_ffoTurbo
description:
type:9125-F2C
cmd:renergy $$CN ffoTurbo
check:rc==0
check:output=~ffoTurbo: 3836 MHz
check:output!~ffomin
check:output!~ffoVmin
check:output!~ffoNorm
check:output!~ffovalue
end
start:query_9125-F2C_ffoNorm
description:
type:9125-F2C
cmd:renergy $$CN ffoNorm
check:rc==0
check:output=~ffoNorm: 3836 MHz
check:output!~ffomin
check:output!~ffoVmin
check:output!~ffoTurbo
check:output!~ffovalue
end
start:query_9125-F2C_ffovalue
description:
type:9125-F2C
cmd:renergy $$CN ffovalue
check:rc==0
check:output=~ffovalue: 3000 MHz
check:output!~ffomin
check:output!~ffoVmin
check:output!~ffoTurbo
check:output!~ffoNorm
end
start:set_9125-F2C_savingstatus
description:
type:9125-F2C
cmd:renergy $$CN savingstatus=on
check:rc==0
check:output=~Set savingstatus succeeded
check:output=~This setting may need several minutes to take effect.
check:output!~Set savingstatus failed.
cmd:sleep 60
cmd:renergy $$CN savingstatus
check:rc==0
check:output=~savingstatus: on
cmd:renergy $$CN CPUspeed
check:rc==0
check:output~~CPUspeed: 2856
cmd:renergy $$CN savingstatus=onxx
check:rc!=0
check:output=~Usage:
cmd:renergy $$CN dsavingstatus=on-norm
check:rc!=0
check:output=~Cannot enable static and dynamic power
check:output=~Set dsavingstatus failed.
cmd:renergy $$CN savingstatus=off
check:rc==0
check:output=~Set savingstatus succeeded.
check:output=~This setting may need several minutes to take effect.
check:output!~Set savingstatus failed.
cmd:sleep 60
cmd:renergy $$CN savingstatus
check:rc==0
check:output=~savingstatus: off
cmd:renergy $$CN CPUspeed
check:rc==0
check:output~~CPUspeed: 3836
end
start:set_9125-F2C_dsavingstatus
description:
type:9125-F2C
cmd:renergy $$CN dsavingstatus=on
check:rc!=0
check:output=~ Usage:
cmd:renergy $$CN dsavingstatus=on-norm
check:rc==0
check:output=~Set dsavingstatus succeeded.
check:output=~This setting may need several minutes to take effect.
check:output!~Set dsavingstatus failed.
cmd:sleep 60
cmd:renergy $$CN dsavingstatus
check:rc==0
check:output=~dsavingstatus: on-norm
cmd:renergy $$CN CPUspeed
check:rc==0
check:output~~CPUspeed: 3836
cmd:renergy $$CN savingstatus=on
check:rc!=0
check:output=~Cannot enable static and dynamic power
check:output=~Set savingstatus failed.
cmd:renergy $$CN dsavingstatus=onxx
check:rc!=0
check:output=~ Usage:
cmd:renergy $$CN dsavingstatus=on-maxp
check:rc==0
check:output=~Set dsavingstatus succeeded.
check:output=~This setting may need several minutes to take effect.
check:output!~Set dsavingstatus failed.
cmd:renergy $$CN dsavingstatus
check:rc==0
check:output=~dsavingstatus: on-maxp
cmd:renergy $$CN CPUspeed
check:rc==0
check:output~~CPUspeed: 3836
cmd:renergy $$CN dsavingstatus=off
check:rc==0
check:output=~Set dsavingstatus succeeded.
check:output=~This setting may need several minutes to take effect.
check:output!~Set dsavingstatus failed.
cmd:sleep 60
cmd:renergy $$CN dsavingstatus
check:rc==0
check:output=~dsavingstatus: off
cmd:renergy $$CN CPUspeed
check:rc==0
check:output~~CPUspeed: 3836
end
start:set_9125-F2C_cappingstatus
description:
type:9125-F2C
cmd:renergy $$CN cappingstatus=on
check:rc==0
check:output=~Set cappingstatus succeeded.
check:output=~This setting may need several minutes to take effect.
check:output!~Set cappingstatus failed.
cmd:sleep 60
cmd:renergy $$CN cappingstatus
check:rc==0
check:output=~cappingstatus: on
cmd:renergy $$CN cappingstatus=onxx
check:rc!=0
check:output=~Usage:
cmd:renergy $$CN cappingstatus=off
check:rc==0
check:output=~Set cappingstatus succeeded.
check:output=~This setting may need several minutes to take effect.
check:output!~Set cappingstatus failed.
cmd:sleep 60
cmd:renergy $$CN cappingstatus
check:rc==0
check:output=~cappingstatus: off
end
start:set_9125-F2C_cappingwatt
description:
type:9125-F2C
cmd:renergy $$CN cappingwatt=14560
check:rc==0
check:output=~Set cappingwatt succeeded.
check:output=~cappingvalue: 14560
check:output!~Set cappingwatt failed.
cmd:renergy $$CN cappingvalue
check:rc==0
check:output=~cappingvalue: 14560
cmd:renergy $$CN cappingwatt=100
check:rc!=0
check:output!~Set cappingwatt succeeded.
check:output=~Set cappingwatt failed.
check:output=~Invalid value for cappingwatt.
cmd:renergy $$CN cappingwatt=15000
check:rc!=0
check:output!~Set cappingwatt succeeded.
check:output=~Set cappingwatt failed.
check:output=~Invalid value for cappingwatt.
cmd:renergy $$CN cappingvalue
check:rc==0
check:output=~cappingvalue: 14560
cmd:renergy $$CN cappingwatt=14555
check:rc==0
check:output=~Set cappingwatt succeeded.
check:output=~cappingvalue: 14555
check:output!~Set cappingwatt failed.
cmd:renergy $$CN cappingvalue
check:rc==0
check:output=~cappingvalue: 14555
end
start:set_9125-F2C_cappingperc
description:
type:9125-F2C
cmd:renergy $$CN cappingperc=0
check:rc==0
check:output=~Set cappingperc succeeded.
check:output=~cappingvalue: 14505
check:output!~Set cappingperc failed.
cmd:renergy $$CN cappingperc=50
check:rc==0
check:output=~Set cappingperc succeeded.
check:output=~cappingvalue: 14545
check:output!~Set cappingperc failed.
cmd:renergy $$CN cappingperc=100
check:rc==0
check:output=~Set cappingperc succeeded.
check:output=~cappingvalue: 14585
check:output!~Set cappingperc failed.
cmd:renergy $$CN cappingperc=110
check:rc!=0
check:output!~Set cappingperc succeeded.
check:output=~Invalid value for cappingperc.
check:output=~Set cappingperc failed.
cmd:renergy $$CN cappingwatt=14555
check:rc==0
check:output=~Set cappingwatt succeeded.
check:output=~cappingvalue: 14555
check:output!~Set cappingwatt failed.
cmd:renergy $$CN cappingvalue
check:rc==0
check:output=~cappingvalue: 14555
end
start:set_9125-F2C_fsavingstatus
description:
type:9125-F2C
cmd:renergy $$CN fsavingstatus=on
check:rc==0
check:output=~Set fsavingstatus succeeded.
check:output!~Set fsavingstatus failed.
cmd:renergy $$CN fsavingstatus
check:rc==0
check:output=~fsavingstatus: on
cmd:renergy $$CN fsavingstatus=onxx
check:rc!=0
check:output=~ Usage:
cmd:renergy $$CN ffovalue=3100
check:rc==0
check:output=~Set ffovalue succeeded.
check:output=~This setting may need several minutes to take effect.
check:output!~Set ffovalue failed.
cmd:sleep 90
cmd:renergy $$CN CPUspeed
check:rc==0
check:output~~CPUspeed: 3100
cmd:renergy $$CN ffovalue=2000
check:rc!=0
check:output=~Set ffovalue failed.
check:output=~Invalid value for ffovalue
check:output!~Set ffovalue succeeded.
cmd:renergy $$CN fsavingstatus=off
check:rc==0
check:output=~Set fsavingstatus succeeded.
check:output!~Set fsavingstatus failed.
cmd:renergy $$CN fsavingstatus
check:rc==0
check:output=~fsavingstatus: off
end

View File

@ -1,32 +0,0 @@
start:restartxcatd_v
os:AIX
cmd:restartxcatd -v
check:rc==0
check:output=~Version
end
start:restartxcatd_h
os:AIX
cmd:restartxcatd -h
check:rc==0
cmd:restartxcatd --help
check:rc==0
end
start:restartxcatd
os:AIX
cmd:restartxcatd
check:rc==0
check:output=~The xcatd Subsystem was requested to stop
check:output=~The xcatd Subsystem has been started. Subsystem PID is \d+
end
start:restartxcatd_V
os:AIX
cmd:restartxcatd -V
check:output=~Stopped the xcatd subsystem
check:output=~The xcatd Subsystem has been started
check:output=~Running command on
check:output=~Started the xcatd subsystem
end

View File

@ -1,57 +0,0 @@
start:rmdsklsnode_h
os:AIX
cmd:rmdsklsnode -h
check:rc==0
check:output=~Usage
end
start:rmdsklsnode_node
os:AIX
cmd:mknimimage -r -t diskless -s $$SOURCE autotestdsklsimage
check:rc==0
cmd:mkdsklsnode -i autotestdsklsimage $$CN -f
check:rc==0
check:output=~Initializing NIM machine '$$CN'
check:output=~AIX/NIM diskless nodes were initialized
cmd:lsnim -l $$CN
check:rc==0
cmd:rmdsklsnode $$CN
check:rc==0
cmd:lsnim |grep $$CN
check:rc!=0
check:output!~$$CN
cmd:nim -o remove autotestdsklsimage
cmd:nim -o remove autotestdsklsimage_lpp_source
cmd:nim -o remove autotestdsklsimage_shared_root
cmd:nim -o remove autotestdsklsimage_paging
cmd:chtab -d imagename=autotestdsklsimage osimage
cmd:rm -rf /install/nim/lpp_source/autotestdsklsimage_lpp_source
cmd:rm -rf /install/nim/paging/autotestdsklsimage_paging
cmd:rm -rf /install/nim/spot/autotestdsklsimage
cmd:rm -rf /install/nim/shared_root/autotestdsklsimage_shared_root
end
start:rmdsklsnode_i
os:AIX
cmd:mknimimage -r -t diskless -s $$SOURCE autotestdsklsimage
check:rc==0
cmd:mkdsklsnode -n -i autotestdsklsimage $$CN
check:rc==0
cmd:lsnim |grep $$CN|sed -e 's/_/ /g'|cut -d" " -f2 |grep ^autotestdsklsimage$
check:rc==0
cmd:rmdsklsnode -i autotestdsklsimage $$CN -V
check:rc==0
cmd:lsnim |grep $$CN|sed -e 's/_/ /g'|cut -d" " -f2 |grep ^autotestdsklsimage$
check:rc!=0
cmd:nim -o remove autotestdsklsimage
cmd:nim -o remove autotestdsklsimage_lpp_source
cmd:nim -o remove autotestdsklsimage_shared_root
cmd:nim -o remove autotestdsklsimage_paging
cmd:chtab -d imagename=autotestdsklsimage osimage
cmd:rm -rf /install/nim/lpp_source/autotestdsklsimage_lpp_source
cmd:rm -rf /install/nim/paging/autotestdsklsimage_paging
cmd:rm -rf /install/nim/spot/autotestdsklsimage
cmd:rm -rf /install/nim/shared_root/autotestdsklsimage_shared_root
end

View File

@ -1,59 +0,0 @@
start:rmnimimage_imagename
description:rmnimimage testimage
os:AIX
cmd:mknimimage -s $$SOURCE testimage
check:rc==0
check:output=~lpp_source=testimage_lpp_source
check:output=~bosinst_data=testimage_bosinst_data
check:output=~testimage
cmd:rmnimimage testimage
check:rc==0
cmd:lsnim
check:output!~testimage_bosinst_data
check:output=~testimage_lpp_source
cmd:rmdef -t osimage -o testimage
end
start:rmnimimage_d_imagename
description:rmnimimage -d imagename
os:AIX
cmd:mknimimage -s $$SOURCE testimage
check:rc==0
check:output=~lpp_source=testimage_lpp_source
check:output=~bosinst_data=testimage_bosinst_data
check:output=~testimage
cmd:rmnimimage -d testimage
check:rc==0
cmd:lsnim
check:output!~testimage
cmd:tabdump osimage
check:output=~testimage
cmd:rmdef -t osimage -o testimage
end
start:rmnimimage_x_imagename
os:AIX
cmd:mknimimage -s $$SOURCE testimage
check:rc==0
check:output=~lpp_source=testimage_lpp_source
check:output=~bosinst_data=testimage_bosinst_data
check:output=~testimage
cmd:rmnimimage testimage
check:rc==0
cmd:tabdump osimage
check:output=~testimage
cmd:rmnimimage -x testimage
ckeck:rc==0
cmd:tabdump osimage
ckeck:output!~testimage
end
start:rmnimimage_h
description:rmnimimage -h and --help
os:AIX
cmd:rmnimimage -h
check:output=~usage|Usage
cmd:rmnimimage --help
check:output=~usage|Usage
end

View File

@ -1255,3 +1255,34 @@ cmd:file="/opt/xcat/share/xcat/install/rh/template"; rm -rf $file; if [ -d ${fil
cmd:for file in /tmp/osimages/*.stanza; do cat $file|mkdef -z; done
cmd:if [ -e /tmp/osimages.bak ]; then mv -f /tmp/osimages.bak /tmp/osimages; fi
end
start:export_import_osimages_by_dir_with_c
description:This case is used to test xcat-inventory export and import linux osimage definition witch -c option.
label:others,xcat_inventory
cmd:dir="/tmp/export";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi; mkdir -p $dir
cmd:imgdir='/tmp/export';for img in $(lsdef -t osimage -s|awk -F' ' '{print $1}'); do lsdef -t osimage -o $img -z > $imgdir/${img}.stanza;done
check:rc==0
cmd:for img in $(lsdef -t osimage -s|awk -F' ' '{print $1}');do rmdef -t osimage -o $img;done
check:rc==0
cmd:chdef -t osimage -o test_myimage1,test_myimage2,test_myimage3 imagetype=linux provmethod=install
check:rc==0
cmd:xcat-inventory export -t osimage -o test_myimage1,test_myimage2 -d /tmp/export
check:rc==0
check:output=~The osimage objects has been exported to directory /tmp/export
cmd:ls -lFR /tmp/export
cmd: xcat-inventory import -t osimage -d /tmp/export -c
check:rc==0
check:output=~Importing object: test_myimage1
check:output=~Inventory import successfully!
check:output=~The object test_myimage1 has been imported
check:output=~Importing object: test_myimage2
check:output=~Inventory import successfully!
check:output=~The object test_myimage2 has been imported
cmd:lsdef -t osimage -o test_myimage1,test_myimage2
check:rc==0
cmd:lsdef -t osimage -o test_myimage3
check:rc!=0
cmd:rmdef -t osimage -o test_myimage1,test_myimage2
cmd:for file in /tmp/export/*.stanza; do cat $file|mkdef -z; done
cmd:dir="/tmp/export"; rm -rf $dir; if [ -d ${dir}".bak" ];then mv ${dir}".bak" $dir; fi
end

View File

@ -1,48 +0,0 @@
start:xcat2nim_h
description:xcat2nim -h and --help
os:AIX
cmd:xcat2nim -h
check:output=~usage|Usage
cmd:xcat2nim --help
check:output=~usage|Usage
end
start:xcat2nim_t_f_o_V_att
description:xcat2nim -f -t node -o CN -V att=
os:AIX
cmd:xcat2nim -t node -f -o $$CN -V netboot_kernel=mp
check:rc==0
cmd:lsnim -l $$CN
check:output=~netboot_kernel = mp
cmd:xcat2nim -t node -f -o $$CN -V
end
start:xcat2nim_l
description:xcat2nim -l CN
os:AIX
cmd:xcat2nim -l $$CN
check:rc==0
check:output=~$$CN:
end
start:xcat2nim_r
description:xcat2nim -r CN
os:AIX
cmd:xcat2nim -r $$CN
check:rc==0
cmd:lsnim
check:output!~$$CN
cmd:xcat2nim -t node -o $$CN
end
start:xcat2nim_u
description:xcat2nim -u CN
os:AIX
cmd:lsnim
check:output=~$$CN
cmd:xcat2nim -u $$CN
check:rc==0
end

View File

@ -1,11 +1,12 @@
start:testtest
label:mn_only,db
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcatconfig/change_site_table_values
check:rc==0
end
start:xcatconfig_null
description:xcatconfig with no argument
os:Linux
label:mn_only
cmd:xcatconfig
check:output=~No parameters were supplied on the xcatconfig command. Run xcatconfig -h
check:rc!=0
@ -13,7 +14,7 @@ end
start:xcatconfig_h
description:xcatconfig -h and --help
os:Linux
label:mn_only
cmd:xcatconfig -h
check:rc==0
check:output=~Usage
@ -24,7 +25,7 @@ end
start:xcatconfig_v
description:xcatconfig -v and --version
os:Linux
label:mn_only
cmd:xcatconfig -v
check:rc==0
check:output=~version|Version
@ -35,7 +36,7 @@ end
start:xcatconfig_k
description:To regenerate root's ssh keys
os:Linux
label:mn_only
#step1:backup /root/.ssh
cmd:cp -rf /root/.ssh /root/sshbak
check:rc==0
@ -56,13 +57,12 @@ cmd:mv -f /root/sshbak/* /root/.ssh
check:rc==0
cmd:rm -rf /root/sshbak
check:rc==0
end
start:xcatconfig_k_c
description:To regenerate root's ssh keys and cretials
os:Linux
label:mn_only
#step1:backup /root/.ssh
cmd:cp -rf /root/.ssh /root/sshbak
check:rc==0
@ -93,7 +93,7 @@ end
start:xcatconfig_c
description:To regenerate cretials
os:Linux
label:mn_only
#step1:backup: /etc/xcat/ca /etc/xcat/cert
cmd:cp -r /etc/xcat/ca /etc/xcat/cabak;cp -r /etc/xcat/cert /etc/xcat/certbak
#step2:run command and check the output
@ -117,7 +117,7 @@ end
start:xcatconfig_s
description:To regenerate node host ssh keys
os:Linux
label:mn_only
#step1:backup: /etc/xcat/hostkeys /install/postscripts/hostkeys
cmd:cp -rf /etc/xcat/hostkeys /etc/xcat/hostkeysbak
check:rc==0
@ -147,7 +147,7 @@ end
start:xcatconfig_s_c
description:To regenerate node host ssh keys and credentials
os:Linux
label:mn_only
#step1:backup: /etc/xcat/hostkeys /install/postscripts/hostkeys
cmd:cp -rf /etc/xcat/hostkeys /etc/xcat/hostkeysbak
check:rc==0
@ -181,7 +181,7 @@ end
start:xcatconfig_d_V
description:This -d option will reinitialize the basic xCAT database table setup
os:Linux
label:mn_only
#step1:backup database and prepare test data
cmd:dumpxCATdb -p /tmp/xcatconfigtest
check:rc==0
@ -210,8 +210,8 @@ end
start:xcatconfig_i
os:Linux
description:Initial the xCAT installation in Management Node, only node host key regenerated, xcatd restart; xCAT credentials, database and the ssh key are not changed
label:mn_only
#step1:backup test environment and prepare test data
#backup test environment, including database, /root/.ssh/, /etc/xcat/hostkey/, install/postscripts/hostkeys
cmd:dumpxCATdb -p /tmp/xcatconfigtest
@ -265,8 +265,8 @@ end
start:xcatconfig_u
os:Linux
description:Update xCAT in Management Node, xcatd restart; database, xCAT credentials, node ssh key and root ssh key are not changed
label:mn_only
#step1:backup test environment and prepare test data
#backup test environment, including database, /root/.ssh/, /etc/xcat/hostkey/, install/postscripts/hostkeys
cmd:dumpxCATdb -p /tmp/xcatconfigtest
@ -317,8 +317,9 @@ check:rc==0
end
start:xcatconfig_u_check_xcatsslversion_rhels_sles
os:rhels,sles
description:after xcatconfig -u the site.xcatsslversion will not be changed
os:rhels,sles
label:mn_only
cmd:lsdef -t site -i xcatsslversion -c | grep '=TLSv1$'
check:rc==0
cmd:chtab key=xcatsslversion site.value=TLSv12
@ -337,6 +338,7 @@ end
start:xcatconfig_u_check_xcatsslversion_ubuntu
description:after xcatconfig -u the site.xcatsslversion will not be changed
os:ubuntu
label:mn_only
cmd:lsdef -t site -i xcatsslversion -c | grep '=TLSv1$'
check:rc==0
cmd:chtab key=xcatsslversion site.value=TLSv1_2

View File

@ -1,10 +1,11 @@
start:xcatd_start
description:stop then start xcatd daemon, and check all the 6 processes are running
os:linux
label:mn_only,xcatd
cmd:if [ -d "/tmp/xcatd_start" ]; then mv /tmp/xcatd_start /tmp/xcatd_start.org; fi; mkdir -p /tmp/xcatd_start
check:rc==0
cmd:service xcatd status
check:rc==0
check:output=~xcatd service|xcatd.service
check:output=~Active: active \(running\)|xcatd service is running
cmd:ps axjf |grep -v grep |grep "xcatd:" | tee /tmp/xcatd_start/original_xcatd_processes_status
check:rc==0
@ -22,6 +23,7 @@ check:rc==0
cmd:sleep 3
cmd:service xcatd status
check:rc==0
check:output=~xcatd service|xcatd.service
check:output=~Active: active \(running\)|xcatd service is running
cmd:ps axjf |grep -v grep |grep "xcatd:" | tee /tmp/xcatd_start/after_start_xcatd_processes_status
check:rc==0
@ -43,61 +45,22 @@ cmd: rm -rf /tmp/xcatd_start; if [ -d "/tmp/xcatd_start.org" ]; then mv /tmp/xca
check:rc==0
end
start:xcatd_start_systemd
description:this is the test case when xcat service is managed by systemd on sles12* and ubuntu16.04, the output of service xcatd changes,stop then start xcatd daemon, and check all the 6 processes are running
os:linux
cmd:service xcatd status
check:rc==0
check:output=~xcatd.service
check:output=~active \(running\)
check:output=~/system.slice/xcatd.service
check:output=~xcatd: SSL
check:output=~xcatd: DB
check:output=~xcatd: UDP
check:output=~xcatd: install
check:output=~xcatd: Discovery
check:output=~xcatd: Command log
cmd:service xcatd stop
check:rc==0
cmd:sleep 3
cmd:service xcatd status
check:rc!=0
check:output=~xcatd.service
check:output=~inactive \(dead\)
cmd:service xcatd start
check:rc==0
cmd:service xcatd status
check:rc==0
check:output=~xcatd.service
check:output=~active \(running\)
cmd:result=`ps -ef | grep "xcatd: SSL listener" | grep -v grep | wc -l`; if [ $result -eq 1 ]; then echo "only one process"; fi
check:output=~only one process
cmd:result=`ps -ef | grep "xcatd: DB Access" | grep -v grep | wc -l`; if [ $result -eq 1 ]; then echo "only one process"; fi
check:output=~only one process
cmd:result=`ps -ef | grep "xcatd: UDP listener" | grep -v grep | wc -l`; if [ $result -eq 1 ]; then echo "only one process"; fi
check:output=~only one process
cmd:result=`ps -ef | grep "xcatd: install monitor" | grep -v grep | wc -l`; if [ $result -eq 1 ]; then echo "only one process"; fi
check:output=~only one process
cmd:result=`ps -ef | grep "xcatd: Discovery worke" | grep -v grep | wc -l`; if [ $result -eq 1 ]; then echo "only one process"; fi
check:output=~only one process
cmd:result=`ps -ef | grep "xcatd: Command log writer" | grep -v grep | wc -l`; if [ $result -eq 1 ]; then echo "only one process"; fi
check:output=~only one process
end
start:xcatd_stop
description:stop xcatd daemon, then check all the 6 processes are stopped
os:linux
label:mn_only,xcatd
cmd:service xcatd status
check:rc==0
check:output=~xcatd service is running
check:output=~xcatd service|xcatd.service
check:output=~xcatd service is running|active \(running\)
cmd:service xcatd stop
check:rc==0
check:output=~Stopping x(cat|CAT)d
check:output=~[ OK ]
cmd:sleep 3
cmd:service xcatd status
check:output=~xcatd service is not running
check:output=~xcatd service|xcatd.service
check:output=~xcatd service is not running|inactive \(dead\)
cmd:ps -ef | grep xcatd
check:output!~"xcatd: SSL listener"
check:output!~"xcatd: DB Access"
@ -109,111 +72,39 @@ cmd:service xcatd start
check:rc==0
end
start:xcatd_stop_systemd
description:this is the test case when xcat service is managed by systemd on sles12* and ubuntu16.04, the output of service xcatd changes,stop xcatd daemon, then check all the 6 processes are stopped
os:linux
cmd:service xcatd status
check:rc==0
check:output=~xcatd.service
check:output=~active \(running\)
check:output=~/system.slice/xcatd.service
check:output=~xcatd: SSL
check:output=~xcatd: DB
check:output=~xcatd: UDP
check:output=~xcatd: install
check:output=~xcatd: Discovery
check:output=~xcatd: Command log
cmd:service xcatd stop
check:rc==0
cmd:sleep 3
cmd:service xcatd status
check:rc!=0
check:output=~xcatd.service
check:output=~inactive \(dead\)
cmd:ps -ef | grep xcatd
check:output!~"xcatd: SSL"
check:output!~"xcatd: DB"
check:output!~"xcatd: UDP"
check:output!~"xcatd: install"
check:output!~"xcatd: Discovery"
check:output!~"xcatd: Command log"
cmd:service xcatd start
check:rc==0
end
start:xcatd_restart
description:restart xcatd daemon
os:linux
label:mn_only,xcatd
cmd:service xcatd status
check:output=~xcatd service is running
check:output=~xcatd service|xcatd.service
check:output=~xcatd service is running|active \(running\)
check:rc==0
cmd:times=10; while [ $times -gt 0 ]; do service xcatd restart; if [ "$?" -ne "0" ]; then break; fi; ((times--)); done; if [ $times -gt 0 ]; then $?=1; fi
check:rc==0
cmd:service xcatd status
check:output=~xcatd service is running
check:output=~xcatd service|xcatd.service
check:output=~xcatd service is running|active \(running\)
check:rc==0
end
start:xcatd_restart_systemd
description:this is the test case when xcat service is managed by systemd on sles12* and ubuntu16.04, the output of service xcatd changes,restart xcatd daemon
os:linux
cmd:service xcatd status
check:rc==0
check:output=~xcatd.service
check:output=~active \(running\)
cmd:times=10; while [ $times -gt 0 ]; do service xcatd restart; if [ "$?" -ne "0" ]; then break; fi; ((times--)); done; if [ $times -gt 0 ]; then $?=1; fi
check:rc==0
cmd:service xcatd status
check:rc==0
check:output=~xcatd.service
check:output=~active \(running\)
end
start:run_command_with_XCATBYPASS
description:with XCATBYPASS=YES, the command works either xcatd deamon running or not
os:linux
label:mn_only,xcatd
cmd:service xcatd status
check:rc==0
check:output=~xcatd service is running
cmd:XCATBYPASS=YES tabdump site
check:rc==0
cmd:service xcatd stop
check:rc==0
check:output=~Stopping x(cat|CAT)d
check:output=~[ OK ]
cmd:sleep 3
cmd:service xcatd status
check:output=~xcatd service is not running
cmd:tabdump site
check:rc!=0
cmd:XCATBYPASS=YES tabdump site
check:rc==0
cmd:service xcatd start
check:rc==0
check:output=~Starting x(cat|CAT)d
check:output=~[ OK ]
cmd:service xcatd status
check:rc==0
check:output=~xcatd service is running
end
start:run_command_with_XCATBYPASS_systemd
description:wis is the test case when xcat service is managed by systemd,on sles12* and ubuntu16.04, the output of service xcatd changes,with XCATBYPASS=YES, the command works either xcatd deamon running or not
os:linux
cmd:service xcatd status
check:rc==0
check:output=~xcatd.service
check:output=~active \(running\)
check:output=~xcatd service|xcatd.service
check:output=~xcatd service is running|active \(running\)
cmd:XCATBYPASS=YES tabdump site
check:rc==0
cmd:service xcatd stop
check:rc==0
cmd:sleep 3
cmd:service xcatd status
eck:rc!=0
check:output=~xcatd.service
check:output=~inactive \(dead\)
check:output=~xcatd service|xcatd.service
check:output=~xcatd service is not running|inactive \(dead\)
cmd:tabdump site
check:rc!=0
cmd:XCATBYPASS=YES tabdump site
@ -222,23 +113,17 @@ cmd:service xcatd start
check:rc==0
cmd:service xcatd status
check:rc==0
check:output=~xcatd.service
check:output=~active \(running\)
check:output=~/system.slice/xcatd.service
check:output=~xcatd: SSL
check:output=~xcatd: DB
check:output=~xcatd: UDP
check:output=~xcatd: install
check:output=~xcatd: Discovery
check:output=~xcatd: Command log
check:output=~xcatd service|xcatd.service
check:output=~xcatd service is running|active \(running\)
end
start:disable_root_permission_in_policy_table
description:disable root permission, only with XCATBYPASS=YES, the command works
os:linux
label:mn_only,xcatd
cmd:service xcatd status
check:rc==0
check:output=~xcatd service is running
check:output=~ xcatd service|xcatd.service
check:output=~xcatd service is running|active \(running\)
cmd:chtab name=root policy.rule=disable
check:rc==0
cmd:lsdef
@ -251,31 +136,14 @@ cmd:lsdef
check:rc==0
end
start:disable_root_permission_in_policy_table_systemd
description:this is the test case when xcat service is managed by systemd on sles12* and ubuntu16.04, the output of service xcatd changes,disable root permission, only with XCATBYPASS=YES, the command works
os:linux
cmd:service xcatd status
check:rc==0
check:output=~xcatd.service
check:output=~active \(running\)
cmd:chtab name=root policy.rule=disable
check:rc==0
cmd:lsdef
check:output=~Error: (\[.*?\]: )?Permission denied for request
cmd:XCATBYPASS=YES lsdef
check:rc==0
cmd:XCATBYPASS=YES chtab name=root policy.rule=allow
check:rc==0
cmd:lsdef
check:rc==0
end
start:assign_certain_command_permission
description:assign root permission to certain command, only this command works
os:linux
label:mn_only,xcatd
cmd:service xcatd status
check:rc==0
check:output=~xcatd service is running
check:output=~ xcatd service |xcatd.service
check:output=~xcatd service is running|active \(running\)
cmd:lsdef
check:rc==0
cmd:tabdump policy
@ -290,24 +158,4 @@ cmd:chtab name=root policy.commands= policy.rule=allow
check:rc==0
end
start:assign_certain_command_permission_systemd
description:this is the test case when xcat service is managed by systemd on sles12* and ubuntu16.04, the output of service xcatd changes,assign root permission to certain command, only this command works
os:linux
cmd:service xcatd status
check:rc==0
check:output=~xcatd.service
check:output=~active \(running\)
cmd:lsdef
check:rc==0
cmd:tabdump policy
check:rc==0
cmd:chtab name=root policy.commands=lsdef policy.rule=allow
check:rc==0
cmd:lsdef
check:rc==0
cmd:tabdump policy
check:output=~Error: (\[.*?\]: )?Permission denied for request
cmd:chtab name=root policy.commands= policy.rule=allow
check:rc==0
end

View File

@ -1,5 +1,6 @@
start:xcatsnap_null
description:xcatsnap with no argument
label:mn_only
cmd:xcatsnap
check:rc==0
check:output=~Send .* to IBM Support
@ -8,6 +9,7 @@ end
start:xcatsnap_b_d
description:xcatsnap -B -d
label:mn_only
cmd:xcatsnap -B -d /tmp/testdir
check:rc==0
check:output=~Send .* to IBM Support
@ -18,6 +20,7 @@ end
start:xcatsnap_h
description:xcatsnap -h and --help
label:mn_only
cmd:xcatsnap -h
check:output=~Usage
cmd:xcatsnap --help
@ -27,6 +30,7 @@ end
start:xcatsnap_v
description:xcatsnap -v and --version
label:mn_only
cmd:xcatsnap -v
check:output=~version|Version
cmd:xcatsnap --version

View File

@ -1,7 +1,7 @@
#!/usr/bin/awk -f
BEGIN {
if ((ENVIRON["USEOPENSSLFORXCAT"]) || (ENVIRON["AIX"])) {
server = "openssl s_client -quiet -no_ssl3 -connect " ENVIRON["XCATSERVER"] " -rand /bin/nice 2> /dev/null"
server = "openssl s_client -quiet -no_ssl3 -no_ssl2 -connect " ENVIRON["XCATSERVER"] " -rand /bin/nice 2> /dev/null"
} else {
server = "/inet/tcp/0/127.0.0.1/400"
}

View File

@ -1,7 +1,7 @@
#!/usr/bin/awk -f
BEGIN {
if (ENVIRON["USEOPENSSLFORXCAT"]) {
server = "openssl s_client -no_ssl3 -connect " ENVIRON["XCATSERVER"] " -rand /bin/nice 2> /dev/null"
server = "openssl s_client -no_ssl3 -no_ssl2 -connect " ENVIRON["XCATSERVER"] " -rand /bin/nice 2> /dev/null"
} else {
server = "/inet/tcp/0/127.0.0.1/400"
}

View File

@ -42,7 +42,7 @@ while read LINE;do
RET=${RET%<*}
[ "$RET" != "0" ] && RETCODE=1
fi
done < <(openssl s_client -no_ssl3 -connect $MASTER_IP:$XCATDPORT -ign_eof -quiet <<<$REQUEST)
done < <(openssl s_client -no_ssl3 -no_ssl2 -connect $MASTER_IP:$XCATDPORT -ign_eof -quiet <<<$REQUEST)
rm -rf $RESPFILE
exit $RETCODE

View File

@ -1,7 +1,7 @@
#!/usr/bin/awk -f
BEGIN {
if (ENVIRON["USEOPENSSLFORXCAT"]) {
server = "openssl s_client -no_ssl3 -connect " ENVIRON["XCATSERVER"] " 2> /dev/null"
server = "openssl s_client -no_ssl3 -no_ssl2 -connect " ENVIRON["XCATSERVER"] " 2> /dev/null"
} else {
server = "/inet/tcp/0/127.0.0.1/400"
}

View File

@ -887,7 +887,7 @@ run_ps () {
fi
if [ -f \$1 ]; then
echo \"\`date\` Running \$scriptype: \$1\"
echo \"Running \$scriptype: \$1\"
msgutil_r \"\$MASTER_IP\" \"info\" "\"Running \$scriptype: \$1\"" \"\$logfile\" \"xcat.mypostscript\"
if [ \"\$XCATDEBUGMODE\" = \"1\" ] || [ \"\$XCATDEBUGMODE\" = \"2\" ]; then
local compt=\$(file \$1)