From ac46bc68330bd07817395f1a1875019a3fc04a49 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Wed, 20 Dec 2017 14:47:00 -0500 Subject: [PATCH] Print a warning message if running eventlog resolution across a range --- xCAT-server/lib/xcat/plugins/openbmc.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 1c95748dc..4fa30a14b 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -1067,9 +1067,6 @@ sub parse_args { return ([ 1, "Unsupported command: $command $subcommand" ]); } } elsif ($command eq "reventlog") { - # - # TODO, resolved should NOT be supported if range is provided - # $subcommand = "all" if (!defined($ARGV[0])); if ($subcommand =~ /^(\w+)=(.*)/) { my $key = $1; @@ -1078,6 +1075,11 @@ sub parse_args { return ([ 1, "$usage_errormsg $reventlog_no_id_resolved_errormsg" ]); } + my $nodes_num = @$noderange; + if (@$noderange > 1) { + xCAT::SvrUtils::sendmsg("WARN: Resolving faults over a xCAT noderange is not recommended.", $callback); + } + xCAT::SvrUtils::sendmsg("Attempting to resolve the following log entries: $value...", $callback); my @entries = split(',', $value); # take the first element from the list