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

add xCATreg and installation cases

This commit is contained in:
caomengmeng 2016-05-20 04:57:26 -04:00
parent ff0ce0cc38
commit 33bcae42d0
3 changed files with 14 additions and 7 deletions

View File

@ -297,6 +297,8 @@ sub mn_install {
&runcmd("makedhcp -n");
&runcmd("makedns -n");
&runcmd("chdef $confkeys{$mn} status=");
&runcmd("lsdef -l $confkeys{$mn}|grep status");
&runcmd("nodeset $confkeys{$mn} osimage=$osimage");
if( $arch =~ /x86_64/ || $arch =~ /ppc64le/ || $arch =~ /ppc64el/){
@ -305,12 +307,15 @@ sub mn_install {
&runcmd("rnetboot $confkeys{$mn}");
}
if($mn !~ /ubuntu/){
&runcmd("sleep 300");
&runcmd("a=0;while ! `lsdef -l $confkeys{$mn}|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ \$a -gt 200 ];then break;fi done");}
else{
&runcmd("sleep 1800");
}
&runcmd("sleep 600");
&runcmd("a=0;while ! `lsdef -l $confkeys{$mn}|grep status|grep booted >/dev/null`; do sleep 30;((a++));if [ \$a -gt 100 ];then break;fi done");
# if($mn !~ /ubuntu/){
# &runcmd("sleep 300");
# &runcmd("a=0;while ! `lsdef -l $confkeys{$mn}|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ \$a -gt 200 ];then break;fi done");}
# else{
# &runcmd("sleep 1800");
# }
&runcmd("lsdef -l $confkeys{$mn}|grep status|grep booted >/dev/null");
if($?){

View File

@ -24,6 +24,8 @@ cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
cmd:packimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
cmd:chdef $$CN status=
check:rc==0
cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
cmd:if [[ "__GETNODEATTR($$CN,mgt)__" = "ipmi" ]]; then rsetboot $$CN net; fi

View File

@ -20,7 +20,7 @@ cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-ins
check:rc==0
cmd:rpower $$CN boot
check:rc==0
cmd:sleep 300
cmd:sleep 600
cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 60;((a++));if [ $a -gt 50 ];then break;fi done
cmd:ping $$CN -c 3
check:output=~64 bytes from $$CN