additional fix for 3552171, xdcp should not be syncing the synclist, if the node is not hierarchical

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@13406 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
lissav
2012-08-02 13:35:08 +00:00
parent f914f11de9
commit 581a5d3757

View File

@@ -4219,28 +4219,30 @@ sub parse_and_run_dcp
$rc =
&parse_rsync_input_file_on_MN(\@nodelist, \%options, $syncfile,
$::SYNCSN, $synfiledir);
# build a temporary syncfile for the node's synclist
# we need to make sure the latest is on the servicenode
# for running of the syncfiles postscript, which only pulls
# from the service node
my $tmpsyncfile="/tmp/xdcpsynclist.$$";
my $syncline = "$syncfile -> $syncfile";
open(FILE, ">$tmpsyncfile")
or die "cannot open file $tmpsyncfile\n";
print FILE " $syncline";
close FILE;
# now put the original syncfile on the queue to sync to the SN's
$rc =
&parse_rsync_input_file_on_MN(\@nodelist, \%options, $tmpsyncfile,
$::SYNCSN, $synfiledir);
# cleanup
my $cmd = "rm $tmpsyncfile";
my @output = xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)
{
if ($::SYNCSN ==1) { # syncing a servicenode
# build a temporary syncfile for the node's synclist
# we need to make sure the latest is on the servicenode
# for running of the syncfiles postscript, which only pulls
# from the service node
my $tmpsyncfile="/tmp/xdcpsynclist.$$";
my $syncline = "$syncfile -> $syncfile";
open(FILE, ">$tmpsyncfile")
or die "cannot open file $tmpsyncfile\n";
print FILE " $syncline";
close FILE;
# now put the original syncfile on the queue to sync to the SN's
$rc =
&parse_rsync_input_file_on_MN(\@nodelist, \%options,
$tmpsyncfile, $::SYNCSN, $synfiledir);
# cleanup
my $cmd = "rm $tmpsyncfile";
my @output = xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)
{
my $rsp = {};
$rsp->{data}->[0] = "Command: $cmd failed.";
xCAT::MsgUtils->message("E", $rsp, $::CALLBACK);
}
}
}