From 33bcae42d0d03829b4caa765e80e44c564b01698 Mon Sep 17 00:00:00 2001 From: caomengmeng Date: Fri, 20 May 2016 04:57:26 -0400 Subject: [PATCH] add xCATreg and installation cases --- xCAT-server/share/xcat/tools/xCATreg | 17 +++++++++++------ .../Diskless_installation_flat_p8_le | 2 ++ .../installation/Full_installation_flat_p8_le | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/xCAT-server/share/xcat/tools/xCATreg b/xCAT-server/share/xcat/tools/xCATreg index 2ad97c79f..879790209 100755 --- a/xCAT-server/share/xcat/tools/xCATreg +++ b/xCAT-server/share/xcat/tools/xCATreg @@ -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($?){ 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 0e95955f5..14d4d3ec5 100644 --- a/xCAT-test/autotest/testcase/installation/Diskless_installation_flat_p8_le +++ b/xCAT-test/autotest/testcase/installation/Diskless_installation_flat_p8_le @@ -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 diff --git a/xCAT-test/autotest/testcase/installation/Full_installation_flat_p8_le b/xCAT-test/autotest/testcase/installation/Full_installation_flat_p8_le index 579f583f9..4ff715634 100644 --- a/xCAT-test/autotest/testcase/installation/Full_installation_flat_p8_le +++ b/xCAT-test/autotest/testcase/installation/Full_installation_flat_p8_le @@ -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