mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 19:32:31 +00:00 
			
		
		
		
	Process --noupdateinitrd and --ignorekernelchk flags even when osimage is not specified
This commit is contained in:
		| @@ -393,9 +393,12 @@ site Attributes: | ||||
|                entries generated by 'makehosts' will put the FQDN before the PQDN(Partially  | ||||
|                Qualified Domain Name). Otherwise, the original behavior will be performed. | ||||
|    | ||||
|    hierarchicalattrs:  Table attributes(e.g. postscripts, postbootscripts) that will be | ||||
|                        included hierarchically. Attribute values for all the node's groups | ||||
|    hierarchicalattrs:  A comma delimited list of table attributes(e.g. postscripts, postbootscripts) | ||||
|                        that will be included hierarchically. Attribute values for all the node's groups | ||||
|                        will be applied to the node in the groups' order except the repeat one. | ||||
|                        By default, comma is used to combine the values. But some columns use different  | ||||
|                        delimiter, to specify delimiter for those columns as format of 'column:delimiter'. | ||||
|    | ||||
|    dbtracelevel:  The trace level for the database access log. To activate this setting, please.  | ||||
|                   restart xcatd or send HUP signal to the 'xcatd: DB Access' process, Like: . | ||||
|                   ps -ef | grep 'xcatd: DB Access' | grep -v grep | awk '{print $2}' | xargs kill -HUP   | ||||
|   | ||||
| @@ -21,7 +21,7 @@ Name | ||||
|  | ||||
| \ **rinstall**\  \ *noderange*\  [\ **boot**\  | \ **shell**\  | \ **runcmd=**\ \ *command*\ ] [\ **-c | -**\ **-console**\ ] [\ **-V | -**\ **-verbose**\ ] | ||||
|  | ||||
| \ **rinstall**\  \ *noderange*\  \ **osimage**\ [=\ *imagename*\ ] [\ **-**\ **-noupdateinitrd**\ ][\ **-**\ **-ignorekernelchk**\ ] [\ **-c | -**\ **-console**\ ] [\ **-u | -**\ **-uefimode**\ ] [\ **-V | -**\ **-verbose**\ ] | ||||
| \ **rinstall**\  \ *noderange*\  [\ **osimage**\ [=\ *imagename*\ ]] [\ **-**\ **-noupdateinitrd**\ ][\ **-**\ **-ignorekernelchk**\ ] [\ **-c | -**\ **-console**\ ] [\ **-u | -**\ **-uefimode**\ ] [\ **-V | -**\ **-verbose**\ ] | ||||
|  | ||||
| \ **rinstall**\  \ *noderange*\  \ **runimage=**\ \ *task*\  | ||||
|  | ||||
| @@ -35,9 +35,9 @@ Name | ||||
|  | ||||
| \ **rinstall**\  is a convenience command to begin OS provision on a noderange. | ||||
|  | ||||
| If \ **osimage**\ =\ *imagename*\  is specified or \ **osimage**\  is specified and nodetype.provmethod=\ **osimage**\  is set, provision the noderange with the osimage specified/configured. | ||||
| If \ **osimage**\ =\ *imagename*\  is specified or \ **osimage**\  is specified and nodetype.provmethod=\ *osimage*\  is set, provision the noderange with the osimage specified/configured. If no task specified, default is \ **osimage**\ . | ||||
|  | ||||
| If \ **-c**\  is specified, it will then run \ **rcons**\  on the node. This is allowed only if one node is in the noderange. If consoles are needed on multiple nodes, see winstall(8)|winstall.8. | ||||
| If \ **-c**\  is specified, \ **rinstall**\  will run \ **rcons**\  on the node. This is allowed only if one node is in the noderange. If consoles are needed on multiple nodes, see winstall(8)|winstall.8. | ||||
|  | ||||
|  | ||||
| *************** | ||||
|   | ||||
| @@ -6,7 +6,7 @@ B<rinstall> - Begin OS provision on a noderange | ||||
|  | ||||
| B<rinstall> I<noderange> [B<boot> | B<shell> | B<runcmd=>I<command>] [B<-c>|B<--console>] [B<-V>|B<--verbose>] | ||||
|  | ||||
| B<rinstall> I<noderange> B<osimage>[=I<imagename>] [B<--noupdateinitrd>][B<--ignorekernelchk>] [B<-c>|B<--console>] [B<-u>|B<--uefimode>] [B<-V>|B<--verbose>] | ||||
| B<rinstall> I<noderange> [B<osimage>[=I<imagename>]] [B<--noupdateinitrd>][B<--ignorekernelchk>] [B<-c>|B<--console>] [B<-u>|B<--uefimode>] [B<-V>|B<--verbose>] | ||||
|  | ||||
| B<rinstall> I<noderange> B<runimage=>I<task> | ||||
|  | ||||
| @@ -16,9 +16,9 @@ B<rinstall> [B<-h>|B<--help>|B<-v>|B<--version>] | ||||
|  | ||||
| B<rinstall> is a convenience command to begin OS provision on a noderange. | ||||
|  | ||||
| If B<osimage>=I<imagename> is specified or B<osimage> is specified and nodetype.provmethod=B<osimage> is set, provision the noderange with the osimage specified/configured. | ||||
| If B<osimage>=I<imagename> is specified or B<osimage> is specified and nodetype.provmethod=I<osimage> is set, provision the noderange with the osimage specified/configured. If no task specified, default is B<osimage>. | ||||
|  | ||||
| If B<-c> is specified, it will then run B<rcons> on the node. This is allowed only if one node is in the noderange. If consoles are needed on multiple nodes, see L<winstall(8)|winstall.8>. | ||||
| If B<-c> is specified, B<rinstall> will run B<rcons> on the node. This is allowed only if one node is in the noderange. If consoles are needed on multiple nodes, see L<winstall(8)|winstall.8>. | ||||
|  | ||||
| =head1 B<Options> | ||||
|  | ||||
|   | ||||
| @@ -257,12 +257,6 @@ sub rinstall { | ||||
|  | ||||
|         push @parameter, "osimage=$OSIMAGE"; | ||||
|  | ||||
|         if ($ignorekernelchk) { | ||||
|             push @parameter, "--ignorekernelchk"; | ||||
|         } | ||||
|         if ($noupdateinitrd) { | ||||
|             push @parameter, "--noupdateinitrd"; | ||||
|         } | ||||
|     } | ||||
|     elsif ($STATES) { | ||||
|         push @parameter, "$STATES"; | ||||
| @@ -318,6 +312,18 @@ sub rinstall { | ||||
|         #only provision the normal nodes | ||||
|         @nodes = @validnodes; | ||||
|         push @parameter, "osimage"; | ||||
|  | ||||
|     } | ||||
|  | ||||
|     if ( grep( /osimage/, @parameter ) ) { | ||||
|         # Task is osimage, check --ignorekernelchk and --noupdateinitrd flags and set if needed | ||||
|  | ||||
|         if ($ignorekernelchk) { | ||||
|             push @parameter, "--ignorekernelchk"; | ||||
|         } | ||||
|         if ($noupdateinitrd) { | ||||
|             push @parameter, "--noupdateinitrd"; | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     if (scalar(@nodes) == 0) { | ||||
| @@ -406,7 +412,7 @@ sub rinstall { | ||||
|         $::RUNCMD_RC = 0; | ||||
|         my @nodes = @{ $hmhash{$hmkey} }; | ||||
|         unless ($hmkey =~ /^(ipmi|blade|hmc|ivm|fsp|kvm|esx|rhevm|openbmc)$/)  { | ||||
|             $rsp->{error}->[0] = "@nodes: rinstall only support nodehm.mgt type 'ipmi', 'blade', 'hmc', 'ivm', 'fsp', 'kvm', 'esx', 'rhevm'."; | ||||
|             $rsp->{error}->[0] = "@nodes: rinstall only support nodehm.mgt type 'ipmi', 'blade', 'hmc', 'ivm', 'fsp', 'kvm', 'esx', 'rhevm', 'openbmc'."; | ||||
|             $rsp->{errorcode}->[0] = 1; | ||||
|             xCAT::MsgUtils->message("E", $rsp, $callback); | ||||
|             next; | ||||
| @@ -598,7 +604,7 @@ sub usage { | ||||
|     my $rsp      = {}; | ||||
|     $rsp->{data}->[0] = "Usage:"; | ||||
|     $rsp->{data}->[1] = "   $command <noderange> [boot | shell | runcmd=<command>] [-c|--console] [-u|--uefimode] [-V|--verbose]"; | ||||
|     $rsp->{data}->[2] = "   $command <noderange> osimage[=<imagename>] [--noupdateinitrd] [--ignorekernelchk] [-c|--console] [-u|--uefimode] [-V|--verbose]"; | ||||
|     $rsp->{data}->[2] = "   $command <noderange> [osimage[=<imagename>]] [--noupdateinitrd] [--ignorekernelchk] [-c|--console] [-u|--uefimode] [-V|--verbose]"; | ||||
|     $rsp->{data}->[3] = "   $command <noderange> runimage=<task>"; | ||||
|     $rsp->{data}->[4] = "   $command [-h|--help|-v|--version]"; | ||||
|     xCAT::MsgUtils->message("I", $rsp, $callback); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user