From d4a8bc6b6a6bcca6e08b92f0379a980b5e3f0a09 Mon Sep 17 00:00:00 2001 From: ertaozh Date: Thu, 19 May 2016 04:36:18 -0400 Subject: [PATCH] fix issue 1115: Don't run rspconfig after hardware discovery finished for servers Other than S822L(TLT) --- xCAT-genesis-scripts/bin/dodiscovery | 5 +++++ xCAT-server/lib/xcat/plugins/nodediscover.pm | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/xCAT-genesis-scripts/bin/dodiscovery b/xCAT-genesis-scripts/bin/dodiscovery index 8e139dfa9..d29d48ced 100755 --- a/xCAT-genesis-scripts/bin/dodiscovery +++ b/xCAT-genesis-scripts/bin/dodiscovery @@ -141,6 +141,11 @@ if [ "$IsStatic" ]; then fi fi +# Check whether the hardware support in-band BMC configuration with the IPMI device +if [ -r /dev/ipmi0 -o -r /dev/ipmi/0 -o -r /dev/ipmidev/0 ]; then + echo "1" >> /tmp/discopacket +fi + #so we have some cases where DMI table explictly records every function number, and some where only first function is enumerated #so for each onboard device, we record it. If it is also the first function, we'll seek out other function numbers and append #if that other function number does not show up in its own dmi type 41 record diff --git a/xCAT-server/lib/xcat/plugins/nodediscover.pm b/xCAT-server/lib/xcat/plugins/nodediscover.pm index 1c3372856..2f52069b2 100644 --- a/xCAT-server/lib/xcat/plugins/nodediscover.pm +++ b/xCAT-server/lib/xcat/plugins/nodediscover.pm @@ -371,8 +371,16 @@ sub process_request { $callback->({error=> ["The node [$node] should have a correct IP address which belongs to the management network."], errorcode=>["1"]}); return; } - if ($request->{arch}->[0] =~ /ppc/ and $request->{platform}->[0] =~ /PowerNV/) { - # This is a slow thing to do, and frequently breaks things thoroughly + if (defined($request->{bmcinband})) { + syslog("local4|info", "The attribute bmcinband is specified, just remove the temp BMC node if there is"); + if (defined($request->{pbmc_node}) and defined($request->{pbmc_node}->[0])) { + my $bmc_node = $request->{pbmc_node}->[0]; + syslog("local4|info", "Find BMC $bmc_node, so remove it"); + $doreq->({ command => ['rmdef'], arg => [$bmc_node]}); + } + } 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::Utils->cleanup_for_powerLE_hardware_discovery($request, $doreq); }