From 7de10e0ff5f2282aa4c5759aaf019b5fe66708ed Mon Sep 17 00:00:00 2001 From: baiyuan Date: Mon, 4 Nov 2013 03:49:50 -0500 Subject: [PATCH] add test cases for cn installation with sn in x86_64 redhat vm with kvm --- ..._sn_diskless_installation_x86_64_redhat_vm | 51 +++++++++++ ...with_sn_full_installation_x86_64_redhat_vm | 47 ++++++++++ ...sn_statelite_installation_x86_64_redhat_vm | 88 +++++++++++++++++++ 3 files changed, 186 insertions(+) create mode 100644 xCAT-test/autotest/testcase/installation/linux_cn_with_sn_diskless_installation_x86_64_redhat_vm create mode 100644 xCAT-test/autotest/testcase/installation/linux_cn_with_sn_full_installation_x86_64_redhat_vm create mode 100644 xCAT-test/autotest/testcase/installation/linux_cn_with_sn_statelite_installation_x86_64_redhat_vm diff --git a/xCAT-test/autotest/testcase/installation/linux_cn_with_sn_diskless_installation_x86_64_redhat_vm b/xCAT-test/autotest/testcase/installation/linux_cn_with_sn_diskless_installation_x86_64_redhat_vm new file mode 100644 index 000000000..85a8b3f20 --- /dev/null +++ b/xCAT-test/autotest/testcase/installation/linux_cn_with_sn_diskless_installation_x86_64_redhat_vm @@ -0,0 +1,51 @@ +start:Linux_cn_with_sn_diskless_installation_flat_x86_64_redhat_vm +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: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:nodeset $$CNWITHSN osimage +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 +end diff --git a/xCAT-test/autotest/testcase/installation/linux_cn_with_sn_full_installation_x86_64_redhat_vm b/xCAT-test/autotest/testcase/installation/linux_cn_with_sn_full_installation_x86_64_redhat_vm new file mode 100644 index 000000000..d3dc53604 --- /dev/null +++ b/xCAT-test/autotest/testcase/installation/linux_cn_with_sn_full_installation_x86_64_redhat_vm @@ -0,0 +1,47 @@ +start:Linux_cn_with_sn_full_installation_flat_x86_64_redhat_vm +os:Linux +cmd:makedns +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: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: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 diff --git a/xCAT-test/autotest/testcase/installation/linux_cn_with_sn_statelite_installation_x86_64_redhat_vm b/xCAT-test/autotest/testcase/installation/linux_cn_with_sn_statelite_installation_x86_64_redhat_vm new file mode 100644 index 000000000..1c46f21b7 --- /dev/null +++ b/xCAT-test/autotest/testcase/installation/linux_cn_with_sn_statelite_installation_x86_64_redhat_vm @@ -0,0 +1,88 @@ +start:Linux_cn_with_sn_statelite_installation_flat_x86_64_redhat_vm +os:Linux +cmd:makedns +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 rhsnauto:/ +check:rc==0 +cmd:nodeset $$CNWITHSN osimage=__GETNODEATTR($$CNWITHSN,os)__-__GETNODEATTR($$CNWITHSN,arch)__-statelite-compute +check:rc==0 +cmd:rpower $$CNWITHSN reset +check:rc==0 +cmd:sleep 350 +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:chdef -t osimage -o __GETNODEATTR($$CNWITHSN,os)__-__GETNODEATTR($$CNWITHSN,arch)__-statelite-compute rootfstype=ramdisk +check:rc==0 +cmd:xdsh $$SN df|grep /install;if [ $? -ne 0 ] ;then xdsh $$SN mount $$MN:/install /install;fi +check:rc==0 +cmd:genimage __GETNODEATTR($$CNWITHSN,os)__-__GETNODEATTR($$CNWITHSN,arch)__-statelite-compute +check:rc==0 +cmd:liteimg __GETNODEATTR($$CNWITHSN,os)__-__GETNODEATTR($$CNWITHSN,arch)__-statelite-compute +check:rc==0 +cmd:nodeset $$CNWITHSN osimage=__GETNODEATTR($$CNWITHSN,os)__-__GETNODEATTR($$CNWITHSN,arch)__-statelite-compute +check:rc==0 +cmd:rpower $$CNWITHSN reset +check:rc==0 +cmd:sleep 350 +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:rpower $$CNWITHSN reset +check:rc==0 +cmd:sleep 350 +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 +