added option to config file for direct attach control
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7482 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -24,9 +24,11 @@ Note:  currently the B<xcatsetup> command has only been implemented and tested f | ||||
|  | ||||
| The B<config file> is organized in stanza format and supports the keywords in the sample file below.  Comment lines | ||||
| begin with "#".  Stanzas can be ommitted if you do not want to define that type of object. | ||||
| Note that currently hostname ranges must have simple <alphachars><integer> format, like the examples in this sample file. | ||||
|  | ||||
|   xcat-site: | ||||
|    domain = cluster.com | ||||
|    use-direct-fsp-control = 1 | ||||
|  | ||||
|   xcat-hmcs: | ||||
|    hostname-range = hmc1-hmc3 | ||||
| @@ -103,7 +105,8 @@ The name before the colon is the node name of the frame BPC.  The numbers after | ||||
| to assign to the groups of CECs in that frame from bottom to top.  Each supernode contains 4 CECs, unless it is immediately | ||||
| followed by "(#)", in which case the number in parenthesis indicates how many CECs are in this supernode. | ||||
|  | ||||
| The following lists which database attributes are filled in for each stanza: | ||||
| The following lists which database attributes are filled in as a result of each stanza.  Note that depending on the values | ||||
| in the stanza, some attributes might not be filled in. | ||||
|  | ||||
| =over 15 | ||||
|  | ||||
| @@ -141,7 +144,7 @@ nodelist table:  node, groups | ||||
|  | ||||
| hosts table:  node, ip | ||||
|  | ||||
| ppc table:  node, supernode | ||||
| ppc table:  node, supernode, hcp | ||||
|  | ||||
| nodetype table:  node, nodetype | ||||
|  | ||||
|   | ||||
| @@ -273,16 +273,26 @@ sub writeframe { | ||||
| 	 | ||||
| 	# Using the frame group, write: nodetype.nodetype, nodehm.mgt | ||||
| 	$tables{'nodetype'}->setNodeAttribs('frame', {nodetype => 'bpa'}); | ||||
| 	$tables{'nodehm'}->setNodeAttribs('frame', {mgt => 'hmc'}); | ||||
| 	 | ||||
| 	# Using the frame group, num-frames-per-hmc, hmc hostname-range, write regex for: ppc.node, ppc.hcp, ppc.id | ||||
| 	# The frame # should come from the nodename | ||||
| 	my $idregex = '|\D+(\d+)|(0+$1)|'; | ||||
| 	my %hash = (id => $idregex); | ||||
|  | ||||
| 	if ($STANZAS{'xcat-site'}->{'use-direct-fsp-control'}) { | ||||
| 		$tables{'nodehm'}->setNodeAttribs('frame', {mgt => 'fsp'}); | ||||
| 		my $hcpregex = '|(.+)|($1)|';		# its managed by itself | ||||
| 		$hash{hcp} = $hcpregex; | ||||
| 	} | ||||
| 	else { | ||||
| 		$tables{'nodehm'}->setNodeAttribs('frame', {mgt => 'hmc'}); | ||||
| 		# let lsslp fill in the hcp | ||||
| 	} | ||||
| 	 | ||||
| 	# Calculate which hmc manages this frame by dividing by num-frames-per-hmc | ||||
| 	my $framesperhmc = $STANZAS{'xcat-frames'}->{'num-frames-per-hmc'}; | ||||
| 	#todo: this is wrong!  Switch frames and cecs over to direct attach | ||||
| 	my $hmcregex = '|\D+(\d+)|((($1-1)/' . $framesperhmc . ')+1)|'; | ||||
| 	$tables{'ppc'}->setNodeAttribs('frame', {id => $idregex, hcp => $hmcregex}); | ||||
| 	#my $framesperhmc = $STANZAS{'xcat-frames'}->{'num-frames-per-hmc'}; | ||||
| 	 | ||||
| 	$tables{'ppc'}->setNodeAttribs('frame', \%hash); | ||||
| 	 | ||||
| 	# Write vpd-file to vpd table | ||||
| 	my $filename = fullpath($STANZAS{'xcat-frames'}->{'vpd-file'}, $cwd); | ||||
| @@ -330,9 +340,17 @@ sub writecec { | ||||
| 	 | ||||
| 	# Using the cec group, write: nodetype.nodetype, nodehm.mgt | ||||
| 	$tables{'nodetype'}->setNodeAttribs('cec', {nodetype => 'fsp'}); | ||||
| 	$tables{'nodehm'}->setNodeAttribs('cec', {mgt => 'hmc'}); | ||||
| 	 | ||||
| 	# Do we need to write regex for ppc.hcp and ppc.parent?  Of will lsslp do all that? | ||||
| 	# Write regex for ppc.hcp.  lsslp will fill in parent. | ||||
| 	if ($STANZAS{'xcat-site'}->{'use-direct-fsp-control'}) { | ||||
| 		$tables{'nodehm'}->setNodeAttribs('cec', {mgt => 'fsp'}); | ||||
| 		my $hcpregex = '|(.+)|($1)|';		# its managed by itself | ||||
| 		$tables{'ppc'}->setNodeAttribs('cec', {hcp => $hcpregex}); | ||||
| 	} | ||||
| 	else { | ||||
| 		$tables{'nodehm'}->setNodeAttribs('cec', {mgt => 'hmc'}); | ||||
| 		# let lsslp fill in the hcp | ||||
| 	} | ||||
| 	 | ||||
| 	# Write supernode-list in ppc.supernode | ||||
| 	#todo: handle the !sequential option | ||||
|   | ||||
		Reference in New Issue
	
	Block a user