From 7a232d81c49119acb8e74b856c0fed234d9129be Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 12 Mar 2009 16:34:54 +0000 Subject: [PATCH] remove check for site.master when determining image server. Does not work for servicenode pools. Final check for my_ip_facing should cover the site.master image server when needed git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2881 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/anaconda.pm | 23 +++++++++++----------- xCAT-server/lib/xcat/plugins/sles.pm | 25 ++++++++++++------------ 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 0f52db821..81be4ac41 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -280,7 +280,7 @@ sub mknetboot # ['serialport', 'serialspeed', 'serialflow']); # determine image server, if tftpserver use it, else use xcatmaster - # else use site.Master, last resort use self + # last resort use self my $imgsrv; my $ient; $ient = $reshash->{$node}->[0]; #$restab->getNodeAttribs($node, ['tftpserver']); @@ -297,20 +297,21 @@ sub mknetboot } else { - $ient = $sitetab->getAttribs({key => master}, value); - if ($ient and $ient->{value}) + # master not correct for service node pools + #$ient = $sitetab->getAttribs({key => master}, value); + #if ($ient and $ient->{value}) + #{ + # $imgsrv = $ient->{value}; + #} + #else + #{ + my $ipfn = xCAT::Utils->my_ip_facing($node); + if ($ipfn) { - $imgsrv = $ient->{value}; - } - else - { - my $ipfn = xCAT::Utils->my_ip_facing($node); - if ($ipfn) - { $imgsrv = $ipfn; #guessing self is second best - } } + #} } } unless ($imgsrv) diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm index 8b4b079ed..c3fc146ae 100644 --- a/xCAT-server/lib/xcat/plugins/sles.pm +++ b/xCAT-server/lib/xcat/plugins/sles.pm @@ -139,7 +139,7 @@ sub mknetboot ['serialport', 'serialspeed', 'serialflow']); # determine image server, if tftpserver use it, else use xcatmaster - # else use site.Master, last resort use self + # last resort use self my $imgsrv; my $ient; $ient = $restab->getNodeAttribs($node, ['tftpserver']); @@ -156,20 +156,21 @@ sub mknetboot } else { - $ient = $sitetab->getAttribs({key => master}, value); - if ($ient and $ient->{value}) + # master removed, does not work for servicenode pools + #$ient = $sitetab->getAttribs({key => master}, value); + #if ($ient and $ient->{value}) + #{ + # $imgsrv = $ient->{value}; + #} + #else + #{ + my $ipfn = xCAT::Utils->my_ip_facing($node); + if ($ipfn) { - $imgsrv = $ient->{value}; - } - else - { - my $ipfn = xCAT::Utils->my_ip_facing($node); - if ($ipfn) - { - $imgsrv = $ipfn; #guessing self is second best + $imgsrv = $ipfn; #guessing self is second best - } } + #} } } unless ($imgsrv)