Fix bug 3516024: xcatsetup can't define service/storage node over 1 bb

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12162 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
yinle 2012-04-09 08:50:56 +00:00
parent 2e2a78e7f9
commit 95ae6e5ae6

View File

@ -1205,18 +1205,21 @@ sub findSNsinBB {
my $framerange = $STANZAS{'xcat-frames'}->{'hostname-range'};
my $framename = parsenoderange($framerange);
my $framebase = $$framename{'primary-start'};
my $cecrange = $STANZAS{'xcat-cecs'}->{'hostname-range'};
my $cecname = parsenoderange($cecrange);
my $cecbasenum = $$cecname{'secondary-start'};
foreach my $p (@snpositions) {
my $cecbase = 0;
my $frame = $framebase;
#my $frame = $framebase;
my $frame = int($framebase) + ($bb -1) * $framesperbb;
while ($p > ($cecbase + ($NUMCECSINFRAME{$frame}||$cecsperframe))) {
# p is not in this frame, go on to the next
$cecbase += $NUMCECSINFRAME{$frame} || $cecsperframe;
$frame++;
#print "cecbase=$cecbase, frame=$frame\n";
if ($frame >= ($framebase+$framesperbb)) { errormsg("Can not find $sntext node position $p in building block $bb.",9); return 0; }
my $frametmp = $frame - ($bb -1) * $framesperbb;
if ($frametmp >= ($framebase+$framesperbb)) { errormsg("Can not find $sntext node position $p in building block $bb.",9); return 0; }
}
my $cecinframe = $p - $cecbase;
my $cecinframe = $p - $cecbase + $cecbasenum - 1;
#my $nodename = $primbase . sprintf("%0${primlen}d", $frame) . $secbase . sprintf("%0${seclen}d", $cecinframe) . $tertbase . sprintf("%0${tertlen}d", 1);
my $nodename = buildNodename($frame, $cecinframe, 1, $primbase, $primlen, $secbase, $seclen, $tertbase, $tertlen);
#print "nodename=$nodename\n";