if nodetype.provmethod is not set, use install as default value; call rsetboot net to set boot over network for ipmi nodes before rpower

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16563 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
immarvin 2013-06-06 03:14:52 +00:00
parent 12467ecd6c
commit a0f0158e74
2 changed files with 9 additions and 12 deletions

View File

@ -91,7 +91,7 @@ if($OSIMAGE){
# then set the boot state of each node based on the nodetype.provmethod:
# 1) if nodetype.provmethod = <osimage>, ignore any -p,-o,-a option, then call "nodeset ... osimage"
# 2) if nodetype.provmethod = [install/netboot/statelite], update the node attributes specified by -a,-p,-o options thru "nodech", call "nodeset ... [install/netboot/statelite]"
# 3) if nodetype.provmethod is not set, complain and return
# 3) if nodetype.provmethod is not set, use 'install' as the default value
# group the nodes according to the nodetype.provmethod
@allnodes=noderange($noderange);
@ -105,7 +105,8 @@ if($OSIMAGE){
}
else
{
push(@{$pnhash{'BLANK###'}},$_);
#if nodetype.provmethod is not specified,
push(@{$pnhash{'install'}},$_);
}
}
@ -117,7 +118,7 @@ if($OSIMAGE){
if($key =~ /^(install|netboot|statelite)$/)
{
# nodetype.provmethod = [install|netboot|statelite]
# nodetype.provmethod = [install|netboot|statelite]
my $nodechline = "";
if ($OSVER) {
$nodechline = "nodetype.os=$OSVER";
@ -144,17 +145,10 @@ if($OSIMAGE){
}
}
}
elsif($key eq 'BLANK###')
{
# nodetype.provmethod is not set
print "nodetype.provmethod must be specified for nodes: $nodes\n";
$rc=1;
}
else
{
# nodetype.provmethod = <osimage>
# nodetype.provmethod = <osimage>
&checkoption("nodetype.provmethod=$key");
$rclocal=system("nodeset $nodes osimage");
if ($rclocal) {
@ -170,6 +164,9 @@ if($rc){
die "nodeset failure";
}
# call "rsetboot" to set the boot order of the nodehm.mgt=ipmi nodes,for others, assume user has set the correct boot order before "rinstall"
system("rsetboot $noderange net");
# call "rpower" to start the node provision process
$rc=system("rpower $noderange boot");
if ($rc) { die "rpower failure" };

View File

@ -8,7 +8,7 @@ B<rinstall> [I<-o>|I<--osver>] [I<-p>|I<--profile>] [I<-a>|I<--arch>] [I<-O>|I<-
=head1 B<Description>
B<rinstall> is a convience command that will change tables as requested for operating system version, profile, and architecture, call nodeset to modify the network boot configuration, and rpower to begin a boot cycle.
B<rinstall> is a convience command that will change tables as requested for operating system version, profile, and architecture, call B<nodeset> to modify the network boot configuration, call B<rsetboot> net to set the next boot over network (only support nodes with "nodetype.mgt=ipmi", for other nodes, make sure the correct boot order has been set before B<rinstall>), and B<rpower> to begin a boot cycle.
If [I<-O>|I<--osimage>] is specified or nodetype.provmethod=I<osimage> is set, provision the noderange with the osimage specified/configured, ignore the table change options if specified.