From 879802ef9f6f82960e1c80d7615cc6f60794c419 Mon Sep 17 00:00:00 2001 From: lissav Date: Fri, 16 Nov 2012 13:25:07 +0000 Subject: [PATCH] continue to restructure git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14345 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/updatenode.pm | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/updatenode.pm b/xCAT-server/lib/xcat/plugins/updatenode.pm index 951cc9a05..8712ed610 100644 --- a/xCAT-server/lib/xcat/plugins/updatenode.pm +++ b/xCAT-server/lib/xcat/plugins/updatenode.pm @@ -1136,6 +1136,8 @@ sub updatenode #} # update the node status, this is done when -F -S -P are run + # make sure the nodes only appear in one array good or bad + &cleanstatusarrays; if(@::SUCCESSFULLNODES) { @@ -1505,8 +1507,6 @@ sub updatenodesyncfiles =head3 buildnodestatus - Takes the output of the updatenode run and builds a global array of successfull nodes and one of failed nodes and then outputs the remaining user info - If output null , then it just checks that the @::SUCCESSFULLNODES - does not contain @::FAILEDNODES and removes them if it does. Arguments: output,callback Globals @::SUCCESSFULLNODES, @::FAILEDNODES @@ -1545,7 +1545,21 @@ sub buildnodestatus $callback->($rsp); } } - #If a failed node is in the SUCCESSFULLNODES array remove it. + + return; +} +#------------------------------------------------------------------------------- +=head3 cleanstatusarrays + Makes sure no Failed nodes are in the successfull nodes list + Removes dups + Globals @::SUCCESSFULLNODES, @::FAILEDNODES + +=cut + + +#----------------------------------------------------------------------------- +sub cleanstatusarrays +{ my %m=(); my %n=(); @@ -1558,7 +1572,6 @@ sub buildnodestatus $m{$_}++ || $n{$_}++; } @::SUCCESSFULLNODES=keys %n; - return; } #-------------------------------------------------------------------------------