diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_SN_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_SN_installation_hierarchy new file mode 100644 index 000000000..4b5282131 --- /dev/null +++ b/xCAT-test/autotest/testcase/installation/reg_linux_SN_installation_hierarchy @@ -0,0 +1,93 @@ +start:reg_linux_SN_installation_hierarchy +os:Linux + +cmd:chtab key=nameservers site.value="" +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 5 +#cmd:getmacs -D $$SN +3check:rc==0 +cmd:makedhcp -n +check:rc==0 +cmd:makedhcp -a +check:rc==0 +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 +check:rc==0 +cmd:chdef -t group -o service profile=service netboot=yaboot 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,odbcsetup" +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 +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 +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:nodeset $$SN osimage=__GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service +check:rc==0 +cmd:rnetboot $$SN +check:rc==0 + +cmd:sleep 600 +cmd:a=0;while ! `lsdef -l $$SN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 350 ];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=~nodelist +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=~Name: $$CN +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 new file mode 100644 index 000000000..a4f080f33 --- /dev/null +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat @@ -0,0 +1,46 @@ +start:reg_linux_diskfull_installation_flat +os:Linux + +cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN +check:rc==0 + +cmd:makedns -n +check:rc==0 +cmd:makeconservercf +check:rc==0 +cmd:cat /etc/conserver.cf | grep $$CN +check:output=~$$CN +cmd:sleep 20 +cmd:getmacs -D $$CN +check:rc==0 +cmd:makedhcp -n +check:rc==0 +cmd:makedhcp -a +check:rc==0 +cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.leases|grep $$CN;elif cat /etc/*release |grep "Red Hat" >/dev/null;then cat /var/lib/dhcpd/dhcpd.leases|grep $$CN;fi +check:output=~$$CN + +cmd:copycds $$ISO +check:rc==0 + +cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +check:rc==0 +cmd:rnetboot $$CN +check:rc==0 + +cmd:sleep 480 +cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 250 ];then break;fi done + +cmd:ping $$CN -c 3 +check:rc==0 +check:output=~64 bytes from $$CN +cmd:lsdef -l $$CN | grep status +check:rc==0 +check:output=~booted +cmd:xdsh $$CN date +check:rc==0 +check:output=~\d\d:\d\d:\d\d +cmd:xdsh $$CN mount +check:rc==0 +check:output=~on / type ext +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 new file mode 100644 index 000000000..601f99d7d --- /dev/null +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy @@ -0,0 +1,49 @@ +start:reg_linux_diskfull_installation_hierarchy +os:Linux + +cmd:chdef -t node -o $$CN servicenode=$$SN monserver=$$SN nfsserver=$$SN tftpserver=$$SN xcatmaster=$$SN +check:rc==0 + +cmd:chtab key=nameservers site.value="" +check:rc==0 + +cmd:makedns -n +check:rc==0 +cmd:makeconservercf +check:rc==0 +cmd:cat /etc/conserver.cf | grep $$CN +check:output=~$$CN +cmd:sleep 5 +cmd:getmacs -D $$CN +check:rc==0 +cmd:makedhcp -n +check:rc==0 +cmd:makedhcp -a +check:rc==0 +cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.leases|grep $$CN;elif cat /etc/*release |grep "Red Hat" >/dev/null;then cat /var/lib/dhcpd/dhcpd.leases|grep $$CN;fi +check:output=~$$CN + +#cmd:copycds $$ISO +#check:rc==0 + +cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +check:rc==0 +cmd:rnetboot $$CN +check:rc==0 + +cmd:sleep 480 +cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 250 ];then break;fi done + +cmd:ping $$CN -c 3 +check:rc==0 +check:output=~64 bytes from $$CN +cmd:lsdef -l $$CN | grep status +check:rc==0 +check:output=~booted +cmd:xdsh $$CN date +check:rc==0 +check:output=~\d\d:\d\d:\d\d +cmd:xdsh $$CN mount +check:rc==0 +check:output=~on / type ext +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 new file mode 100644 index 000000000..330802c54 --- /dev/null +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat @@ -0,0 +1,58 @@ +start:reg_linux_diskless_installation_flat +os:Linux + +cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN +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:sleep 20 +cmd:getmacs -D $$CN +check:rc==0 +cmd:makedhcp -n +check:rc==0 +cmd:makedhcp -a +check:rc==0 +cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.leases|grep $$CN;elif cat /etc/*release |grep "Red Hat" >/dev/null;then cat /var/lib/dhcpd/dhcpd.leases|grep $$CN;fi +check:output=~$$CN + +#cmd:copycds $$ISO +#check:rc==0 + +cmd: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;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;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;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:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute +check:rc==0 +cmd:rnetboot $$CN +check:rc==0 + +cmd:sleep 300 +cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 60 ];then break;fi done + +cmd:ping $$CN -c 3 +check:rc==0 +check:output=~64 bytes from $$CN +cmd:lsdef -l $$CN | grep status +check:rc==0 +check:output=~booted +cmd:xdsh $$CN date +check:rc==0 +check:output=~\d\d:\d\d:\d\d +cmd:xdsh $$CN mount +check:rc==0 +check:output=~on / type tmpfs +end diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy new file mode 100644 index 000000000..a9b9e655c --- /dev/null +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy @@ -0,0 +1,60 @@ +start:reg_linux_diskless_installation_hierarchy +os:Linux + +cmd:chdef -t node -o $$CN servicenode=$$SN monserver=$$SN nfsserver=$$SN tftpserver=$$SN xcatmaster=$$SN +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:sleep 20 +cmd:getmacs -D $$CN +check:rc==0 +cmd:makedhcp -n +check:rc==0 +cmd:makedhcp -a +check:rc==0 +cmd:service dhcpd restart +check:rc==0 +cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.leases|grep $$CN;elif cat /etc/*release |grep "Red Hat" >/dev/null;then cat /var/lib/dhcpd/dhcpd.leases|grep $$CN;fi +check:output=~$$CN + +#cmd:copycds $$ISO +#check:rc==0 + +cmd: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;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;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;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:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute +check:rc==0 +cmd:rnetboot $$CN +check:rc==0 + +cmd:sleep 300 +cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 60 ];then break;fi done + +cmd:ping $$CN -c 3 +check:rc==0 +check:output=~64 bytes from $$CN +cmd:lsdef -l $$CN | grep status +check:rc==0 +check:output=~booted +cmd:xdsh $$CN date +check:rc==0 +check:output=~\d\d:\d\d:\d\d +cmd:xdsh $$CN mount +check:rc==0 +check:output=~on / type tmpfs +end diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat new file mode 100644 index 000000000..9333eea6a --- /dev/null +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat @@ -0,0 +1,104 @@ +start:reg_linux_statelite_installation_flat +os:Linux + +cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN +check:rc==0 + +cmd:makedns -n +check:rc==0 +cmd:makeconservercf $$CN +check:rc==0 +cmd:sleep 20 +cmd:getmacs -D $$CN +check:rc==0 +cmd:makedhcp -n +check:rc==0 +cmd:makedhcp -a +check:rc==0 + +#cmd:copycds $$ISO +#check:rc==0 + +cmd:if cat /etc/*release |grep SUSE >/dev/null; then tabrestore /opt/xcat/share/xcat/tools/autotest/testcase/installation/litefile_sles.csv; elif cat /etc/*release |grep "Red Hat" >/dev/null; then tabrestore /opt/xcat/share/xcat/tools/autotest/testcase/installation/litefile.csv;fi +check:rc==0 +cmd:tabdump litefile +check:rc==0 + +cmd:mkdir -p /nodedata +check:rc==0 +cmd:chmod 755 /etc/exports +check:rc==0 +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:if cat /etc/*release |grep SUSE >/dev/null;then service nfsserver restart; elif cat /etc/*release |grep "Red Hat" >/dev/null;then service nfs restart; fi +check:rc==0 +cmd:chtab node=$$CN 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: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;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;fi +check:rc==0 +cmd:if cat /etc/*release |grep SUSE >/dev/null;then chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute synclists=/install/custom/netboot/sles/compute.synclist rootfstype=; elif cat /etc/*release |grep "Red Hat" >/dev/null;then chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute synclists=/install/custom/netboot/rh/compute.synclist rootfstype=; fi +check:rc==0 + +cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute +check:rc==0 +cmd:liteimg __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute +check:rc==0 +cmd:nodeset $$CN statelite +check:rc==0 +cmd:rnetboot $$CN +check:rc==0 + +cmd:sleep 300 +cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 60 ];then break;fi done + +cmd:ping $$CN -c 3 +check:rc==0 +check:output=~64 bytes from $$CN +cmd:lsdef -l $$CN | grep status +check:rc==0 +check:output=~booted +cmd:xdsh $$CN date +check:rc==0 +check:output=~\d\d:\d\d:\d\d +cmd:xdsh $$CN mount +check:rc==0 +check:output=~$$MN:/nodedata/$$CN on /.statelite/persistent type nfs +check:output=~compute/rootimg on / type nfs + + +cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute rootfstype=ramdisk +check:rc==0 +cmd:liteimg __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute +check:rc==0 +cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute +check:rc==0 +cmd:rnetboot $$CN +check:rc==0 + +cmd:sleep 300 +cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 60 ];then break;fi done + +cmd:ping $$CN -c 3 +check:rc==0 +check:output=~64 bytes from $$CN +cmd:lsdef -l $$CN | grep status +check:rc==0 +check:output=~booted +cmd:xdsh $$CN date +check:rc==0 +check:output=~\d\d:\d\d:\d\d +cmd:xdsh $$CN mount +check:rc==0 +check:output=~$$MN:/nodedata/$$CN on /.statelite/persistent type nfs +check:output=~rootfs on / type tmpfs +end diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy new file mode 100644 index 000000000..37ef164aa --- /dev/null +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy @@ -0,0 +1,120 @@ +start:reg_linux_statelite_installation_hierarchy +os:Linux + +cmd:chdef -t node -o $$CN servicenode=$$SN monserver=$$SN nfsserver=$$SN tftpserver=$$SN xcatmaster=$$SN +check:rc==0 + +cmd:makedns -n +check:rc==0 +cmd:makeconservercf +check:rc==0 +cmd:sleep 20 +cmd:getmacs -D $$CN +check:rc==0 +cmd:makedhcp -n +check:rc==0 +cmd:makedhcp -a +check:rc==0 + +#cmd:copycds $$ISO +#check:rc==0 + +cmd:xdsh $$SN df|grep /install;if [ $? -eq 0 ] ;then xdsh $$SN umount /install;fi +check:rc==0 +cmd:xdsh $$SN 'cat /etc/exports|grep install; if [ "$?" -ne "0" ]; then echo "/install *(rw,no_root_squash,sync,no_subtree_check)" >> /etc/exports; fi' +check:rc==0 + +cmd:xdsh $$SN "mkdir -p /nodedata" +check:rc==0 +cmd:xdsh $$SN "chmod 755 /etc/exports" +check:rc==0 +cmd:xdsh $$SN '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:xdsh $$SN 'cd /etc; export exports;cd -' +check:rc==0 +cmd:if cat /etc/*release |grep SUSE >/dev/null;then service nfsserver restart; elif cat /etc/*release |grep "Red Hat" >/dev/null;then service nfs restart; fi +check:rc==0 + +cmd:chtab node=$$CN statelite.statemnt="$$SN:/nodedata" +check:rc==0 + +cmd:if cat /etc/*release |grep SUSE >/dev/null; then tabrestore /opt/xcat/share/xcat/tools/autotest/testcase/installation/litefile_sles.csv; elif cat /etc/*release |grep "Red Hat" >/dev/null; then tabrestore /opt/xcat/share/xcat/tools/autotest/testcase/installation/litefile.csv;fi +check:rc==0 +cmd:tabdump litefile +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:if [ -e /install/netboot/$$CN/__GETNODEATTR($$CN,arch)__/compute]; then rm -rf /install/netboot/$$CN/__GETNODEATTR($$CN,arch)__/compute;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;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;fi +check:rc==0 +cmd:if cat /etc/*release |grep SUSE >/dev/null;then chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute synclists=/install/custom/netboot/sles/compute.synclist rootfstype=; elif cat /etc/*release |grep "Red Hat" >/dev/null;then chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute synclists=/install/custom/netboot/rh/compute.synclist rootfstype=; fi +check:rc==0 + +cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute +check:rc==0 +cmd:liteimg __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute +check:rc==0 +cmd:prsync /install $$SN:/ +check:rc==0 + +cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute +check:rc==0 +cmd:rnetboot $$CN +check:rc==0 + +cmd:sleep 300 +cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 60 ];then break;fi done + +cmd:ping $$CN -c 3 +check:rc==0 +check:output=~64 bytes from $$CN +cmd:lsdef -l $$CN | grep status +check:rc==0 +check:output=~booted +cmd:xdsh $$CN date +check:rc==0 +check:output=~\d\d:\d\d:\d\d +cmd:xdsh $$CN mount +check:rc==0 +check:output=~$$SN:/nodedata on /.statelite/persistent type nfs +check:output=~compute/rootimg on / type nfs + +cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute rootfstype=ramdisk +check:rc==0 +#cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute +#check:rc==0 +cmd:liteimg __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute +check:rc==0 +cmd:prsync /install $$SN:/ +check:rc==0 + +cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute +check:rc==0 +cmd:rnetboot $$CN +check:rc==0 + +cmd:sleep 300 +cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 60 ];then break;fi done + +cmd:ping $$CN -c 3 +check:rc==0 +check:output=~64 bytes from $$CN +cmd:lsdef -l $$CN | grep status +check:rc==0 +check:output=~booted +cmd:xdsh $$CN date +check:rc==0 +check:output=~\d\d:\d\d:\d\d +cmd:xdsh $$CN mount +check:rc==0 +check:output=~$$SN:/nodedata on /.statelite/persistent type nfs +check:output=~rootfs on / type tmpfs +end