diff --git a/docs/source/guides/admin-guides/references/man8/nodeset.8.rst b/docs/source/guides/admin-guides/references/man8/nodeset.8.rst index 3da5ec913..d8c0be67f 100644 --- a/docs/source/guides/admin-guides/references/man8/nodeset.8.rst +++ b/docs/source/guides/admin-guides/references/man8/nodeset.8.rst @@ -19,11 +19,11 @@ Name **************** -\ **nodeset**\ [\ *noderange*\ ] [\ **boot**\ | \ **stat**\ | \ **iscsiboot**\ | \ **offline**\ | \ **runcmd=bmcsetup**\ | \ **osimage**\ = \ *imagename*\ | \ **shell**\ | \ **shutdown**\ ] +\ **nodeset**\ \ *noderange*\ [\ **boot**\ | \ **stat**\ | \ **iscsiboot**\ | \ **offline**\ | \ **runcmd=bmcsetup**\ | \ **osimage**\ [=\ *imagename*\ ] | \ **shell**\ | \ **shutdown**\ ] -\ **nodeset**\ \ *noderange*\ \ **osimage=**\ \ *imagename*\ [\ **-**\ **-noupdateinitrd**\ ] [\ **-**\ **-ignorekernelchk**\ ] +\ **nodeset**\ \ *noderange*\ \ **osimage**\ [=\ *imagename*\ ] [\ **-**\ **-noupdateinitrd**\ ] [\ **-**\ **-ignorekernelchk**\ ] -\ **nodeset**\ \ *noderange*\ \ **runimage=**\ \ *task*\ +\ **nodeset**\ \ *noderange*\ \ **runimage=**\ \ *task*\ \ **nodeset**\ [\ **-h | -**\ **-help | -v | -**\ **-version**\ ] @@ -74,7 +74,7 @@ A user can supply their own scripts to be run on the mn or on the service node ( -\ **osimage | osimage= +\ **osimage | osimage=**\ \ *imagename*\ Prepare server for installing a node using the specified os image. The os image is defined in the \ *osimage*\ table and \ *linuximage*\ table. If the is omitted, the os image name will be obtained from \ *nodetype.provmethod*\ for the node. diff --git a/perl-xCAT/xCAT/Usage.pm b/perl-xCAT/xCAT/Usage.pm index d8fbb63b3..f7c60288e 100755 --- a/perl-xCAT/xCAT/Usage.pm +++ b/perl-xCAT/xCAT/Usage.pm @@ -459,7 +459,7 @@ Options: "Usage: Common: nodeset [-h|--help|-v|--version] - nodeset [shell|boot|runcmd=bmcsetup|iscsiboot|osimage[=]|offline]", + nodeset [shell|boot|runcmd=bmcsetup|iscsiboot|osimage[=]|offline|shutdown|stat]", "rmflexnode" => "Usage: rmflexnode [-h|--help|-v|--version] diff --git a/xCAT-client/pods/man8/nodeset.8.pod b/xCAT-client/pods/man8/nodeset.8.pod index 6741beb92..835b7de8a 100644 --- a/xCAT-client/pods/man8/nodeset.8.pod +++ b/xCAT-client/pods/man8/nodeset.8.pod @@ -4,11 +4,11 @@ B - set the boot state for a noderange =head1 B -B [I] [B | B | B | B | B | B= I | B | B] +B I [B | B | B | B | B | B[=I] | B | B] -B I B I [B<--noupdateinitrd>] [B<--ignorekernelchk>] +B I B[=I] [B<--noupdateinitrd>] [B<--ignorekernelchk>] -B I B I +B I BI B [B<-h>|B<--help>|B<-v>|B<--version>] @@ -49,7 +49,7 @@ Instruct network boot loader to be skipped, generally meaning boot to hard disk Cleanup the current pxe/tftp boot configuration files for the nodes requested -=item B|B> +=item B|BI Prepare server for installing a node using the specified os image. The os image is defined in the I table and I table. If the is omitted, the os image name will be obtained from I for the node. diff --git a/xCAT-server/lib/xcat/plugins/grub2.pm b/xCAT-server/lib/xcat/plugins/grub2.pm index 418a67f30..4317c1eb0 100644 --- a/xCAT-server/lib/xcat/plugins/grub2.pm +++ b/xCAT-server/lib/xcat/plugins/grub2.pm @@ -23,7 +23,7 @@ my $globaltftpdir = xCAT::TableUtils->getTftpDir(); my %usage = ( - "nodeset" => "Usage: nodeset [shell|boot|runcmd=bmcsetup|iscsiboot|osimage[=]|offline]", + "nodeset" => "Usage: nodeset [shell|boot|runcmd=bmcsetup|iscsiboot|osimage[=]|offline|shutdown|stat]", ); sub handled_commands { # process noderes:netboot like "grub2-" @@ -620,6 +620,31 @@ sub process_request { { $validarch = $osimgent->{'osarch'}; } + else + { + # Can not determine arch from osimage definition. This is most likely + # the case when nodeset is "shell" or "shutdown". Look at node definition, to + # figure out arch to use. + + # get nodename from osimagenodehash hash + my $node_name = $osimagenodehash{$osimage}[0]; + + # lookup node arch setting + my $node_entry = $typetab->getNodeAttribs($node_name,['arch']); + if ($node_entry and $node_entry->{'arch'}) + { + # Extracted arch from node definition + $validarch = $node_entry->{'arch'}; + } + else + { + # At this point we can not determine architecture either + # from osimage or node definition. + my $rsp; + push @{$rsp->{data}}, "Not able to determine architecture of node $node_name. Verify arch attribute setting.\n"; + xCAT::MsgUtils->message("E", $rsp, $callback); + } + } if ($validarch =~ /ppc64/i) { $validarch="ppc"