From e8d1d7cf00b87937f5fc0954d1cf56229340efbf Mon Sep 17 00:00:00 2001 From: immarvin Date: Thu, 6 Jun 2013 03:14:34 +0000 Subject: [PATCH] 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/branches/2.8@16562 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/bin/rinstall | 19 ++++++++----------- xCAT-client/pods/man8/rinstall.8.pod | 2 +- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/xCAT-client/bin/rinstall b/xCAT-client/bin/rinstall index 6a9937dff..13a17910d 100755 --- a/xCAT-client/bin/rinstall +++ b/xCAT-client/bin/rinstall @@ -91,7 +91,7 @@ if($OSIMAGE){ # then set the boot state of each node based on the nodetype.provmethod: # 1) if nodetype.provmethod = , 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 = + # nodetype.provmethod = &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" }; diff --git a/xCAT-client/pods/man8/rinstall.8.pod b/xCAT-client/pods/man8/rinstall.8.pod index 85b9f78b7..1988ace26 100644 --- a/xCAT-client/pods/man8/rinstall.8.pod +++ b/xCAT-client/pods/man8/rinstall.8.pod @@ -8,7 +8,7 @@ B [I<-o>|I<--osver>] [I<-p>|I<--profile>] [I<-a>|I<--arch>] [I<-O>|I<- =head1 B -B 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 is a convience command that will change tables as requested for operating system version, profile, and architecture, call B to modify the network boot configuration, call B 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), and B to begin a boot cycle. If [I<-O>|I<--osimage>] is specified or nodetype.provmethod=I is set, provision the noderange with the osimage specified/configured, ignore the table change options if specified.