mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-25 05:02:05 +00:00
Merge pull request #2849 from junxiawang/0411
modify installation testcase for issue:2834
This commit is contained in:
commit
a271505a38
@ -1,6 +1,7 @@
|
||||
start:SN_setup_case
|
||||
os:Linux
|
||||
|
||||
cmd:fdisk -l
|
||||
cmd:df -T
|
||||
cmd:XCAT_DATABASE=$$XCAT_DATABASE /opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__
|
||||
check:rc==0
|
||||
|
||||
@ -22,7 +23,6 @@ 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 primarynic=mac installnic=mac
|
||||
@ -59,6 +59,7 @@ cmd:rinstall $$SN osimage=__GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-in
|
||||
check:rc==0
|
||||
check:output=~Provision node\(s\)\: $$SN
|
||||
|
||||
cmd:if [[ -f /var/lib/dhcp/db/dhcpd.leases ]]; then cat /var/lib/dhcp/db/dhcpd.leases; elif [[ -f /var/lib/dhcpd/dhcpd.leases ]];then cat /var/lib/dhcpd/dhcpd.leases;elif [[ -f /var/lib/dhcp/dhcpd.leases ]];then cat /var/lib/dhcp/dhcpd.leases; fi
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/installation/customize_sleep_for_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__
|
||||
|
||||
cmd:ping $$SN -c 3
|
||||
|
@ -1,6 +1,7 @@
|
||||
start:reg_linux_diskfull_installation_flat
|
||||
os:Linux
|
||||
|
||||
cmd:fdisk -l
|
||||
cmd:df -T
|
||||
cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi
|
||||
cmd:MINIISO=NUll;if [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu" ]] && [[ "__GETNODEATTR($$CN,arch)__" =~ "ppc64" ]];then mkdir /tmp/iso; mount -o loop $$MINIISO /tmp/iso ; mkdir -p /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot; cp /tmp/iso/install/initrd.gz /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot;umount /tmp/iso; rmdir /tmp/iso; fi
|
||||
check:rc==0
|
||||
@ -31,6 +32,9 @@ cmd:a=0;while true; do [ $a -eq 100 ] && exit 1;output=$(makedhcp -q $$CN);[ $?
|
||||
check:rc==0
|
||||
cmd:copycds $$ISO
|
||||
check:rc==0
|
||||
cmd:if [[ -f /tmp/test.synclist ]] ;then mv -f /tmp/test.synclist /tmp/test.synclist.bak;fi;
|
||||
cmd:echo "/tmp/test.synclist -> /tmp/test.synclist" > /tmp/test.synclist;chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute synclists=/tmp/test.synclist
|
||||
check:rc==0
|
||||
cmd:if ! ([[ "__GETNODEATTR($$CN,os)__" = "sles12.1" ]] || [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu" && "__GETNODEATTR($$CN,arch)__" = "x86_64" ]]) ; then chdef -t node -o $$CN postscripts=setupntp; fi
|
||||
check:rc==0
|
||||
cmd:lsdef -l $$CN
|
||||
@ -38,10 +42,9 @@ check:rc==0
|
||||
cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
|
||||
check:rc==0
|
||||
check:output=~Provision node\(s\)\: $$CN
|
||||
|
||||
cmd:if [[ -f /var/lib/dhcp/db/dhcpd.leases ]]; then cat /var/lib/dhcp/db/dhcpd.leases; elif [[ -f /var/lib/dhcpd/dhcpd.leases ]];then cat /var/lib/dhcpd/dhcpd.leases;elif [[ -f /var/lib/dhcp/dhcpd.leases ]];then cat /var/lib/dhcp/dhcpd.leases; fi
|
||||
cmd:sleep 300
|
||||
cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 20;((a++));if [ $a -gt 300 ];then break;fi done
|
||||
|
||||
cmd:ping $$CN -c 3
|
||||
check:rc==0
|
||||
check:output=~64 bytes from $$CN
|
||||
@ -65,4 +68,8 @@ cmd:ping $$CN -c 3
|
||||
check:rc==0
|
||||
check:output=~64 bytes from $$CN
|
||||
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
|
||||
cmd:xdsh $$CN "cat /tmp/test.synclist"
|
||||
check:rc==0
|
||||
cmd:if [[ -f /tmp/test.synclist.bak ]] ;then mv -f /tmp/test.synclist.bak /tmp/test.synclist;else rm -rf /tmp/test.synclist;fi
|
||||
cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute synclists=
|
||||
end
|
||||
|
@ -1,6 +1,13 @@
|
||||
start:reg_linux_diskfull_installation_hierarchy
|
||||
os:Linux
|
||||
|
||||
cmd:xdsh $$SN fdisk -l
|
||||
cmd:xdsh $$SN df -T
|
||||
cmd:xdsh $$SN "echo "test"> /test.hierarchy"
|
||||
check:rc==0
|
||||
cmd:xdsh $$SN cat /test.hierarchy
|
||||
check:rc==0
|
||||
check:output=~test
|
||||
cmd:output=$(xdsh $$SN ls -al / |grep test.hierarchy);if [[ $? -eq 0 ]];then xdsh $$SN rm -rf /test.hierarchy;fi
|
||||
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
|
||||
@ -26,13 +33,16 @@ cmd:a=0;while true; do [ $a -eq 100 ] && exit 1;output=$(makedhcp -q $$CN);[ $?
|
||||
check:rc==0
|
||||
cmd:copycds $$ISO
|
||||
check:rc==0
|
||||
|
||||
cmd:if [[ -f /tmp/test.synclist ]] ;then mv -f /tmp/test.synclist /tmp/test.synclist.bak;fi;
|
||||
cmd:echo "/tmp/test.synclist -> /tmp/test.synclist" > /tmp/test.synclist;chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute synclists=/tmp/test.synclist
|
||||
check:rc==0
|
||||
cmd:updatenode $$CN -f
|
||||
check:rc==0
|
||||
cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
|
||||
check:rc==0
|
||||
check:output=~Provision node\(s\)\: $$CN
|
||||
|
||||
cmd:xdsh $$SN "if [[ -f /var/lib/dhcp/db/dhcpd.leases ]]; then cat /var/lib/dhcp/db/dhcpd.leases; elif [[ -f /var/lib/dhcpd/dhcpd.leases ]];then cat /var/lib/dhcpd/dhcpd.leases;elif [[ -f /var/lib/dhcp/dhcpd.leases ]];then cat /var/lib/dhcp/dhcpd.leases; fi"
|
||||
cmd:if [[ "__GETNODEATTR($$CN,arch)__" =~ "ppc" ]]; then sleep 120;elif [[ "__GETNODEATTR($$CN,arch)__" =~ "x86_64" ]];then sleep 200;else sleep 180;fi
|
||||
|
||||
#cmd:lsdef -l $$CN | grep status
|
||||
@ -53,4 +63,8 @@ check:output=~\d\d:\d\d:\d\d
|
||||
cmd:xdsh $$CN mount
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
|
||||
cmd:xdsh $$CN "cat /tmp/test.synclist"
|
||||
check:rc==0
|
||||
cmd:if [[ -f /tmp/test.synclist.bak ]] ;then mv -f /tmp/test.synclist.bak /tmp/test.synclist;else rm -rf /tmp/test.synclist;fi
|
||||
cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute synclists=
|
||||
end
|
||||
|
@ -1,6 +1,7 @@
|
||||
start:reg_linux_diskless_installation_flat
|
||||
os:Linux
|
||||
|
||||
cmd:fdisk -l
|
||||
cmd:df -T
|
||||
cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN
|
||||
check:rc==0
|
||||
|
||||
@ -19,20 +20,14 @@ cmd:makedhcp -a
|
||||
check:rc==0
|
||||
cmd:a=0;while true; do [ $a -eq 100 ] && exit 1;output=$(makedhcp -q $$CN);[ $? -ne 0 ] && exit 1;echo $output|grep $$CN 2>/dev/null && exit 0;a=$[$a+1];sleep 1;done
|
||||
check:rc==0
|
||||
|
||||
cmd:copycds $$ISO
|
||||
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
|
||||
cmd:if [[ -f /tmp/test.synclist ]] ;then mv -f /tmp/test.synclist /tmp/test.synclist.bak;fi;
|
||||
cmd:echo "/tmp/test.synclist -> /tmp/test.synclist" > /tmp/test.synclist;chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute synclists=/tmp/test.synclist
|
||||
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
|
||||
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;elif cat /etc/*release |grep "Ubuntu" >/dev/null; then chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute synclists=/install/custom/netboot/ubuntu/compute.synclist;fi
|
||||
check:rc==0
|
||||
|
||||
cmd:if [ ! -d /tmp/mountoutput ]; then mkdir -p /tmp/mountoutput; fi
|
||||
cmd:mount |sort > /tmp/mountoutput/file.org
|
||||
cmd:cat /tmp/mountoutput/file.org
|
||||
@ -50,6 +45,7 @@ cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-ne
|
||||
check:rc==0
|
||||
check:output=~Provision node\(s\)\: $$CN
|
||||
|
||||
cmd:if [[ -f /var/lib/dhcp/db/dhcpd.leases ]]; then cat /var/lib/dhcp/db/dhcpd.leases; elif [[ -f /var/lib/dhcpd/dhcpd.leases ]];then cat /var/lib/dhcpd/dhcpd.leases;elif [[ -f /var/lib/dhcp/dhcpd.leases ]];then cat /var/lib/dhcp/dhcpd.leases; fi
|
||||
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
|
||||
|
||||
@ -73,4 +69,9 @@ check:output=~64 bytes from $$CN
|
||||
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
|
||||
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
|
||||
cmd:xdsh $$CN "cat /tmp/test.synclist"
|
||||
check:rc==0
|
||||
cmd:if [[ -f /tmp/test.synclist.bak ]] ;then mv -f /tmp/test.synclist.bak /tmp/test.synclist;else rm -rf /tmp/test.synclist;fi
|
||||
cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute synclists=
|
||||
check:rc==0
|
||||
end
|
||||
|
@ -1,8 +1,14 @@
|
||||
start:reg_linux_diskless_installation_hierarchy
|
||||
os:Linux
|
||||
|
||||
cmd:chdef -t node -o $$CN servicenode=$$SN monserver=$$SN nfsserver=$$SN tftpserver=$$SN xcatmaster=$$SN
|
||||
cmd:xdsh $$SN fdisk -l
|
||||
cmd:xdsh $$SN df -T
|
||||
cmd:xdsh $$SN "echo "test"> /test.hierarchy"
|
||||
check:rc==0
|
||||
cmd:xdsh $$SN cat /test.hierarchy
|
||||
check:rc==0
|
||||
check:output=~test
|
||||
cmd:output=$(xdsh $$SN ls -al / |grep test.hierarchy);if [[ $? -eq 0 ]];then xdsh $$SN rm -rf /test.hierarchy;fi
|
||||
cmd:chdef -t node -o $$CN servicenode=$$SN monserver=$$SN nfsserver=$$SN tftpserver=$$SN xcatmaster=$$SN
|
||||
cmd:chdef -t node $$SN groups=service,all
|
||||
check:rc==0
|
||||
|
||||
@ -23,18 +29,13 @@ cmd:service dhcpd restart
|
||||
check:rc==0
|
||||
cmd:a=0;while true; do [ $a -eq 100 ] && exit 1;output=$(makedhcp -q $$CN);[ $? -ne 0 ] && exit 1;echo $output|grep $$CN 2>/dev/null && exit 0;a=$[$a+1];sleep 1;done
|
||||
check:rc==0
|
||||
|
||||
cmd:copycds $$ISO
|
||||
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;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)__-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
|
||||
cmd:if [[ -f /tmp/test.synclist ]] ;then mv -f /tmp/test.synclist /tmp/test.synclist.bak;fi;
|
||||
cmd:echo "/tmp/test.synclist -> /tmp/test.synclist" > /tmp/test.synclist;chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute synclists=/tmp/test.synclist
|
||||
check:rc==0
|
||||
cmd:updatenode $$CN -f
|
||||
check:rc==0
|
||||
@ -48,6 +49,7 @@ cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-ne
|
||||
check:rc==0
|
||||
check:output=~Provision node\(s\)\: $$CN
|
||||
|
||||
cmd:xdsh $$SN "if [[ -f /var/lib/dhcp/db/dhcpd.leases ]]; then cat /var/lib/dhcp/db/dhcpd.leases; elif [[ -f /var/lib/dhcpd/dhcpd.leases ]];then cat /var/lib/dhcpd/dhcpd.leases;elif [[ -f /var/lib/dhcp/dhcpd.leases ]];then cat /var/lib/dhcp/dhcpd.leases; fi"
|
||||
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
|
||||
|
||||
@ -66,4 +68,9 @@ check:output=~on / type tmpfs
|
||||
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
|
||||
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
|
||||
cmd:xdsh $$CN "cat /tmp/test.synclist"
|
||||
check:rc==0
|
||||
cmd:if [[ -f /tmp/test.synclist.bak ]] ;then mv -f /tmp/test.synclist.bak /tmp/test.synclist;else rm -rf /tmp/test.synclist;fi
|
||||
cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute synclists=
|
||||
check:rc==0
|
||||
end
|
||||
|
@ -1,5 +1,7 @@
|
||||
start:reg_linux_statelite_installation_flat
|
||||
os:Linux
|
||||
cmd:fdisk -l
|
||||
cmd:df -T
|
||||
|
||||
cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN
|
||||
check:rc==0
|
||||
@ -46,13 +48,6 @@ 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
|
||||
@ -62,6 +57,7 @@ cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-st
|
||||
check:rc==0
|
||||
check:output=~Provision node\(s\)\: $$CN
|
||||
|
||||
cmd:if [[ -f /var/lib/dhcp/db/dhcpd.leases ]]; then cat /var/lib/dhcp/db/dhcpd.leases; elif [[ -f /var/lib/dhcpd/dhcpd.leases ]];then cat /var/lib/dhcpd/dhcpd.leases;elif [[ -f /var/lib/dhcp/dhcpd.leases ]];then cat /var/lib/dhcp/dhcpd.leases; fi
|
||||
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
|
||||
|
||||
@ -79,6 +75,9 @@ check:rc==0
|
||||
check:output=~/nodedata/$$CN on /.statelite/persistent
|
||||
check:output=~compute/rootimg on / type nfs
|
||||
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
|
||||
cmd:xdsh $$CN "echo "test"> /test.statelite"
|
||||
check:rc!=0
|
||||
cmd:output=$(xdsh $$CN ls -al / |grep test.statelite);if [[ $? -eq 0 ]];then xdsh $$CN rm -rf /test.tatelite;fi
|
||||
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
|
||||
|
||||
@ -93,7 +92,7 @@ cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-st
|
||||
check:rc==0
|
||||
check:output=~Provision node\(s\)\: $$CN
|
||||
|
||||
|
||||
cmd:if [[ -f /var/lib/dhcp/db/dhcpd.leases ]]; then cat /var/lib/dhcp/db/dhcpd.leases; elif [[ -f /var/lib/dhcpd/dhcpd.leases ]];then cat /var/lib/dhcpd/dhcpd.leases;elif [[ -f /var/lib/dhcp/dhcpd.leases ]];then cat /var/lib/dhcp/dhcpd.leases; fi
|
||||
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
|
||||
|
||||
@ -115,6 +114,9 @@ cmd:ping $$CN -c 3
|
||||
check:rc==0
|
||||
check:output=~64 bytes from $$CN
|
||||
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
|
||||
cmd:xdsh $$CN "echo "test"> /test.statelite"
|
||||
check:rc!=0
|
||||
cmd:output=$(xdsh $$CN ls -al / |grep test.statelite);if [[ $? -eq 0 ]];then xdsh $$CN rm -rf /test.tatelite;fi
|
||||
cmd:rm -rf /tmp/image;mkdir /tmp/image
|
||||
check:rc==0
|
||||
cmd:imgexport __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute /tmp/image/image.tgz
|
||||
|
@ -1,6 +1,13 @@
|
||||
start:reg_linux_statelite_installation_hierarchy_by_nfs
|
||||
os:Linux
|
||||
|
||||
cmd:xdsh $$SN fdisk -l
|
||||
cmd:xdsh $$SN df -T
|
||||
cmd:xdsh $$SN "echo "test"> /test.hierarchy"
|
||||
check:rc==0
|
||||
cmd:xdsh $$SN cat /test.hierarchy
|
||||
check:rc==0
|
||||
check:output=~test
|
||||
cmd:output=$(xdsh $$SN ls -al / |grep test.hierarchy);if [[ $? -eq 0 ]];then xdsh $$SN rm -rf /test.hierarchy;fi
|
||||
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
|
||||
@ -17,7 +24,6 @@ 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
|
||||
@ -52,13 +58,6 @@ 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
|
||||
@ -70,6 +69,7 @@ cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-st
|
||||
check:rc==0
|
||||
check:output=~Provision node\(s\)\: $$CN
|
||||
|
||||
cmd:xdsh $$SN "if [[ -f /var/lib/dhcp/db/dhcpd.leases ]]; then cat /var/lib/dhcp/db/dhcpd.leases; elif [[ -f /var/lib/dhcpd/dhcpd.leases ]];then cat /var/lib/dhcpd/dhcpd.leases;elif [[ -f /var/lib/dhcp/dhcpd.leases ]];then cat /var/lib/dhcp/dhcpd.leases; fi"
|
||||
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
|
||||
|
||||
@ -87,6 +87,9 @@ check:rc==0
|
||||
check:output=~/nodedata/$$CN on /.statelite/persistent
|
||||
check:output=~compute/rootimg on / type nfs
|
||||
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
|
||||
cmd:xdsh $$CN "echo "test"> /test.statelite"
|
||||
check:rc!=0
|
||||
cmd:output=$(xdsh $$CN ls -al / |grep test.statelite);if [[ $? -eq 0 ]];then xdsh $$CN rm -rf /test.tatelite;fi
|
||||
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
|
||||
|
@ -1,6 +1,13 @@
|
||||
start:reg_linux_statelite_installation_hierarchy_by_ramdisk
|
||||
os:Linux
|
||||
|
||||
cmd:xdsh $$SN fdisk -l
|
||||
cmd:xdsh $$SN df -T
|
||||
cmd:xdsh $$SN "echo "test"> /test.hierarchy"
|
||||
check:rc==0
|
||||
cmd:xdsh $$SN cat /test.hierarchy
|
||||
check:rc==0
|
||||
check:output=~test
|
||||
cmd:output=$(xdsh $$SN ls -al / |grep test.hierarchy);if [[ $? -eq 0 ]];then xdsh $$SN rm -rf /test.hierarchy;fi
|
||||
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
|
||||
@ -17,7 +24,6 @@ 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
|
||||
@ -51,14 +57,6 @@ 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: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
|
||||
@ -73,6 +71,7 @@ cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-st
|
||||
check:rc==0
|
||||
check:output=~Provision node\(s\)\: $$CN
|
||||
|
||||
cmd:xdsh $$SN "if [[ -f /var/lib/dhcp/db/dhcpd.leases ]]; then cat /var/lib/dhcp/db/dhcpd.leases; elif [[ -f /var/lib/dhcpd/dhcpd.leases ]];then cat /var/lib/dhcpd/dhcpd.leases;elif [[ -f /var/lib/dhcp/dhcpd.leases ]];then cat /var/lib/dhcp/dhcpd.leases; fi"
|
||||
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
|
||||
|
||||
@ -90,6 +89,9 @@ check:rc==0
|
||||
check:output=~/nodedata/$$CN on /.statelite/persistent
|
||||
check:output=~rootfs on / type
|
||||
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
|
||||
cmd:xdsh $$CN "echo "test"> /test.statelite"
|
||||
check:rc!=0
|
||||
cmd:output=$(xdsh $$CN ls -al / |grep test.statelite);if [[ $? -eq 0 ]];then xdsh $$CN rm -rf /test.tatelite;fi
|
||||
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
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user