From d4fe30f0396e5ed4afb3e7d3d64502b8cc5dc25f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Thu, 23 Jul 2026 21:15:20 -0300 Subject: [PATCH] fix(blade): only scan a node's MPA during discovery if it is a blade blade.pm's preprocess_request iterates the mp table during 'findme' discovery. Because many node types populate the mp table, non-blade nodes were being scanned as if they were BladeCenter/Flex blades. Skip a node during findme unless its nodetype is 'blade'. Scoped to blade.pm's findme path and gated on nodetype, so only blade discovery is affected; the existing whole-request findme handling (already-processed short-circuit) is a separate check and is unchanged. Not lab-validated (no BladeCenter/Flex MPA available). Recovered from the unmerged lenovobuild branch (6573d8f9). --- xCAT-server/lib/xcat/plugins/blade.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/blade.pm b/xCAT-server/lib/xcat/plugins/blade.pm index 1f731ab3c..085043051 100644 --- a/xCAT-server/lib/xcat/plugins/blade.pm +++ b/xCAT-server/lib/xcat/plugins/blade.pm @@ -4258,6 +4258,9 @@ sub preprocess_request { foreach my $node (@$noderange) { my $ent = $mptabhash->{$node}->[0]; #$mptab->getNodeAttribs($node,['mpa', 'id']); my $mpaent; + if ($request->{command}->[0] eq 'findme' and $ent->{nodetype} ne 'blade') { + next; + } if (defined($ent->{mpa})) { push @{ $mpa_hash{ $ent->{mpa} }{nodes} }, $node; unless ($mpatype{ $ent->{mpa} }) {