From 2d1f64f0fb4f821da4a670da2344cbb9b8b1826a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Sun, 23 Aug 2026 13:57:35 -0300 Subject: [PATCH] fix(blade): let a discovery request reach the findme handler A node that boots sends a findme request to say that it is there. That request names no node, because the node is what the request asks xCAT to find. The preprocessor of the blade plugin asks for a noderange for every command, so it answers "Missing Noderange" with an error code and gives back no request. The daemon then has nothing to give to the handler, and the findme handler of the plugin does not run. The plugin therefore answers each discovery request with an error, and blade discovery does not happen. The check that asks for a noderange is older than the findme handler. Hand a findme request to the handler, as the switch plugin does for the commands that it does not preprocess. Every other command keeps the check. The preprocessor also held a test that removed a node from a findme request when the hardware type was not blade. A findme request now returns above that test, and it named a noderange that a findme request never carries, so the test could not run. Remove it. --- xCAT-server/lib/xcat/plugins/blade.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/blade.pm b/xCAT-server/lib/xcat/plugins/blade.pm index 02f65004d..d25c6532f 100644 --- a/xCAT-server/lib/xcat/plugins/blade.pm +++ b/xCAT-server/lib/xcat/plugins/blade.pm @@ -4149,6 +4149,8 @@ sub preprocess_request { #display usage statement if -h is present or no noderage is specified my $noderange = $request->{node}; #Should be arrayref my $command = $request->{command}->[0]; + + if ($command eq 'findme') { return [$request]; } my $extrargs = $request->{arg}; my @exargs = ($request->{arg}); if (ref($extrargs)) { @@ -4258,9 +4260,6 @@ 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} }) {