From 9fbd3e21eba634a815b65cbea1603987e49b21bc Mon Sep 17 00:00:00 2001 From: bybai Date: Thu, 20 Aug 2015 02:51:12 -0400 Subject: [PATCH] fix : updatestatus is not correct when -F run with -P and -S --- xCAT-server/lib/xcat/plugins/updatenode.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/updatenode.pm b/xCAT-server/lib/xcat/plugins/updatenode.pm index 2909e1294..50d9d4e25 100644 --- a/xCAT-server/lib/xcat/plugins/updatenode.pm +++ b/xCAT-server/lib/xcat/plugins/updatenode.pm @@ -1375,6 +1375,12 @@ sub updatenode xCAT::TableUtils->setUpdateStatus(\@::FAILEDNODES, $stat); } + if(!(@::SUCCESSFULLNODES || @::FAILEDNODES) && $::NOSYNCFILE) + { + my $stat="synced"; + xCAT::TableUtils->setUpdateStatus(\@$nodes,$stat); + } + } # if site.precreatemypostscripts = not 1 or yes or undefined, # remove all the @@ -1607,6 +1613,7 @@ sub updatenodesyncfiles my $localhostname = hostname(); my %syncfile_node = (); my %syncfile_rootimage = (); + $::NOSYNCFILE=0; # if running -P or -S do not report or no status requested if ((defined($request->{status})) && ($request->{status} eq "yes")) { # status requested if (($request->{rerunps} && $request->{rerunps}->[0] eq "yes") || @@ -1727,8 +1734,9 @@ sub updatenodesyncfiles $rsp->{data}->[0] = "There were no syncfiles defined to process. File synchronization has completed."; $callback->($rsp); - my $stat="synced"; - xCAT::TableUtils->setUpdateStatus(\@$nodes, $stat); + #my $stat="synced"; + #xCAT::TableUtils->setUpdateStatus(\@$nodes, $stat); + $::NOSYNCFILE=1; } # report final status PCM