From a33385c6da50c93ad3cfd0a0a0400d0b75e672d8 Mon Sep 17 00:00:00 2001 From: caomengmeng Date: Wed, 13 Apr 2016 03:07:56 -0400 Subject: [PATCH] changed all labels --- xCAT-test/autotest/testcase/installation/1 | 100 ++++++++++++++++++ .../reg_linux_SN_installation_hierarchy | 2 +- .../reg_linux_diskfull_installation_flat | 2 +- .../reg_linux_diskfull_installation_hierarchy | 2 +- .../reg_linux_diskless_installation_flat | 2 +- .../reg_linux_diskless_installation_hierarchy | 2 +- .../reg_linux_statelite_installation_flat | 2 +- ...reg_linux_statelite_installation_hierarchy | 1 + ...ux_statelite_installation_hierarchy_by_nfs | 2 +- ...tatelite_installation_hierarchy_by_ramdisk | 2 +- .../ubuntu_diskless_installation_p8le | 2 +- .../ubuntu_diskless_installation_vm | 2 +- .../ubuntu_full_installation_p8le | 2 +- .../installation/ubuntu_full_installation_vm | 2 +- 14 files changed, 113 insertions(+), 12 deletions(-) create mode 100644 xCAT-test/autotest/testcase/installation/1 diff --git a/xCAT-test/autotest/testcase/installation/1 b/xCAT-test/autotest/testcase/installation/1 new file mode 100644 index 000000000..7e310aaa1 --- /dev/null +++ b/xCAT-test/autotest/testcase/installation/1 @@ -0,0 +1,100 @@ +start:reg_linux_statelite_installation_hierarchy_by_nfs +os:Linux +stop:yes + +cmd:chdef -t node -o $$CN servicenode=$$SN monserver=$$SN nfsserver=$$SN tftpserver=$$SN xcatmaster=$$SN +check:rc==0 +cmd:chdef -t node $$SN groups=service,all +check:rc==0 + +cmd:makedns -n +check:rc==0 +cmd:makeconservercf +check:rc==0 +cmd:sleep 20 +cmd:if [[ "__GETNODEATTR($$CN,arch)__" =~ "ppc64" ]]; then getmacs -D $$CN; fi +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 xdsh $$SN 'service nfsserver restart'; elif cat /etc/*release |grep "Red Hat" >/dev/null;then xdsh $$SN '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 cp /opt/xcat/share/xcat/tools/autotest/testcase/installation/litefile_sles.csv /tmp/litefile.csv; tabrestore /tmp/litefile.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:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then mv $rootimgdir $rootimgdir.regbak;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:lsdef $$CN |grep provmethod +check:rc==0 +check:output=~statelite +cmd:if [[ "__GETNODEATTR($$CN,arch)__" =~ "ppc64" ]]; then rnetboot $$CN;elif [[ "__GETNODEATTR($$CN,arch)__" =~ "x86_64" ]];then rpower $$CN boot; fi +check:rc==0 + +cmd:sleep 900 +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=~/nodedata/$$CN on /.statelite/persistent +check:output=~compute/rootimg on / type nfs +cmd:MNIP=`cat /etc/hosts|grep $$MN|awk '{print $1}'`; result=`xdsh $$CN "cat /etc/resolv.conf|grep $MNIP"`; if [ "$result" = "$$CN: nameserver $MNIP" ]; then echo "sync file works well"; fi; +check:output=~sync file works well + +cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then rm -rf $rootimgdir;fi +check:rc==0 +end diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_SN_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_SN_installation_hierarchy index de138e5de..5fd078f34 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_SN_installation_hierarchy +++ b/xCAT-test/autotest/testcase/installation/reg_linux_SN_installation_hierarchy @@ -1,6 +1,6 @@ start:reg_linux_SN_installation_hierarchy os:Linux -stop=yes +stop:yes cmd:chtab key=nameservers site.value="" check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat index 0cdc0239a..feec8c7c2 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat @@ -1,6 +1,6 @@ start:reg_linux_diskfull_installation_flat os:Linux -stop=yes +stop:yes cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy index 2e90b4525..ec28d5b86 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy @@ -1,6 +1,6 @@ start:reg_linux_diskfull_installation_hierarchy os:Linux -stop=yes +stop:yes cmd:chdef -t node -o $$CN servicenode=$$SN monserver=$$SN nfsserver=$$SN tftpserver=$$SN xcatmaster=$$SN check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat index c34ad4f44..705400a6a 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat @@ -1,6 +1,6 @@ start:reg_linux_diskless_installation_flat os:Linux -stop=yes +stop:yes cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy index abb6fda6a..7232133d4 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy @@ -1,6 +1,6 @@ start:reg_linux_diskless_installation_hierarchy os:Linux -stop=yes +stop:yes cmd:chdef -t node -o $$CN servicenode=$$SN monserver=$$SN nfsserver=$$SN tftpserver=$$SN xcatmaster=$$SN check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat index af9d3a8ec..c0ba9c8f8 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat @@ -1,6 +1,6 @@ start:reg_linux_statelite_installation_flat os:Linux -stop=yes +stop:yes cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy index 0f85312c9..f9de59ccd 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy @@ -1,5 +1,6 @@ start:reg_linux_statelite_installation_hierarchy os:Linux +stop:yes cmd:MNIP=`cat /etc/hosts|grep $$MN|awk '{print $1}'`;sed -i "s:nameserver .*:nameserver $MNIP:g" /etc/resolv.conf diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs index 3bc3dd622..7e310aaa1 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs @@ -1,6 +1,6 @@ start:reg_linux_statelite_installation_hierarchy_by_nfs os:Linux -stop=yes +stop:yes cmd:chdef -t node -o $$CN servicenode=$$SN monserver=$$SN nfsserver=$$SN tftpserver=$$SN xcatmaster=$$SN check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk index 3eaff6341..8d4984708 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk @@ -1,6 +1,6 @@ start:reg_linux_statelite_installation_hierarchy_by_ramdisk os:Linux -stop=yes +stop:yes cmd:chdef -t node -o $$CN servicenode=$$SN monserver=$$SN nfsserver=$$SN tftpserver=$$SN xcatmaster=$$SN check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/ubuntu_diskless_installation_p8le b/xCAT-test/autotest/testcase/installation/ubuntu_diskless_installation_p8le index fa08387d9..644e171a6 100644 --- a/xCAT-test/autotest/testcase/installation/ubuntu_diskless_installation_p8le +++ b/xCAT-test/autotest/testcase/installation/ubuntu_diskless_installation_p8le @@ -1,6 +1,6 @@ start:Diskless_installation_flat_p8_le os:Linux -stop=yes +stop:yes cmd:copycds $$ISO check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/ubuntu_diskless_installation_vm b/xCAT-test/autotest/testcase/installation/ubuntu_diskless_installation_vm index 62980140f..444b14dbb 100644 --- a/xCAT-test/autotest/testcase/installation/ubuntu_diskless_installation_vm +++ b/xCAT-test/autotest/testcase/installation/ubuntu_diskless_installation_vm @@ -1,6 +1,6 @@ start:Ubuntu_diskless_installation_flat_x86_vm os:Linux -stop=yes +stop:yes cmd:copycds $$ISO check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_p8le b/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_p8le index 577497c82..c62cc0cac 100644 --- a/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_p8le +++ b/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_p8le @@ -1,6 +1,6 @@ start:Full_installation_flat_p8_le os:Linux -stop=yes +stop:yes cmd:copycds $$ISO check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm b/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm index 6cf90d2b6..ff4d42ce6 100644 --- a/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm +++ b/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm @@ -1,6 +1,6 @@ start:Ubuntu_full_installation_flat_x86_vm os:Linux -stop=yes +stop:yes cmd:copycds $$ISO check:rc==0