Correct 3461411 caused by 12/6 checkin, should be reviewed by wanghuaz

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11263 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2011-12-17 14:57:55 +00:00
parent 3f4342378f
commit 1ac85cfcb0

View File

@ -786,24 +786,22 @@ sub preprocess_request
}
}
}
} else { #send the request to every dhservers
if (@nodes > 0) {
$req->{'node'}=\@nodes;
@requests = ({%$req}); #Start with a straight copy to reflect local instance
unless ($localonly) {
my @sn = xCAT::Utils->getSNList('dhcpserver');
if (@sn > 0) { $hasHierarchy=1; }
} elsif (@nodes > 0 or grep /-n/,@{$req->{arg}}) { #send the request to every dhservers
$req->{'node'}=\@nodes;
@requests = ({%$req}); #Start with a straight copy to reflect local instance
unless ($localonly) {
my @sn = xCAT::Utils->getSNList('dhcpserver');
if (@sn > 0) { $hasHierarchy=1; }
foreach my $s (@sn)
{
if (scalar @nodes == 1 and $nodes[0] eq $s) { next; }
my $reqcopy = {%$req};
$reqcopy->{'_xcatdest'} = $s;
$reqcopy->{_xcatpreprocessed}->[0] = 1;
push @requests, $reqcopy;
}
foreach my $s (@sn)
{
if (scalar @nodes == 1 and $nodes[0] eq $s) { next; }
my $reqcopy = {%$req};
$reqcopy->{'_xcatdest'} = $s;
$reqcopy->{_xcatpreprocessed}->[0] = 1;
push @requests, $reqcopy;
}
}
}
}
if ( $hasHierarchy)