From 18c9cf84ab09d9566aa11f2b416282a6426243da Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 29 May 2012 16:03:51 +0000 Subject: [PATCH] Fix blade.pm tolerance in a way more targetted at discovery specifically git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12952 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/blade.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/blade.pm b/xCAT-server/lib/xcat/plugins/blade.pm index 473b688b7..10f39b35c 100644 --- a/xCAT-server/lib/xcat/plugins/blade.pm +++ b/xCAT-server/lib/xcat/plugins/blade.pm @@ -42,6 +42,7 @@ use xCAT::DBobjUtils; use Getopt::Long; use xCAT::SvrUtils; use xCAT::FSPUtils; +my $indiscover=0; sub handled_commands { return { @@ -3572,7 +3573,9 @@ sub preprocess_request { foreach my $node (@$noderange) { my $ent=$mptabhash->{$node}->[0]; #$mptab->getNodeAttribs($node,['mpa', 'id']); if (defined($ent->{mpa})) { push @{$mpa_hash{$ent->{mpa}}{nodes}}, $node;} - else { + elsif ($indiscover) { + next; + } else { $callback->({data=>["no mpa defined for node $node"]}); $request = {}; return; @@ -3847,10 +3850,12 @@ sub process_request { unless ($request->{cacheonly}->[0] or $macmap{$mac} or $macmaptimestamp > (time() - 20)) { #do not refresh cache if requested not to, if it has an entry, or is recent %macmap = (); $macmaptimestamp=time(); + $indiscover=1; foreach (@{preprocess_request(\%invreq,\&fillresps)}) { %invreq = %$_; process_request(\%invreq,\&fillresps); } + $indiscover=0; } my $found=0; if ($mac and $macmap{$mac}) {