From 6c93b03d94f2e3b271cae45ba4ef5a6d09a44a9c Mon Sep 17 00:00:00 2001 From: Bin Xu Date: Thu, 31 Aug 2017 10:51:08 +0800 Subject: [PATCH] Fix 3737, updatenode -F will return non-zero when some nodes are failed. (#3816) --- xCAT-server/lib/xcat/plugins/updatenode.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/updatenode.pm b/xCAT-server/lib/xcat/plugins/updatenode.pm index a81388bbc..f45d68689 100644 --- a/xCAT-server/lib/xcat/plugins/updatenode.pm +++ b/xCAT-server/lib/xcat/plugins/updatenode.pm @@ -1791,11 +1791,17 @@ sub updatenodesyncfiles if ($request->{SNFileSyncing}->[0] eq "yes") { my $rsp = {}; $rsp->{data}->[0] = "File synchronization has completed for service nodes."; + if (@::FAILEDNODES) { + $rsp->{errorcode}->[0] = 1; + } $callback->($rsp); } if ($request->{FileSyncing}->[0] eq "yes") { my $rsp = {}; $rsp->{data}->[0] = "File synchronization has completed for nodes."; + if (@::FAILEDNODES) { + $rsp->{errorcode}->[0] = 1; + } $callback->($rsp); } }