mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-08-16 08:10:23 +00:00
fix issue 1504 & 1854, modified discovery messages
This commit is contained in:
@@ -4546,7 +4546,7 @@ sub process_request {
|
||||
}
|
||||
}
|
||||
unless ($node) {
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.blade: ($request->{_xcat_clientmac}->[0]) Warning: Could not find any nodes using blade-based discovery");
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.blade: ($request->{_xcat_clientmac}->[0]) Warning: Could not find any node matching using blade-based discovery");
|
||||
return 1; #failure
|
||||
}
|
||||
if ($request->{mtm} and $request->{mtm} =~ /^(\w{4})/) {
|
||||
@@ -4562,7 +4562,7 @@ sub process_request {
|
||||
undef $mactab;
|
||||
}
|
||||
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.blade: ($request->{_xcat_clientmac}->[0]) Found node: $node");
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.blade: ($request->{_xcat_clientmac}->[0]) Found node: $node matching for discovery request");
|
||||
|
||||
#my %request = (
|
||||
# command => ['makedhcp'],
|
||||
|
@@ -749,7 +749,7 @@ sub process_request {
|
||||
}
|
||||
}
|
||||
unless ($macmap{$mac}) {
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.hpblade: ($request->{_xcat_clientmac}->[0]) Warning: Could not find any nodes using hpblade-based discovery");
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.hpblade: ($request->{_xcat_clientmac}->[0]) Warning: Could not find any node matching using hpblade-based discovery");
|
||||
return 1; #failure
|
||||
}
|
||||
|
||||
@@ -762,7 +762,7 @@ sub process_request {
|
||||
# node => [$macmap{$mac}]
|
||||
# );
|
||||
#$doreq->(\%request);
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.hpblade: ($request->{_xcat_clientmac}->[0]) Found node: $macmap{$mac}");
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.hpblade: ($request->{_xcat_clientmac}->[0]) Found node: $macmap{$mac} matching for discovery request");
|
||||
my $req = {%$request};
|
||||
$req->{command} = ['discovered'];
|
||||
$req->{noderange} = [ $macmap{$mac} ];
|
||||
|
@@ -420,23 +420,22 @@ sub process_request {
|
||||
return;
|
||||
}
|
||||
if (defined($request->{bmcinband})) {
|
||||
syslog("local4|info", "The attribute bmcinband is specified, just remove the temp BMC node if there is");
|
||||
if (defined($request->{bmc_node}) and defined($request->{bmc_node}->[0])) {
|
||||
my $bmc_node = $request->{bmc_node}->[0];
|
||||
syslog("local4|info", "Found node corresponding to BMC=$bmc_node, removing it...");
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.nodediscover: Removing discovered node definition: $bmc_node...");
|
||||
my $rmcmd = "rmdef $bmc_node";
|
||||
xCAT::Utils->runcmd($rmcmd, 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
syslog("local4|info", "Failed to remove $bmc_node from xCAT");
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.nodediscover: Failed to remove $bmc_node from xCAT");
|
||||
} else {
|
||||
syslog("local4|info", "$bmc_node definition removed from xCAT");
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.nodediscover: $bmc_node definition removed from xCAT");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
# Only BMC that doesn't support in-band configuration need to run rspconfig out-of-band, such as S822L running in OPAL model
|
||||
syslog("local4|info", "No bmcinband specified, need to configure BMC out-of-band");
|
||||
xCAT::MsgUtils->message("S", "No bmcinband specified, need to configure BMC out-of-band");
|
||||
xCAT::Utils->cleanup_for_powerLE_hardware_discovery($request, $doreq);
|
||||
}
|
||||
|
||||
@@ -453,7 +452,7 @@ sub process_request {
|
||||
Timeout => '1',
|
||||
Proto => 'tcp'
|
||||
);
|
||||
unless ($sock) { syslog("local4|err", "Failed to notify $clientip that it's actually $node."); return; } #Give up if the node won't hear of it.
|
||||
unless ($sock) { xCAT::MsgUtils->message("S", "Failed to notify $clientip that it's actually $node."); return; }
|
||||
print $sock $restartstring;
|
||||
close($sock);
|
||||
|
||||
@@ -463,7 +462,7 @@ sub process_request {
|
||||
#Update the discoverydata table to indicate the successful discovery
|
||||
xCAT::DiscoveryUtils->update_discovery_data($request);
|
||||
|
||||
syslog("local4|info", "$node has been discovered");
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.nodediscover: $node has been discovered so we can correlate the discovered definition to the pre-defined definition.");
|
||||
}
|
||||
|
||||
1;
|
||||
|
@@ -384,7 +384,7 @@ sub findme {
|
||||
|
||||
# call the discovered command to update the discovery request to a node
|
||||
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.seqdiscovery: ($request->{_xcat_clientmac}->[0]) Found node: $node");
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.seqdiscovery: ($request->{_xcat_clientmac}->[0]) Found node: $node matching for discovery request");
|
||||
$request->{discoverymethod} = ['sequential'];
|
||||
my $req = {%$request};
|
||||
$req->{command} = ['discovered'];
|
||||
@@ -397,7 +397,7 @@ sub findme {
|
||||
undef $mactab;
|
||||
} else {
|
||||
nodediscoverstop($callback, undef, "node names");
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.seqdiscovery: ($request->{_xcat_clientmac}->[0]) Warning: Could not find any nodes using sequential-based discovery");
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.seqdiscovery: ($request->{_xcat_clientmac}->[0]) Warning: Could not find any node matching using sequential-based discovery");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -318,7 +318,7 @@ sub process_request {
|
||||
}
|
||||
|
||||
if ($node) {
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.switch: ($req->{_xcat_clientmac}->[0]) Found node: $node");
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.switch: ($req->{_xcat_clientmac}->[0]) Found node: $node matching for discovery request");
|
||||
|
||||
# No need to write mac table here, 'discovered' command will write
|
||||
# my $mactab = xCAT::Table->new('mac',-create=>1);
|
||||
@@ -338,7 +338,7 @@ sub process_request {
|
||||
%{$request} = (); #Clear req structure, it's done..
|
||||
undef $mactab;
|
||||
} else {
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.switch: ($req->{_xcat_clientmac}->[0]) Warning: Could not find any nodes using switch-based discovery");
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.switch: ($req->{_xcat_clientmac}->[0]) Warning: Could not find any node matching using switch-based discovery");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -36,14 +36,14 @@ sub findme {
|
||||
}
|
||||
my $nodenum = $#nodes;
|
||||
if ($nodenum < 0) {
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.mtms: ($request->{_xcat_clientmac}->[0]) Warning: Could not find any nodes using mtms-based discovery");
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.mtms: ($request->{_xcat_clientmac}->[0]) Warning: Could not find any node matching using mtms-based discovery");
|
||||
return;
|
||||
} elsif ($nodenum > 0) {
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.mtms: ($request->{_xcat_clientmac}->[0]) Error: More than one node were found");
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.mtms: ($request->{_xcat_clientmac}->[0]) Error: More than one node for $mtms were found");
|
||||
return;
|
||||
}
|
||||
{
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.mtms: ($request->{_xcat_clientmac}->[0]) Found node: $nodes[0]");
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.mtms: ($request->{_xcat_clientmac}->[0]) Found node: $nodes[0] matching for discovery request");
|
||||
$request->{discoverymethod}->[0] = 'mtms';
|
||||
my $req = {%$request};
|
||||
$req->{command} = ['discovered'];
|
||||
|
Reference in New Issue
Block a user