From 0d46150fcc154605361e08a56540c56c723ef27d Mon Sep 17 00:00:00 2001 From: nott Date: Wed, 29 Aug 2012 19:02:31 +0000 Subject: [PATCH] fix the copying of client_data files git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@13643 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/snmove.pm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/snmove.pm b/xCAT-server/lib/xcat/plugins/snmove.pm index b5ca6be8c..e19c4cd72 100644 --- a/xCAT-server/lib/xcat/plugins/snmove.pm +++ b/xCAT-server/lib/xcat/plugins/snmove.pm @@ -869,7 +869,8 @@ sub process_request my %SRloc; foreach my $n (@nodes) { my $osimage = $nhash{$n}{'provmethod'}; - my ($sn, $junk) = split(/,/, $nhash{$n}{'servicenode'}); + # get the new primary SN + my ($sn, $junk) = split(/,/, $sn_hash{$n}{'servicenode'}); # $sn is name of SN as known by management node @@ -906,6 +907,12 @@ sub process_request # get a list of files from the backup dir my $rcmd = qq~/usr/bin/ls $bkloc 2>/dev/null~; + if ($::VERBOSE) { + my $rsp; + push @{$rsp->{data}}, "Running \'$rcmd\' on $s\n"; + xCAT::MsgUtils->message("I", $rsp, $callback); + } + my $rlist = xCAT::InstUtils->xcmd($callback, $sub_req, "xdsh", $s, $rcmd, 0); if ($::RUNCMD_RC != 0) @@ -940,7 +947,13 @@ sub process_request } my $ccmd=qq~/usr/bin/cp -p -r $filestring $cdloc 2>/dev/null~; - my $output = xCAT::InstUtils->xcmd($callback, $sub_req, "xdsh", $s, $rcmd, 0); + if ($::VERBOSE) { + my $rsp; + push @{$rsp->{data}}, "Copying files from $bkloc to $cdloc on $s.\n"; + xCAT::MsgUtils->message("I", $rsp, $callback); + } + + my $output = xCAT::InstUtils->xcmd($callback, $sub_req, "xdsh", $s, $ccmd, 0); if ($::RUNCMD_RC != 0) { my $rsp;