mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-09-04 20:17:55 +00:00
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.
This commit is contained in:
@@ -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} }) {
|
||||
|
||||
Reference in New Issue
Block a user