Speed up noderange by using %::XCATSITEVALS hash instead of expensive DB calls
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9298 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
84c28a934a
commit
1175706f14
@ -583,19 +583,13 @@ sub noderange {
|
||||
if ($exsitenode) {
|
||||
my $badnoderange = 0;
|
||||
my @badnodes = ();
|
||||
my $sitetab = xCAT::Table->new('site',-create=>0);
|
||||
if ($sitetab) {
|
||||
my ($ref) = $sitetab->getAttribs({key => 'excludenodes'}, 'value');
|
||||
if ($ref and $ref->{value}) {
|
||||
$badnoderange = $ref->{value};
|
||||
# use the exsitenode argument to exit recursion
|
||||
@badnodes = noderange($badnoderange, 1, 0);
|
||||
if ($::XCATSITEVALS{excludenodes}) {
|
||||
@badnodes = noderange($::XCATSITEVALS{excludenodes}, 1, 0);
|
||||
foreach my $bnode (@badnodes) {
|
||||
if (!$delnodes{$bnode}) {
|
||||
$delnodes{$bnode} = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user