From cef55779ce2fe3ba49b2fc52a70d42f433917e8c Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 12 Oct 2016 10:46:52 -0400 Subject: [PATCH] Suppress some messages to be only in verbose mode and skip node objects of type switch --- xCAT-probe/subcmds/image | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/xCAT-probe/subcmds/image b/xCAT-probe/subcmds/image index f7a26745a..b1df32420 100755 --- a/xCAT-probe/subcmds/image +++ b/xCAT-probe/subcmds/image @@ -153,11 +153,16 @@ foreach (@all_nodes_provmethod_lines) { print "Node $node_name has defined image $node_osimage_name at $rootimagedir with UUID $defined_UUID\n" if ($VERBOSE); } else { - probe_utils->send_msg("$output", "w", "$node_name is not diskless. No image consistency verification will be performed."); + probe_utils->send_msg("$output", "w", "$node_name is not diskless. No image consistency verification will be performed.") if ($VERBOSE); } } else { - probe_utils->send_msg("$output", "w", "$node_name has no provision method defined. No image consistency verification will be performed."); + my $nodetype = `lsdef -i nodetype -c $node_name`; + my ($node, $type) = split "=", $nodetype; + # If node object happens to be switch, do not display this warning message + unless ($type =~ /switch/) { + probe_utils->send_msg("$output", "w", "$node_name has no provision method defined. No image consistency verification will be performed.") if ($VERBOSE); + } } } @@ -204,7 +209,7 @@ if ((scalar(@pingable_nodes) == 1) && ($CONSISTENCY_CHECK)) { # There was only one node in noderange and comparison check was requested. # Nothing to compare the single node to. - probe_utils->send_msg("$output", "w", "Comparison check for a single diskless pingable node will not be performed. Minimum of 2 nodes are needed for that."); + probe_utils->send_msg("$output", "w", "Comparison check for a single diskless pingable node $pingable_nodes[0] will not be performed.\nMinimum of 2 nodes are needed for that."); exit 1; }