2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 17:46:38 +00:00

Merge pull request #6595 from gurevichmark/add_go_xcat_testcases4

Improve install script and testcases
This commit is contained in:
besawn 2020-02-27 14:48:03 -05:00 committed by GitHub
commit 79999e7e89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 21 additions and 31 deletions

View File

@ -305,6 +305,3 @@ xcatstanzafile_objtype
xcatstanzafile_specificvalue
xcatstanzafile_tab
go_xcat_devel_from_repo
go_xcat_stable_from_repo
go_xcat_stable_from_repo_upgrade
go_xcat_stable_from_repo_reinstall_devel

View File

@ -304,6 +304,3 @@ xcatstanzafile_objtype
xcatstanzafile_specificvalue
xcatstanzafile_tab
go_xcat_devel_from_repo
go_xcat_stable_from_repo
go_xcat_stable_from_repo_upgrade
go_xcat_stable_from_repo_reinstall_devel

View File

@ -249,6 +249,3 @@ xcatstanzafile_objtype
xcatstanzafile_specificvalue
xcatstanzafile_tab
go_xcat_devel_from_repo
go_xcat_stable_from_repo
go_xcat_stable_from_repo_upgrade
go_xcat_stable_from_repo_reinstall_devel

View File

@ -248,6 +248,3 @@ xcatstanzafile_objtype
xcatstanzafile_specificvalue
xcatstanzafile_tab
go_xcat_devel_from_repo
go_xcat_stable_from_repo
go_xcat_stable_from_repo_upgrade
go_xcat_stable_from_repo_reinstall_devel

View File

@ -228,7 +228,3 @@ xdsh_permission_denied
xdsh_q
xdsh_regular_command
xdsh_t
go_xcat_devel_from_repo
go_xcat_stable_from_repo
go_xcat_stable_from_repo_upgrade
go_xcat_stable_from_repo_reinstall_devel

View File

@ -228,7 +228,3 @@ xdsh_permission_denied
xdsh_q
xdsh_regular_command
xdsh_t
go_xcat_devel_from_repo
go_xcat_stable_from_repo
go_xcat_stable_from_repo_upgrade
go_xcat_stable_from_repo_reinstall_devel

View File

@ -5,25 +5,30 @@ declare -i a=0
declare -i tryreinstall=1
node=$1
osimage=$2
vmhost=`lsdef $node -i vmhost -c | cut -d '=' -f 2`
if [ $# -eq 3 ];
then
times=$3+1
echo "Try to retry rinstall $3 times ......"
echo "Try to rinstall for $3 times ......"
else
times=6
echo "Try to retry rinstall 5 times ......"
echo "Try to rinstall for 5 times ......"
fi
for (( tryreinstall = 1 ; tryreinstall < $times ; ++tryreinstall ))
do
echo "Try to install $node on the $tryreinstall time..."
echo "[$tryreinstall] Trying to install $node with $osimage ..."
echo "Memory on vmhost $vmhost"
ssh $vmhost free -g
echo "Active VMs on vmhost $vmhost"
ssh $vmhost virsh list
echo "rinstall $node osimage=$osimage"
rinstall $node osimage=$osimage
if [ $? != 0 ];then
echo "rinstall failed, double check xcat command rinstall to see if it is a bug..."
echo "rinstall command failed ..."
exit 1
fi
@ -32,7 +37,8 @@ do
while [ ! `lsdef -l $node|grep status|grep booted` ]
do
sleep 10
echo "The status is not booted..."
stat=`lsdef $node -i status -c | cut -d '=' -f 2`
echo "[$a] The status is not booted... ($stat)"
a=++a
if [ $a -gt 400 ];then
a=0
@ -53,7 +59,7 @@ do
echo "The canruncmd is $canruncmd"
if [[ $canruncmd -eq 0 && $tobooted -eq 0 && $pingable -eq 0 ]];then
echo "The provision succeed on the $tryreinstall time....."
echo "The provision succeeded on the $tryreinstall time....."
installsuccess=1
break
fi
@ -61,7 +67,7 @@ do
done
if [ $installsuccess -eq 1 ];then
echo "The provision succeed......"
echo "The provision succeeded......"
exit 0
else
echo "The provision failed......"

View File

@ -11,8 +11,9 @@ check:output=~booted
cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
check:rc==0
check:output=~Provision node\(s\)\: $$CN
cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 20; echo "[$a] " $(lsdef $$CN -i status -c); ((a++));if [ $a -gt 30 ];then break;fi done
cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 20; echo "[$a] " $(lsdef $$CN -i status -c); ((a++));if [ $a -gt 50 ];then break;fi done
cmd:lsdef -l $$CN | grep status
check:output=~booted
#Copy go-xcat script
cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./"
@ -43,8 +44,9 @@ check:output=~booted
cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
check:rc==0
check:output=~Provision node\(s\)\: $$CN
cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 20; echo "[$a] " $(lsdef $$CN -i status -c); ((a++));if [ $a -gt 30 ];then break;fi done
cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 20; echo "[$a] " $(lsdef $$CN -i status -c); ((a++));if [ $a -gt 50 ];then break;fi done
cmd:lsdef -l $$CN | grep status
check:output=~booted
#Copy go-xcat script
cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./"
@ -75,8 +77,9 @@ check:output=~booted
cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
check:rc==0
check:output=~Provision node\(s\)\: $$CN
cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 20; echo "[$a] " $(lsdef $$CN -i status -c); ((a++));if [ $a -gt 30 ];then break;fi done
cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 20; echo "[$a] " $(lsdef $$CN -i status -c); ((a++));if [ $a -gt 50 ];then break;fi done
cmd:lsdef -l $$CN | grep status
check:output=~booted
#Copy go-xcat script
cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./"
@ -117,8 +120,9 @@ check:output=~booted
cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
check:rc==0
check:output=~Provision node\(s\)\: $$CN
cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 20; echo "[$a] " $(lsdef $$CN -i status -c); ((a++));if [ $a -gt 30 ];then break;fi done
cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 20; echo "[$a] " $(lsdef $$CN -i status -c); ((a++));if [ $a -gt 50 ];then break;fi done
cmd:lsdef -l $$CN | grep status
check:output=~booted
#Copy go-xcat script
cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./"