From 6cead01cf9b7edd7c45841546aa27d9c11deb19c Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 11 May 2012 15:30:53 +0000 Subject: [PATCH] Have SvrUtils potentiall prefetchcache git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12636 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/SvrUtils.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/SvrUtils.pm b/xCAT-server/lib/perl/xCAT/SvrUtils.pm index 6cfad4965..0d00a827d 100644 --- a/xCAT-server/lib/perl/xCAT/SvrUtils.pm +++ b/xCAT-server/lib/perl/xCAT/SvrUtils.pm @@ -151,13 +151,17 @@ sub get_nodeset_state { $node = shift; } + my %options=@_; + my %gnopts; + if ($options{prefetchcache}) { $gnopts{prefetchcache}=1; } + my $state = "undefined"; my $tftpdir; #get boot type (pxe, yaboot or aixinstall) for the node my $noderestab = xCAT::Table->new('noderes', -create => 0); - my $ent = $noderestab->getNodeAttribs($node, [qw(netboot tftpdir)]); + my $ent = $noderestab->getNodeAttribs($node, [qw(netboot tftpdir)],%gnopts); #get tftpdir from the noderes table, if not defined get it from site talbe if ($ent && $ent->{tftpdir}) { @@ -211,7 +215,7 @@ sub get_nodeset_state if ($state eq "undefined") { my $chaintab = xCAT::Table->new('chain'); - my $stref = $chaintab->getNodeAttribs($node, ['currstate']); + my $stref = $chaintab->getNodeAttribs($node, ['currstate'],%gnopts); if ($stref and $stref->{currstate}) { $state = $stref->{currstate}; } }