From 87edafb9250f33648f79464fc0843ebd3f4f99ba Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 9 May 2012 13:48:02 +0000 Subject: [PATCH] Have slpdiscover tolerate errors per managed target more gracefully git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12579 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/slpdiscover.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/slpdiscover.pm b/xCAT-server/lib/xcat/plugins/slpdiscover.pm index f97903d69..9e6ec7d62 100644 --- a/xCAT-server/lib/xcat/plugins/slpdiscover.pm +++ b/xCAT-server/lib/xcat/plugins/slpdiscover.pm @@ -151,7 +151,8 @@ sub do_blade_setup { } require xCAT_plugin::blade; my @cmds = qw/snmpcfg=enable sshcfg=enable textid=* initnetwork=*/; - my $result = xCAT_plugin::blade::clicmds( + my $result; + my $rc = eval { $result = xCAT_plugin::blade::clicmds( $nodename, $localuser, $localpass, @@ -160,6 +161,11 @@ sub do_blade_setup { curraddr=>$addr, defaultcfg=>1, cmds=>\@cmds ); + 1; + }; + if (not $rc) { + sendmsg([1,"Failed to set up Management module due to $@"],$callback,$nodename); + } if ($result) { if ($result->[0]) { sendmsg([$result->[0],$result->[2]],$callback,$nodename);