From 45255ab48c30ce1c840e6121b84dbaae02f57999 Mon Sep 17 00:00:00 2001 From: XuWei Date: Thu, 27 Apr 2017 02:33:19 -0400 Subject: [PATCH] fix issue 2948, add bmc specific for rpower in usage & return if got error for ipmi mgt --- perl-xCAT/xCAT/Usage.pm | 3 +++ xCAT-server/lib/xcat/plugins/ipmi.pm | 1 + 2 files changed, 4 insertions(+) diff --git a/perl-xCAT/xCAT/Usage.pm b/perl-xCAT/xCAT/Usage.pm index 0cbba194a..049df54bd 100755 --- a/perl-xCAT/xCAT/Usage.pm +++ b/perl-xCAT/xCAT/Usage.pm @@ -26,6 +26,9 @@ my %usage = ( "rpower" => "Usage: rpower [--nodeps] [on|onstandby|off|suspend|reset|stat|state|boot] [-V|--verbose] [-m table.colum==expectedstatus][-m table.colum==expectedstatus...] [-r ] [-t ] rpower [-h|--help|-v|--version] + BMC (using IPMI) specific: + rpower noderange [on|off|softoff|reset|boot|stat|state|status|wake|suspend [-w timeout] [-o] [-r]] + rpower noderange [pduon|pduoff|pdustat] OpenBMC specific: rpower noderange [on|off|reset|boot|stat|state|status] KVM Virtualization specific: diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm index 00302d365..fd35a443d 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm @@ -2510,6 +2510,7 @@ sub power_response { my $text = $codes{ $rsp->{code} }; unless ($text) { $text = sprintf("Unknown response %02xh", $rsp->{code}); } xCAT::SvrUtils::sendmsg([ 1, $text ], $callback, $sessdata->{node}, %allerrornodes); + return; } else { my $command = $sessdata->{subcommand}; my $status = $sessdata->{powerstatus};