Minor fixes to xcatsetup

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7876 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
bp-sawyers 2010-10-15 20:08:12 +00:00
parent 0b8897eb9b
commit 7d66c85950
2 changed files with 7 additions and 10 deletions

View File

@ -131,7 +131,7 @@ The hostnames specified must sort correctly. I.e. use node01-node80, instead of
starting-ip = 10.200.1.1
# this value is the same format as the hosts.otherinterfaces attribute except
# the IP addresses are starting IP addresses
otherinterfaces = -hf0:10.10.1.1,-hf1:10.11.1.1,-hf2:10.12.1.1,-hf3:10.13.1.1
otherinterfaces = -hf0:10.10.1.1,-hf1:10.11.1.1,-hf2:10.12.1.1,-hf3:10.13.1.1,-ml0:10.14.1.1
xcat-storage-nodes:
num-storage-nodes-per-bb = 3
@ -140,10 +140,9 @@ The hostnames specified must sort correctly. I.e. use node01-node80, instead of
hostname-range = stor01-stor09
starting-ip = 10.20.1.1
aliases = -hf0
otherinterfaces = -hf1:10.21.1.1,-hf2:10.22.1.1,-hf3:10.23.1.1
otherinterfaces = -hf1:10.21.1.1,-hf2:10.22.1.1,-hf3:10.23.1.1,-ml0:10.24.1.1
xcat-compute-nodes:
num-compute-nodes-per-bb = 155
hostname-range = n001-n465
starting-ip = 10.30.1.1
aliases = -hf0

View File

@ -371,7 +371,7 @@ sub writecec {
# Using the cec group, write: nodetype.nodetype
$tables{'nodetype'}->setNodeAttribs('cec', {nodetype => 'fsp'});
# Write regex for ppc.hcp, nodehm.mgt. lsslp will fill in parent.
# Write regex for ppc.hcp, nodehm.mgt
if ($STANZAS{'xcat-site'}->{'use-direct-fsp-control'}) {
$tables{'nodehm'}->setNodeAttribs('cec', {mgt => 'fsp'});
my $hcpregex = '|(.+)|($1)|'; # its managed by itself
@ -394,7 +394,7 @@ sub writecec {
foreach my $k (sort keys %framesupers) {
my $f = $framesupers{$k}; # $f is a ptr to an array of super node numbers
if (!$f) { next; } # in case some frame nums did not get filled in by user
my $cageid = 1;
my $cageid = 3; #todo: p7 ih starts at 3, but what about other models?
foreach my $s (@$f) { # loop thru the supernode nums in this frame
my $supernum = $s;
my $numnodes = 4;
@ -529,12 +529,11 @@ sub writesn {
$nodes = [noderange($range, 0)];
my %nodehash;
my %grouphash;
my $bbs = [noderange($STANZAS{'xcat-frames'}->{'hostname-range'}, 0)];
# Go thru each service node and calculate which cec it is in
for (my $i=0; $i<scalar(@$nodes); $i++) {
# figure out the BB num to add this node to that group
my $bbnum = int($i/$snsperbb) + 1;
my $bbname = $$bbs[$bbnum-1];
my $bbname = "bb$bbnum";
$grouphash{$$nodes[$i]} = {groups => "${bbname}service,service,all"};
# figure out the CEC num
my $snpositioninbb = $positions[$i % $snsperbb]; # the offset within the BB
@ -626,12 +625,11 @@ sub writestorage {
my %nodehash;
my %grouphash;
my %nodereshash;
my $bbs = [noderange($STANZAS{'xcat-frames'}->{'hostname-range'}, 0)];
# Go thru each storage node and calculate which cec it is in
for (my $i=0; $i<scalar(@$nodes); $i++) {
# figure out the BB num to add this node to that group
my $bbnum = int($i/$snsperbb) + 1;
my $bbname = $$bbs[$bbnum-1];
my $bbname = "bb$bbnum";
$grouphash{$$nodes[$i]} = {groups => "${bbname}storage,storage,all"};
# figure out the CEC num
my $snpositioninbb = $positions[$i % $snsperbb]; # the offset within the BB
@ -701,7 +699,7 @@ sub writecompute {
my ($nic, $startip) = split(/:/, $if);
($ipbase, $ip3rd, $ip4th) = $startip =~/^(\d+\.\d+)\.(\d+)\.(\d+)$/;
#$if = "$nic:$ipbase.($ipstart+" . '$1' . "-$startnum)";
$if = "$nic:$ipbase.((${ip4th}-1+" . '$1' . "-$startnum)/254+$ip3rd).((${ip4th}-1+" . '$1' . "-$startnum)%254+1)|";
$if = "$nic:$ipbase.((${ip4th}-1+" . '$1' . "-$startnum)/254+$ip3rd).((${ip4th}-1+" . '$1' . "-$startnum)%254+1)";
}
$regex = '|\D+(\d+)|' . join(',', @ifs) . '|';
#print "regex=$regex\n";