add attribute 'dfmdispatch' for site table to enable or disable the DFM hdwr_ctrl dispatch

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14284 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
zhaoertao 2012-11-09 03:32:39 +00:00
parent f96c2c7d07
commit bf31543b8f
2 changed files with 15 additions and 2 deletions

View File

@ -887,6 +887,8 @@ site => {
" match the path in the installdir attribute.\n\n".
" ipmidispatch: Whether or not to send ipmi hw control operations to the service\n".
" node of the target compute nodes. Default is 'y'.\n\n".
" dfmdispatch: Whether or not to send ipmi hw control operations to the service\n".
" node of the target compute nodes. Default is 'y'.\n\n".
" ipmimaxp: The max # of processes for ipmi hw ctrl. The default is 64. Currently,\n".
" this is only used for HP hw control.\n\n".
" ipmiretries: The # of retries to use when communicating with BMCs. Default is 3.\n\n".

View File

@ -1980,8 +1980,19 @@ sub preprocess_request {
# build an individual request for each service node
my $service = "xcat";
my @hcps=keys(%hcp_hash);
my $sn = xCAT::ServiceNodeUtils->get_ServiceNode(\@hcps, $service, "MN");
my $sn;
my @dfmdispatch = xCAT::TableUtils->get_site_attribute("dfmdispatch");
if (defined($dfmdispatch[0]) and ($dfmdispatch[0] =~ /0|n/i)) {
if ($masters[0]) {
push @{$sn->{$masters[0]}}, @hcps;
} else {
$callback->({data=>["The value of the attribute master in the site table is NOT set"]});
$req = {};
return;
}
} else {
$sn = xCAT::ServiceNodeUtils->get_ServiceNode(\@hcps, $service, "MN");
}
# build each request for each service node
foreach my $snkey (keys %$sn)
{