From b1c7d3d59d4888c8f7f2fd90b880d8e24a84d5d8 Mon Sep 17 00:00:00 2001 From: linggao Date: Fri, 27 Apr 2012 18:05:46 +0000 Subject: [PATCH] fixed a defect when snmove failed if the source service node is down. defect 3487610 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@12378 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/snmove.pm | 14 ++++++-------- xCAT/postscripts/xcatdsklspost | 25 ++++++++++++++----------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/snmove.pm b/xCAT-server/lib/xcat/plugins/snmove.pm index 8110a69bb..b97e74022 100644 --- a/xCAT-server/lib/xcat/plugins/snmove.pm +++ b/xCAT-server/lib/xcat/plugins/snmove.pm @@ -1011,12 +1011,11 @@ sub process_request }, $sub_req, 0, 1 ); + my $rsp; + $rsp->{data}=$ret; + xCAT::MsgUtils->message("I", $rsp, $callback); if ($::RUNCMD_RC != 0) { - my $rsp; - push @{$rsp->{data}}, - "Could not run the nodeset command.\n"; - xCAT::MsgUtils->message("E", $rsp, $callback); $error++; } } @@ -1031,12 +1030,11 @@ sub process_request }, $sub_req, 0, 1 ); + my $rsp; + $rsp->{data}=$ret; + xCAT::MsgUtils->message("I", $rsp, $callback); if ($::RUNCMD_RC != 0) { - my $rsp; - push @{$rsp->{data}}, - "Could not run the nodeset command.\n"; - xCAT::MsgUtils->message("E", $rsp, $callback); $error++; } } diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index caa32373f..60292e971 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -144,17 +144,6 @@ if [ "$MODE" = "4" ]; then # for statelite mode fi else # for common mode downloaded=0; - #open the xcatinfo file to look for the master if it is not set - if [ -f /opt/xcat/xcatinfo ]; then - SIP=`grep 'XCATSERVER' /opt/xcat/xcatinfo |cut -d= -f2` - if [ -n "$SIP" ]; then - download_postscripts $SIP - if [ $? -eq 0 ]; then - downloaded=1 - fi - fi - fi - #try the -m if it is specified, -m is passed in the updatenode command if [ $downloaded -eq 0 ]; then if [ "XX$P_SIP" != "XX" ]; then @@ -165,6 +154,20 @@ else # for common mode fi fi fi + + #open the xcatinfo file to look for the master if it is not set + if [ $downloaded -eq 0 ]; then + if [ -f /opt/xcat/xcatinfo ]; then + SIP=`grep 'XCATSERVER' /opt/xcat/xcatinfo |cut -d= -f2` + if [ -n "$SIP" ]; then + download_postscripts $SIP + if [ $? -eq 0 ]; then + downloaded=1 + fi + fi + fi + fi + #try the dhcp server, this is used for initial boot for the node. if [ $downloaded -eq 0 ]; then