From 66d9c1b05c12475e94d61587efa6792295d02828 Mon Sep 17 00:00:00 2001 From: junxiawang Date: Mon, 5 Dec 2016 05:08:29 -0500 Subject: [PATCH 1/5] modify statelite testcase --- .../testcase/installation/Diskless_installation_flat_p8_le | 7 +++++++ .../reg_linux_statelite_installation_hierarchy_by_nfs | 2 -- .../reg_linux_statelite_installation_hierarchy_by_ramdisk | 2 -- .../testcase/installation/ubuntu_diskless_installation_vm | 4 +++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/xCAT-test/autotest/testcase/installation/Diskless_installation_flat_p8_le b/xCAT-test/autotest/testcase/installation/Diskless_installation_flat_p8_le index cdd4e875d..42b35a1cf 100644 --- a/xCAT-test/autotest/testcase/installation/Diskless_installation_flat_p8_le +++ b/xCAT-test/autotest/testcase/installation/Diskless_installation_flat_p8_le @@ -17,6 +17,9 @@ 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 @@ -61,4 +64,8 @@ check:output=~booted cmd:xdsh $$CN date check:rc==0 check:output=~\d\d:\d\d:\d\d +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.regbak ]; then rm -rf $rootimgdir; mv $rootimgdir.regbak $rootimgdir; fi +check:rc==0 + end 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 d33cc5b1c..6d5a07282 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 @@ -93,6 +93,4 @@ check:output=~compute/rootimg on / type nfs 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 -cmd:rmdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute -check:rc==0 end 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 b0b3094c2..9531d7c4e 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 @@ -95,6 +95,4 @@ check:output=~rootfs on / type cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir.regbak ]; then rm -rf $rootimgdir; mv $rootimgdir.regbak $rootimgdir; fi check:rc==0 -cmd:rmdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute -check:rc==0 end diff --git a/xCAT-test/autotest/testcase/installation/ubuntu_diskless_installation_vm b/xCAT-test/autotest/testcase/installation/ubuntu_diskless_installation_vm index abf14d1c8..1ac941c80 100644 --- a/xCAT-test/autotest/testcase/installation/ubuntu_diskless_installation_vm +++ b/xCAT-test/autotest/testcase/installation/ubuntu_diskless_installation_vm @@ -17,7 +17,7 @@ cmd:makedhcp -a check:rc==0 cmd:makeconservercf $$CN check:rc==0 -cmd:rm -rf /install/netboot/__GETNODEATTR($$CN,os)__/x86_64/compute +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 @@ -44,4 +44,6 @@ check:output=~booted cmd:xdsh $$CN date check:rc==0 check:output=~\d\d:\d\d:\d\d +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 From d17230e96fd0f696778408b2e5e87dd669646809 Mon Sep 17 00:00:00 2001 From: junxiawang Date: Mon, 5 Dec 2016 05:11:34 -0500 Subject: [PATCH 2/5] modify Diskless_installation_flat_p8_le testcase --- .../testcase/installation/Diskless_installation_flat_p8_le | 1 - 1 file changed, 1 deletion(-) diff --git a/xCAT-test/autotest/testcase/installation/Diskless_installation_flat_p8_le b/xCAT-test/autotest/testcase/installation/Diskless_installation_flat_p8_le index 42b35a1cf..20795590b 100644 --- a/xCAT-test/autotest/testcase/installation/Diskless_installation_flat_p8_le +++ b/xCAT-test/autotest/testcase/installation/Diskless_installation_flat_p8_le @@ -64,7 +64,6 @@ check:output=~booted cmd:xdsh $$CN date check:rc==0 check:output=~\d\d:\d\d:\d\d -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.regbak ]; then rm -rf $rootimgdir; mv $rootimgdir.regbak $rootimgdir; fi check:rc==0 From f492431a59f2654ed4d9177cfad00b1394eb7a0e Mon Sep 17 00:00:00 2001 From: junxiawang Date: Mon, 5 Dec 2016 05:16:15 -0500 Subject: [PATCH 3/5] modify reg_linux_statelite_installation_flat testcase --- .../testcase/installation/reg_linux_statelite_installation_flat | 2 -- 1 file changed, 2 deletions(-) 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 13885735d..f5ddc704e 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat @@ -129,6 +129,4 @@ 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.regbak ]; then rm -rf $rootimgdir; mv $rootimgdir.regbak $rootimgdir; fi check:rc==0 -cmd:rmdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute -check:rc==0 end From aadcffbc15b75191a2384c9d19596e22ef5947b9 Mon Sep 17 00:00:00 2001 From: junxiawang Date: Mon, 5 Dec 2016 07:31:45 -0500 Subject: [PATCH 4/5] modify litefile --- xCAT-test/autotest/testcase/installation/litefile.csv | 1 - 1 file changed, 1 deletion(-) diff --git a/xCAT-test/autotest/testcase/installation/litefile.csv b/xCAT-test/autotest/testcase/installation/litefile.csv index 7eaf1527d..0fed94364 100644 --- a/xCAT-test/autotest/testcase/installation/litefile.csv +++ b/xCAT-test/autotest/testcase/installation/litefile.csv @@ -14,7 +14,6 @@ "ALL","/etc/sysconfig/","tmpfs",, "ALL","/etc/ssh/","tmpfs",, "ALL","/etc/systemd/system/multi-user.target.wants/","tmpfs",, -"ALL","/usr/lib/systemd/system/ntpd.service","tmpfs",, "ALL","/tmp/","tmpfs",, "ALL","/var/","tmpfs",, "ALL","/opt/xcat/","tmpfs",, From 483923eae79aa581564d4b3972ce732f2f4415ea Mon Sep 17 00:00:00 2001 From: immarvin Date: Mon, 5 Dec 2016 03:42:57 -0500 Subject: [PATCH 5/5] correct a syntax --- .../share/xcat/netboot/rh/dracut_033/xcat-prepivot.sh | 6 +++--- xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/rh/dracut_033/xcat-prepivot.sh b/xCAT-server/share/xcat/netboot/rh/dracut_033/xcat-prepivot.sh index 56401e96d..6df3011e6 100755 --- a/xCAT-server/share/xcat/netboot/rh/dracut_033/xcat-prepivot.sh +++ b/xCAT-server/share/xcat/netboot/rh/dracut_033/xcat-prepivot.sh @@ -66,7 +66,7 @@ if [ ! -z $SNAPSHOTSERVER ]; then /bin/sh exit fi - RS= $(( $RANDOM % 20 )) + RS=$(( $RANDOM % 20 )) echo "Trying again in $RS seconds..." sleep $RS done @@ -83,7 +83,7 @@ if [ ! -z $SNAPSHOTSERVER ]; then /bin/sh exit fi - RS= $(( $RANDOM % 20 )) + RS=$(( $RANDOM % 20 )) echo "Trying again in $RS seconds..." sleep $RS done @@ -98,7 +98,7 @@ if [ ! -z $SNAPSHOTSERVER ]; then /bin/sh exit fi - RS= $(( $RANDOM % 20 )) + RS=$(( $RANDOM % 20 )) echo "Trying again in $RS seconds..." sleep $RS done diff --git a/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot b/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot index c4d6c17dd..94e1f026e 100755 --- a/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot +++ b/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot @@ -212,7 +212,7 @@ elif [ -r /rootimg-statelite.gz ]; then /bin/sh exit fi - RS= $(( $RANDOM % 20 )) + RS=$(( $RANDOM % 20 )) echo "Trying again in $RS seconds..." sleep $RS done @@ -227,7 +227,7 @@ elif [ -r /rootimg-statelite.gz ]; then /bin/sh exit fi - RS= $(( $RANDOM % 20 )) + RS=$(( $RANDOM % 20 )) echo "Trying again in $RS seconds..." sleep $RS done