From c6695267b6e6bafd490bb73e6397e5993d702635 Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 2 Aug 2012 13:59:14 +0000 Subject: [PATCH] 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/trunk@13407 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/DSHCLI.pm | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/perl-xCAT/xCAT/DSHCLI.pm b/perl-xCAT/xCAT/DSHCLI.pm index fd8e409b7..047546751 100644 --- a/perl-xCAT/xCAT/DSHCLI.pm +++ b/perl-xCAT/xCAT/DSHCLI.pm @@ -4334,27 +4334,29 @@ sub parse_and_run_dcp &parse_rsync_input_file_on_MN(\@nodelist, \%options, $syncfile, $::SYNCSN, $synfiledir,$nodesyncfiledir); # 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, + if ($::SYNCSN ==1) { # syncing a servicenode + # 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,$nodesyncfiledir); - # cleanup - my $cmd = "rm $tmpsyncfile"; - my @output = xCAT::Utils->runcmd($cmd, 0); - if ($::RUNCMD_RC != 0) - { + # 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); + } } }