From 10fdac457f0f475de13c3f48451b01068a0f9219 Mon Sep 17 00:00:00 2001 From: lissav Date: Tue, 10 Nov 2009 15:55:59 +0000 Subject: [PATCH] return error returns even though no messages git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4538 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/DSHCLI.pm | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/perl-xCAT/xCAT/DSHCLI.pm b/perl-xCAT/xCAT/DSHCLI.pm index 3c62f7b95..fe41ae12a 100644 --- a/perl-xCAT/xCAT/DSHCLI.pm +++ b/perl-xCAT/xCAT/DSHCLI.pm @@ -565,7 +565,7 @@ sub _execute_dsh delete $error_buffers{$user_target}; my $exit_code = $targets_buffered{$user_target}{'exit-code'}; - my $target_rc = ($targets_buffered{$user_target}{'target-rc'}) ? $targets_buffered{$user_target}{'target-rc'} : 0; + my $target_rc = $targets_buffered{$user_target}{'target-rc'}; my $rsp = {}; if ($exit_code != 0) @@ -3806,13 +3806,8 @@ sub parse_and_run_dsh #} # Execute the dsh command - xCAT::DSHCLI->execute_dsh(\%options); - #if ($::RUNCMD_RC) - #{ # error from dsh - # $rsp->{data}->[0] = "Error from xdsh. Return Code = $::RUNCMD_RC"; - # xCAT::MsgUtils->message("E", $rsp, $::CALLBACK, 1); - - #} + # number of nodes failed becomes the xdsh return code + $::FAILED_NODES = xCAT::DSHCLI->execute_dsh(\%options); } return (@results); }