From 90be98a1b710c894333e6d4b64346d8028a8ae28 Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 1 Nov 2012 12:38:30 +0000 Subject: [PATCH] put back code to fix up failed/success nodes git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14198 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/updatenode.pm | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/updatenode.pm b/xCAT-server/lib/xcat/plugins/updatenode.pm index 78f20612a..0331c50dd 100644 --- a/xCAT-server/lib/xcat/plugins/updatenode.pm +++ b/xCAT-server/lib/xcat/plugins/updatenode.pm @@ -1441,7 +1441,7 @@ sub updatenodesyncfiles my @failednodes=(); #array of successfully synced nodes my @successfulnodes=(); - + my $numberofsynclists=0; # Check the existence of the synclist file if (%syncfile_node) { # there are files to sync defined @@ -1461,6 +1461,7 @@ sub updatenodesyncfiles my $output; foreach my $synclist (keys %syncfile_node) { + $numberofsynclists++; if ($::VERBOSE) { my $rsp = {}; @@ -1530,7 +1531,23 @@ sub updatenodesyncfiles } } } - + # if we have more than 1 synclist file, then we need + # to fix up the list of what failed and what succeeded + # If either failed the node is marked failed + if ($numberofsynclists > 1) { + my %m=(); + my %n=(); + + for(@failednodes) + { + $m{$_}++; + } + for(@successfulnodes) + { + $m{$_}++ || $n{$_}++; + } + @successfulnodes=keys %n; + } #set the nodelist.updatestatus according to the xdcp result if(@successfulnodes) {