From 8041eae6c85ea03abdc519795ddde59beb2f7836 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 26 Apr 2011 16:49:41 +0000 Subject: [PATCH] -fix stab at nodelist criteria in noderange git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9404 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/NodeRange.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/perl-xCAT/xCAT/NodeRange.pm b/perl-xCAT/xCAT/NodeRange.pm index de8642198..78719d536 100644 --- a/perl-xCAT/xCAT/NodeRange.pm +++ b/perl-xCAT/xCAT/NodeRange.pm @@ -130,6 +130,10 @@ sub nodesbycriteria { foreach $tab (keys %tables) { my $tabh = xCAT::Table->new($tab,-create=>0); unless ($tabh) { next; } + my @cols; + foreach (@{$tables{$tab}}) { + push @cols, $_->[0]; + } if ($tab eq "nodelist") { #fun caching interaction my $neednewcache=0; foreach (@cols) { @@ -145,10 +149,6 @@ sub nodesbycriteria { } } } - my @cols; - foreach (@{$tables{$tab}}) { - push @cols, $_->[0]; - } my $rechash = $tabh->getNodesAttribs($nodes,\@cols); #TODO: if not defined nodes, getAllNodesAttribs may be faster actually... foreach my $node (@$nodes) { my $recs = $rechash->{$node};