From 08443c20e0c714a78b491c50d0cbeb7f7a8442a1 Mon Sep 17 00:00:00 2001 From: XuWei Date: Wed, 22 Mar 2017 03:30:14 -0400 Subject: [PATCH] fix issue 2348, check error msg when run bmcdiscover --- xCAT-server/lib/xcat/plugins/bmcdiscover.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm index b593236fb..d05a44ef5 100644 --- a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm +++ b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm @@ -896,6 +896,11 @@ sub bmcdiscovery_ipmi { my $output = xCAT::Utils->runcmd("$icmd", -1); if ($output =~ $bmcstr) { + if ($output =~ /RAKP 2 message indicates an error : (.+)\nError: (.+)/) { + xCAT::MsgUtils->message("E", { data => ["$2: $1 for $ip"] }, $::CALLBACK); + return 1; + } + # The output contains System Power indicated the username/password is correct, then try to get MTMS if ($output =~ /System Power\s*:\s*\S*/) { my $mtm = '';