2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-07-31 18:19:40 +00:00

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).
This commit is contained in:
Vinícius Ferrão
2026-07-23 21:15:20 -03:00
parent cf44f51463
commit d4fe30f039
+3
View File
@@ -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} }) {