add testcase for SN installation,diskless/diskfull/statelite installation with SN on x86_64 redhat

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15557 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
amy0701 2013-03-18 07:49:38 +00:00
parent de9fbe4f82
commit eb3ccaa773
4 changed files with 265 additions and 0 deletions

View File

@ -0,0 +1,67 @@
start:linux_cn_with_sn_diskless_installation_flat_x86_64_redhat
os:Linux
cmd:makedns -n
check:rc==0
cmd:sleep 10
cmd:service named restart
check:rc==0
cmd:makeconservercf
check:rc==0
cmd:cat /etc/conserver.cf | grep $$CNWITHSN
check:output=~$$CNWITHSN
cmd:sleep 60
cmd:chdef $$CNWITHSN servicenode=$$SN xcatmaster=$$SN
check:rc==0
cmd:makedhcp -n
check:rc==0
cmd:makedhcp -a
check:rc==0
cmd:service dhcpd restart
check:rc==0
cmd:cat /var/lib/dhcpd/dhcpd.leases| grep $$CNWITHSN
check:output=~$$CNWITHSN
cmd:rm -rf /install/netboot/__GETNODEATTR($$CNWITHSN,os)__/x86_64/compute
check:rc==0
cmd:genimage __GETNODEATTR($$CNWITHSN,os)__-__GETNODEATTR($$CNWITHSN,arch)__-netboot-compute
check:rc==0
cmd:packimage -o __GETNODEATTR($$CNWITHSN,os)__ -p compute -a __GETNODEATTR($$CNWITHSN,arch)__
check:rc==0
cmd:xdsh $$SN df|grep /install;if [ $? -ne 0 ] ;then xdsh $$SN mount $$MN:/install /install;fi
check:rc==0
cmd:nodeset $$CNWITHSN osimage=__GETNODEATTR($$CNWITHSN,os)__-__GETNODEATTR($$CNWITHSN,arch)__-netboot-compute
check:rc==0
cmd:rsetboot $$CNWITHSN net
check:rc==0
cmd:rpower $$CNWITHSN reset
check:rc==0
cmd:sleep 200
cmd:lsdef -l $$CNWITHSN | grep status
check:output=~booted
cmd:xdsh $$CNWITHSN date
check:rc==0
check:output=~\d\d:\d\d:\d\d
cmd:nodeset $$CNWITHSN osimage
check:rc==0
cmd:rsetboot $$CNWITHSN net
check:rc==0
cmd:rpower $$CNWITHSN reset
check:rc==0
cmd:sleep 200
cmd:lsdef -l $$CNWITHSN | grep status
check:output=~booted
cmd:xdsh $$CNWITHSN date
check:rc==0
check:output=~\d\d:\d\d:\d\d
cmd:nodeset $$CNWITHSN netboot
check:rc==0
cmd:rsetboot $$CNWITHSN net
check:rc==0
cmd:rpower $$CNWITHSN reset
check:rc==0
cmd:sleep 200
cmd:lsdef -l $$CNWITHSN | grep status
check:output=~booted
cmd:xdsh $$CNWITHSN date
check:rc==0
check:output=~\d\d:\d\d:\d\d
end

View File

@ -0,0 +1,51 @@
start:Linux_cn_with_sn_full_installation_flat_x86_64_redhat
os:Linux
cmd:makedns -n
check:rc==0
cmd:service named restart
check:rc==0
cmd:makeconservercf $$CNWITHSN
check:rc==0
cmd:cat /etc/conserver.cf | grep $$CNWITHSN
check:output=~$$CNWITHSN
cmd:sleep 60
cmd:makedhcp -n
check:rc==0
cmd:makedhcp -a
check:rc==0
cmd:service dhcpd restart
check:rc==0
cmd:chdef $$CNWITHSN servicenode=$$SN xcatmaster=$$SN
cmd:chdef -t osimage __GETNODEATTR($$CNWITHSN,os)__-__GETNODEATTR($$CNWITHSN,arch)__-install-compute synclists=/install/custom/install/rh/compute.synclist
check:rc==0
cmd:xdsh $$SN df|grep /install;if [ $? -ne 0 ] ; then xdsh $$SN mount $$MN:/install /install;fi
check:rc==0
cmd:nodeset $$CNWITHSN osimage=__GETNODEATTR($$CNWITHSN,os)__-__GETNODEATTR($$CNWITHSN,arch)__-install-compute
check:rc==0
cmd:rsetboot $$CNWITHSN net
check:rc==0
cmd:rpower $$CNWITHSN reset
check:rc==0
cmd:sleep 1200
cmd:ping $$CNWITHSN -c 3
check:output=~64 bytes from $$CNWITHSN
cmd:lsdef -l $$CNWITHSN | grep status
check:output=~booted
cmd:xdsh $$CNWITHSN date
check:rc==0
check:output=~\d\d:\d\d:\d\d
cmd:nodeset $$CNWITHSN osimage
check:rc==0
cmd:rsetboot $$CNWITHSN net
check:rc==0
cmd:rpower $$CNWITHSN reset
check:rc==0
cmd:sleep 1200
cmd:ping $$CNWITHSN -c 3
check:output=~64 bytes from $$CNWITHSN
cmd:lsdef -l $$CNWITHSN | grep status
check:output=~booted
cmd:xdsh $$CNWITHSN date
check:rc==0
check:output=~\d\d:\d\d:\d\d
end

View File

@ -0,0 +1,94 @@
start:Linux_cn_with_sn_statelite_installation_flat_x86_64_redhat
os:Linux
cmd:makedns -n
check:rc==0
cmd:service named restart
check:rc==0
cmd:makeconservercf $$CNWITHSN
check:rc==0
cmd:sleep 90
cmd:chdef $$CNWITHSN servicenode=$$SN xcatmaster=$$SN
check:rc==0
cmd:makedhcp -n
check:rc==0
cmd:makedhcp -a
check:rc==0
cmd:service dhcpd restart
check:rc==0
cmd:rm -rf /install/netboot/__GETNODEATTR($$CN,os)__/x86_64/compute
check:rc==0
cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute rootfstype=
check:rc==0
cmd:genimage __GETNODEATTR($$CNWITHSN,os)__-__GETNODEATTR($$CNWITHSN,arch)__-statelite-compute
check:rc==0
cmd:packimage -o __GETNODEATTR($$CN,os)__ -p compute -a __GETNODEATTR($$CN,arch)__
check:rc==0
cmd:tabrestore /opt/xcat/share/xcat/tools/autotest/testcase/installation/litefile.csv
check:rc==0
cmd:tabdump litefile
check:rc==0
cmd:mkdir -p /nodedata
cmd:chmod 755 /etc/exports
cmd:cat /etc/exports|grep nodedata; if [ "$?" -ne "0" ]; then echo "/nodedata *(rw,no_root_squash,sync,no_subtree_check)" >> /etc/exports; fi
check:rc==0
cmd:cd /etc; export exports;cd -
check:rc==0
cmd:service nfs restart
cmd:chtab node=$$CNWITHSN statelite.statemnt="$$MN:/nodedata"
check:rc==0
cmd:chtab priority=4.7 policy.commands=litefile policy.rule=allow
check:rc==0
cmd:chtab priority=4.8 policy.commands=litetree policy.rule=allow
check:rc==0
cmd:liteimg -p compute -a __GETNODEATTR($$CNWITHSN,arch)__ -o __GETNODEATTR($$CNWITHSN,os)__
check:rc==0
cmd:xdsh $$SN df|grep /install;if [ $? -eq 0 ] ;then xdsh $$SN umount /install;fi
check:rc==0
cmd:prsync /install rhsn:/
check:rc==0
cmd:nodeset $$CNWITHSN osimage=__GETNODEATTR($$CNWITHSN,os)__-__GETNODEATTR($$CNWITHSN,arch)__-statelite-compute
check:rc==0
cmd:rsetboot $$CNWITHSN net
check:rc==0
cmd:rpower $$CNWITHSN reset
check:rc==0
cmd:sleep 300
cmd:lsdef -l $$CNWITHSN | grep status
check:output=~booted
cmd:xdsh $$CNWITHSN date
check:rc==0
check:output=~\d\d:\d\d:\d\d
cmd:xdsh $$SN df|grep /install;if [ $? -ne 0 ] ;then xdsh $$SN mount $$MN:/install /install;fi
check:rc==0
cmd:chdef -t osimage -o __GETNODEATTR($$CNWITHSN,os)__-__GETNODEATTR($$CNWITHSN,arch)__-statelite-compute rootfstype=ramdisk
check:rc==0
cmd:genimage __GETNODEATTR($$CNWITHSN,os)__-__GETNODEATTR($$CNWITHSN,arch)__-statelite-compute
check:rc==0
cmd:liteimg -p compute -a __GETNODEATTR($$CNWITHSN,arch)__ -o __GETNODEATTR($$CNWITHSN,os)__ -t ramdisk
check:rc==0
cmd:nodeset $$CNWITHSN osimage=__GETNODEATTR($$CNWITHSN,os)__-__GETNODEATTR($$CNWITHSN,arch)__-statelite-compute
check:rc==0
cmd:rsetboot $$CNWITHSN net
check:rc==0
cmd:rpower $$CNWITHSN reset
check:rc==0
cmd:sleep 250
cmd:lsdef -l $$CNWITHSN | grep status
check:output=~booted
cmd:xdsh $$CNWITHSN date
check:rc==0
check:output=~\d\d:\d\d:\d\d
cmd:nodeset $$CNWITHSN osimage
check:rc==0
cmd:rsetboot $$CNWITHSN net
check:rc==0
cmd:rpower $$CNWITHSN reset
check:rc==0
cmd:sleep 250
cmd:lsdef -l $$CNWITHSN | grep status
check:output=~booted
cmd:xdsh $$CNWITHSN date
check:rc==0
check:output=~\d\d:\d\d:\d\d
end

View File

@ -0,0 +1,53 @@
#first define
start:Linux_sn_installation_flat_x86_64_redhat
os:Linux
cmd:makedns -n
check:rc==0
cmd:chdef $$SN groups=service,all
check:rc==0
cmd:chdef -t group service arch=__GETNODEATTR($$SN,arch)__ os=__GETNODEATTR($$SN,os)__ profile=service netboot=xnba primarynic=eth0
check:rc==0
cmd:chdef -t group -o service setupnfs=1 setupdhcp=1 setuptftp=1 setupnameserver=1 setupconserver=1
check:rc==0
cmd:chdef $$SN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN
check:rc==0
cmd:makeconservercf
check:rc==0
cmd:cat /etc/conserver.cf | grep $$SN
check:output=~$$SN
cmd:sleep 60
cmd:makedhcp -n
cmd:makedhcp -a
check:rc==0
cmd:service dhcpd restart
check:rc==0
cmd:chdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-service synclists=/install/custom/install/rh/service.synclist
check:rc==0
cmd:chdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/rh/service.rhels6.x86_64.otherpkgs.pkglist
check:rc==0
cmd:mkdir -p /install/post/otherpkgs/__GETNODEATTR($$CN,os)__/x86_64/xcat/
check:rc==0
cmd:cp -rf /xcat-core /install/post/otherpkgs/__GETNODEATTR($$CN,os)__/x86_64/xcat/
check:rc==0
cmd:createrepo /install/post/otherpkgs/__GETNODEATTR($$CN,os)__/x86_64/xcat/xcat-core
check:rc==0
cmd:for i in mysql-server mysql mysql-bench mysql-devel mysql-connector-odbc; do cat /opt/xcat/share/xcat/install/rh/service.rhels6.x86_64.pkglist|grep "$i$";if [ $? -ne 0 ] ; then echo "$i" >> /opt/xcat/share/xcat/install/rh/service.rhels6.x86_64.pkglist; fi done
cmd:chtab node=service postscripts.postscripts="servicenode,odbcsetup"
check:rc==0
cmd:nodeset $$SN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-service
check:rc==0
cmd:rsetboot $$SN net
check:rc==0
cmd:rpower $$SN reset
check:rc==0
cmd:sleep 700
cmd:ping $$SN -c 3
check:output=~64 bytes from $$SN
cmd:lsdef -l $$SN | grep status
check:output=~booted
cmd:xdsh $$SN date
check:rc==0
check:output=~\d\d:\d\d:\d\d
cmd:xdsh $$SN nodels
check:rc==0
end