From ff0ce0cc3841fb7b65dec6e9c75446cadb7c55bc Mon Sep 17 00:00:00 2001 From: caomengmeng Date: Fri, 20 May 2016 04:34:49 -0400 Subject: [PATCH 1/4] complete --- .../autotest/testcase/migration/ubuntule_migration1_p8le | 4 ++-- xCAT-test/autotest/testcase/migration/ubuntux_migration1_vm | 3 ++- xCAT-test/autotest/testcase/migration/ubuntux_migration2_vm | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/xCAT-test/autotest/testcase/migration/ubuntule_migration1_p8le b/xCAT-test/autotest/testcase/migration/ubuntule_migration1_p8le index 4f8dedf11..27a678fa9 100644 --- a/xCAT-test/autotest/testcase/migration/ubuntule_migration1_p8le +++ b/xCAT-test/autotest/testcase/migration/ubuntule_migration1_p8le @@ -18,8 +18,8 @@ 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:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 300 ];then break;fi done +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 cmd:lsdef -l $$CN | grep status diff --git a/xCAT-test/autotest/testcase/migration/ubuntux_migration1_vm b/xCAT-test/autotest/testcase/migration/ubuntux_migration1_vm index a9aeea6aa..39dc90627 100644 --- a/xCAT-test/autotest/testcase/migration/ubuntux_migration1_vm +++ b/xCAT-test/autotest/testcase/migration/ubuntux_migration1_vm @@ -17,7 +17,8 @@ cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-ins check:rc==0 cmd:rpower $$CN boot check:rc==0 -cmd:sleep 3000 +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 cmd:lsdef -l $$CN | grep status diff --git a/xCAT-test/autotest/testcase/migration/ubuntux_migration2_vm b/xCAT-test/autotest/testcase/migration/ubuntux_migration2_vm index bc16ee2c8..cfa2f11b4 100644 --- a/xCAT-test/autotest/testcase/migration/ubuntux_migration2_vm +++ b/xCAT-test/autotest/testcase/migration/ubuntux_migration2_vm @@ -17,7 +17,8 @@ cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-ins check:rc==0 cmd:rpower $$CN boot check:rc==0 -cmd:sleep 3000 +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 cmd:lsdef -l $$CN | grep status From 33bcae42d0d03829b4caa765e80e44c564b01698 Mon Sep 17 00:00:00 2001 From: caomengmeng Date: Fri, 20 May 2016 04:57:26 -0400 Subject: [PATCH 2/4] 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 From a8d0293b89dea5f6d4cd91336a0022e868a62a75 Mon Sep 17 00:00:00 2001 From: caomengmeng Date: Fri, 20 May 2016 09:23:52 -0400 Subject: [PATCH 3/4] change sleep type --- .../testcase/installation/reg_linux_SN_installation_hierarchy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_SN_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_SN_installation_hierarchy index c7ed81bb0..a5ec315bc 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_SN_installation_hierarchy +++ b/xCAT-test/autotest/testcase/installation/reg_linux_SN_installation_hierarchy @@ -67,8 +67,8 @@ check:rc==0 cmd:if [[ "__GETNODEATTR($$SN,arch)__" =~ "ppc64" ]]; then rnetboot $$SN;elif [[ "__GETNODEATTR($$SN,arch)__" =~ "x86_64" ]];then rpower $$SN boot; fi check:rc==0 -cmd:sleep 1800 -cmd:a=0;while ! `lsdef -l $$SN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 400 ];then break;fi done +cmd:sleep 600 +cmd:a=0;while ! `lsdef -l $$SN|grep status|grep booted >/dev/null`; do sleep 60;((a++));if [ $a -gt 70 ];then break;fi done cmd:ping $$SN -c 3 check:rc==0 From 3797cd99d8ecd0e983abcb40c2120ffdfeb5284d Mon Sep 17 00:00:00 2001 From: caomengmeng Date: Tue, 24 May 2016 04:58:44 -0400 Subject: [PATCH 4/4] update xCATreg --- xCAT-server/share/xcat/tools/xCATreg | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/tools/xCATreg b/xCAT-server/share/xcat/tools/xCATreg index 879790209..04b79c024 100755 --- a/xCAT-server/share/xcat/tools/xCATreg +++ b/xCAT-server/share/xcat/tools/xCATreg @@ -298,7 +298,11 @@ sub mn_install { &runcmd("makedhcp -n"); &runcmd("makedns -n"); &runcmd("chdef $confkeys{$mn} status="); - &runcmd("lsdef -l $confkeys{$mn}|grep status"); + if($?){ + send_msg(0, "[$mn->$confkeys{$mn}][mn_install] Failed to change MN status in current control node"); + return 1; + } + &runcmd("nodeset $confkeys{$mn} osimage=$osimage"); if( $arch =~ /x86_64/ || $arch =~ /ppc64le/ || $arch =~ /ppc64el/){