From a854feea907d509bf252a4831d0640296e8224b6 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Tue, 21 Feb 2012 06:53:54 +0000 Subject: [PATCH] Added service node pool for diskful and diskless installation git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11653 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/Template.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm index 3c5da55e6..79368d157 100644 --- a/xCAT-server/lib/perl/xCAT/Template.pm +++ b/xCAT-server/lib/perl/xCAT/Template.pm @@ -25,7 +25,6 @@ my $lastmachinepass; my %tab_replacement=( "noderes:nfsserver"=>"noderes:xcatmaster", "noderes:tftpserver"=>"noderes:xcatmaster", - "noderes:xcatmaster"=>"site:key=master:value", ); @@ -69,6 +68,10 @@ sub subvars { if ($et and $et->{value}) { $master = $et->{value}; } + my $ipfn = xCAT::Utils->my_ip_facing($node); + if ($ipfn) { + $master = $ipfn; + } $et = $noderestab->getNodeAttribs($node,['xcatmaster']); if ($et and $et->{'xcatmaster'}) { $master = $et->{'xcatmaster'}; @@ -419,6 +422,12 @@ sub tabdb $tabh->close; unless($ent and defined($ent->{$field})) { unless ($blankok) { + if ($field eq "xcatmaster") { + my $ipfn = xCAT::Utils->my_ip_facing($node); + if ($ipfn) { + return $ipfn; + } + } #$tmplerr="Unable to find requested $field from $table, with $key"; my $rep=get_replacement($table,$key,$field); if ($rep) {