2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 09:13:08 +00:00

modify makehosts and statelite case

This commit is contained in:
junxiawang 2017-05-04 09:04:50 -04:00
parent 410c5a2249
commit 3a46aec39f
3 changed files with 1 additions and 6 deletions

View File

@ -114,9 +114,6 @@ 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

View File

@ -89,9 +89,6 @@ 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

View File

@ -134,6 +134,7 @@ cmd:lsdef s01r1b01;if [ $? -eq 0 ]; then lsdef -l s01r1b01 -z >/tmp/s01r1b01.sta
check:rc==0
cmd:nodeadd s01 groups=service; chdef s01 ip=70.2.0.254;nodeadd s01r1b01 groups=compute; chdef s01r1b01 ip=80.2.0.254;makehosts
check:rc==0
cmd:sleep 20
cmd:rc1=`cat /etc/hosts | grep "70.2.0.254" | grep s01`;rc2=`cat /etc/hosts | grep "80.2.0.254" | grep s01r1b01`;if [[ $rc1 =~ "70.2.0.254 s01" ]] && [[ $rc2 =~ "80.2.0.254 s01r1b01" ]];then exit 0;else exit 1;fi
check:rc==0
cmd:makehosts s01