the value of XCAT= in kernel booting parameter for statelite mode depends on the xcatmaster value in noderes table
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5315 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
caaa516fa2
commit
b706f06d54
@ -353,7 +353,17 @@ sub mknetboot
|
||||
# last resort use self
|
||||
my $imgsrv;
|
||||
my $ient;
|
||||
my $xcatmaster;
|
||||
|
||||
$ient = $reshash->{$node}->[0]; #$restab->getNodeAttribs($node, ['tftpserver']);
|
||||
|
||||
if ($ient and $ient->{xcatmaster})
|
||||
{
|
||||
$xcatmaster = $ient->{xcatmaster};
|
||||
} else {
|
||||
$callback->({error=>"Error: xcatmaster for $node is not set!\nPlease check the noderes table",errorcode=>[1]});
|
||||
}
|
||||
|
||||
if ($ient and $ient->{tftpserver})
|
||||
{
|
||||
$imgsrv = $ient->{tftpserver};
|
||||
@ -361,12 +371,12 @@ sub mknetboot
|
||||
else
|
||||
{
|
||||
$ient = $reshash->{$node}->[0]; #$restab->getNodeAttribs($node, ['xcatmaster']);
|
||||
if ($ient and $ient->{xcatmaster})
|
||||
{
|
||||
$imgsrv = $ient->{xcatmaster};
|
||||
}
|
||||
else
|
||||
{
|
||||
#if ($ient and $ient->{xcatmaster})
|
||||
#{
|
||||
# $imgsrv = $ient->{xcatmaster};
|
||||
#}
|
||||
#else
|
||||
#{
|
||||
# master not correct for service node pools
|
||||
#$ient = $sitetab->getAttribs({key => master}, value);
|
||||
#if ($ient and $ient->{value})
|
||||
@ -375,9 +385,10 @@ sub mknetboot
|
||||
#}
|
||||
#else
|
||||
#{
|
||||
$imgsrv = '!myipfn!';
|
||||
# $imgsrv = '!myipfn!';
|
||||
#}
|
||||
}
|
||||
#}
|
||||
$imgsrv = $xcatmaster;
|
||||
}
|
||||
unless ($imgsrv)
|
||||
{
|
||||
@ -439,7 +450,7 @@ sub mknetboot
|
||||
$kcmdline .= " ";
|
||||
}
|
||||
$kcmdline .=
|
||||
"XCAT=$imgsrv:$xcatdport ";
|
||||
"XCAT=$xcatmaster:$xcatdport ";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -229,6 +229,16 @@ sub mknetboot
|
||||
# last resort use self
|
||||
my $imgsrv;
|
||||
my $ient;
|
||||
my $xcatmaster;
|
||||
|
||||
$ient = $restab->getNodeAttribs($node, ['xcatmaster']);
|
||||
if ($ient and $ient->{xcatmaster})
|
||||
{
|
||||
$xcatmaster = $ient->{xcatmaster};
|
||||
} else {
|
||||
$callbck->({error=>"Error: xcatmaster for $node is not set!\nPlease check the noderes table",errorcode=>[1]});
|
||||
}
|
||||
|
||||
$ient = $restab->getNodeAttribs($node, ['tftpserver']);
|
||||
if ($ient and $ient->{tftpserver})
|
||||
{
|
||||
@ -236,24 +246,25 @@ sub mknetboot
|
||||
}
|
||||
else
|
||||
{
|
||||
$ient = $restab->getNodeAttribs($node, ['xcatmaster']);
|
||||
if ($ient and $ient->{xcatmaster})
|
||||
{
|
||||
$imgsrv = $ient->{xcatmaster};
|
||||
}
|
||||
else
|
||||
{
|
||||
# master removed, does not work for servicenode pools
|
||||
#$ient = $sitetab->getAttribs({key => master}, value);
|
||||
#if ($ient and $ient->{value})
|
||||
#{
|
||||
# $imgsrv = $ient->{value};
|
||||
#}
|
||||
#else
|
||||
#{
|
||||
$imgsrv = '!myipfn!';
|
||||
#}
|
||||
}
|
||||
# $ient = $restab->getNodeAttribs($node, ['xcatmaster']);
|
||||
# if ($ient and $ient->{xcatmaster})
|
||||
# {
|
||||
# $imgsrv = $ient->{xcatmaster};
|
||||
# }
|
||||
# else
|
||||
# {
|
||||
# # master removed, does not work for servicenode pools
|
||||
# #$ient = $sitetab->getAttribs({key => master}, value);
|
||||
# #if ($ient and $ient->{value})
|
||||
# #{
|
||||
# # $imgsrv = $ient->{value};
|
||||
# #}
|
||||
# #else
|
||||
# #{
|
||||
# $imgsrv = '!myipfn!';
|
||||
# #}
|
||||
# }
|
||||
$imgsrv = $xcatmaster;
|
||||
}
|
||||
unless ($imgsrv)
|
||||
{
|
||||
@ -276,7 +287,7 @@ sub mknetboot
|
||||
elsif ($statelite)
|
||||
{
|
||||
# get entry for nfs root if it exists;
|
||||
# have to get nfssvr and nfsdir from noderes table
|
||||
# have to get nfssvr, nfsdir and xcatmaster from noderes table
|
||||
my $nfssrv = $imgsrv;
|
||||
my $nfsdir = $rootimgdir;
|
||||
|
||||
@ -316,8 +327,10 @@ sub mknetboot
|
||||
} else {
|
||||
$kcmdline .= " ";
|
||||
}
|
||||
# get "xcatmaster" value from the "noderes" table
|
||||
|
||||
$kcmdline .=
|
||||
"XCAT=$imgsrv:$xcatdport ";
|
||||
"XCAT=$xcatmaster:$xcatdport ";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user