From 452d29eec60874ddfe3d60d0ce7e1d81797b8299 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 1 Aug 2018 14:26:41 -0400 Subject: [PATCH 1/2] Allow any command for runcmd= flags --- .../admin-guides/references/man8/nodeset.8.rst | 17 +++++++++++++---- .../admin-guides/references/man8/rinstall.8.rst | 16 +++++++++++++--- xCAT-client/pods/man8/nodeset.8.pod | 12 ++++++++---- xCAT-client/pods/man8/rinstall.8.pod | 11 ++++++++--- xCAT-server/lib/xcat/plugins/rinstall.pm | 4 ++-- 5 files changed, 44 insertions(+), 16 deletions(-) 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 aeb8275c6..79b9354f0 100644 --- a/docs/source/guides/admin-guides/references/man8/nodeset.8.rst +++ b/docs/source/guides/admin-guides/references/man8/nodeset.8.rst @@ -19,7 +19,7 @@ Name **************** -\ **nodeset**\ \ *noderange*\ [\ **boot**\ | \ **stat**\ [\ **-a**\ ]| \ **offline**\ | \ **runcmd=bmcsetup**\ | \ **osimage**\ [=\ *imagename*\ ] | \ **shell**\ | \ **shutdown**\ ] [\ **-V | -**\ **-verbose**\ ] +\ **nodeset**\ \ *noderange*\ [\ **boot**\ | \ **stat**\ [\ **-a**\ ]| \ **offline**\ | \ **runcmd=**\ \ *command*\ | \ **osimage**\ [=\ *imagename*\ ] | \ **shell**\ | \ **shutdown**\ ] [\ **-V | -**\ **-verbose**\ ] \ **nodeset**\ \ *noderange*\ \ **osimage**\ [=\ *imagename*\ ] [\ **-**\ **-noupdateinitrd**\ ] [\ **-**\ **-ignorekernelchk**\ ] @@ -113,10 +113,9 @@ A user can supply their own scripts to be run on the mn or on the service node ( -\ **runcmd=bmcsetup**\ +\ **runcmd=**\ \ *command*\ - This instructs the node to boot to the xCAT nbfs environment and proceed to configure BMC - for basic remote access. This causes the IP, netmask, gateway, username, and password to be programmed according to the configuration table. + This instructs the node to boot to the xCAT genesis environment and specified command to be executed. This causes the IP, netmask, gateway, username, and password to be programmed according to the configuration in node object definition. @@ -199,6 +198,16 @@ root directory and the TFTP xCAT subdirectory. /tftpboot and +3. Boot node1 into genesis environment and execute bmcsetup script. + + + .. code-block:: perl + + rinstall node1 runcmd=bmcsetup + + + + ************************ \ **See**\ \ **Also**\ diff --git a/docs/source/guides/admin-guides/references/man8/rinstall.8.rst b/docs/source/guides/admin-guides/references/man8/rinstall.8.rst index e23516a8c..cd64a14b1 100644 --- a/docs/source/guides/admin-guides/references/man8/rinstall.8.rst +++ b/docs/source/guides/admin-guides/references/man8/rinstall.8.rst @@ -19,7 +19,7 @@ Name **************** -\ **rinstall**\ \ *noderange*\ [\ **boot**\ | \ **shell**\ | \ **runcmd=bmcsetup**\ ] [\ **-c | -**\ **-console**\ ] [\ **-V | -**\ **-verbose**\ ] +\ **rinstall**\ \ *noderange*\ [\ **boot**\ | \ **shell**\ | \ **runcmd=**\ \ *command*\ ] [\ **-c | -**\ **-console**\ ] [\ **-V | -**\ **-verbose**\ ] \ **rinstall**\ \ *noderange*\ \ **osimage**\ [=\ *imagename*\ ] [\ **-**\ **-ignorekernelchk**\ ] [\ **-c | -**\ **-console**\ ] [\ **-u | -**\ **-uefimode**\ ] [\ **-V | -**\ **-verbose**\ ] @@ -70,9 +70,9 @@ If \ **-c**\ is specified, it will then run \ **rcons**\ on the node. This is -\ **runcmd=bmcsetup**\ +\ **runcmd=**\ \ *command*\ - This instructs the node to boot to the xCAT nbfs environment and proceed to configure BMC for basic remote access. This causes the IP, netmask, gateway, username, and password to be programmed according to the configuration table. + This instructs the node to boot to the xCAT genesis environment and specified command to be executed. This causes the IP, netmask, gateway, username, and password to be programmed according to the configuration in node object definition. @@ -150,6 +150,16 @@ If \ **-c**\ is specified, it will then run \ **rcons**\ on the node. This is +4. Boot node1 into genesis environment and execute bmcsetup script. + + + .. code-block:: perl + + rinstall node1 runcmd=bmcsetup + + + + ************************ \ **See**\ \ **Also**\ diff --git a/xCAT-client/pods/man8/nodeset.8.pod b/xCAT-client/pods/man8/nodeset.8.pod index bf6692de5..42270aa82 100644 --- a/xCAT-client/pods/man8/nodeset.8.pod +++ b/xCAT-client/pods/man8/nodeset.8.pod @@ -4,7 +4,7 @@ B - set the boot state for a noderange =head1 B -B I [B | B [B<-a>]| B | B | B[=I] | B | B] [B<-V>|B<--verbose>] +B I [B | B [B<-a>]| B | BI | B[=I] | B | B] [B<-V>|B<--verbose>] B I B[=I] [B<--noupdateinitrd>] [B<--ignorekernelchk>] @@ -78,10 +78,9 @@ If you would like to run a task after deployment, you can define that task with Display the current boot loader config file description for the nodes requested. When B is set, using B<-a> to display them on all available service nodes. -=item B +=item BI -This instructs the node to boot to the xCAT nbfs environment and proceed to configure BMC -for basic remote access. This causes the IP, netmask, gateway, username, and password to be programmed according to the configuration table. +This instructs the node to boot to the xCAT genesis environment and specified command to be executed. This causes the IP, netmask, gateway, username, and password to be programmed according to the configuration in node object definition. =item B @@ -138,6 +137,11 @@ To run http://$master/image.tgz after deployment: nodeset $node runimage=http://$MASTER/image.tgz +=item 3. +Boot node1 into genesis environment and execute bmcsetup script. + + rinstall node1 runcmd=bmcsetup + =back =head1 B B diff --git a/xCAT-client/pods/man8/rinstall.8.pod b/xCAT-client/pods/man8/rinstall.8.pod index 80bed7016..5a7900a47 100644 --- a/xCAT-client/pods/man8/rinstall.8.pod +++ b/xCAT-client/pods/man8/rinstall.8.pod @@ -4,7 +4,7 @@ B - Begin OS provision on a noderange =head1 B -B I [B | B | B] [B<-c>|B<--console>] [B<-V>|B<--verbose>] +B I [B | B | BI] [B<-c>|B<--console>] [B<-V>|B<--verbose>] B I B[=I] [B<--ignorekernelchk>] [B<-c>|B<--console>] [B<-u>|B<--uefimode>] [B<-V>|B<--verbose>] @@ -40,9 +40,9 @@ Skip the kernel version checking when injecting drivers from osimage.driverupdat If you would like to run a task after deployment, you can define that task with this attribute. -=item B +=item BI -This instructs the node to boot to the xCAT nbfs environment and proceed to configure BMC for basic remote access. This causes the IP, netmask, gateway, username, and password to be programmed according to the configuration table. +This instructs the node to boot to the xCAT genesis environment and specified command to be executed. This causes the IP, netmask, gateway, username, and password to be programmed according to the configuration in node object definition. =item B @@ -91,6 +91,11 @@ Provision node1 and start a console to monitor the process. rinstall node1 -c +=item 4. +Boot node1 into genesis environment and execute bmcsetup script. + + rinstall node1 runcmd=bmcsetup + =back =head1 B B diff --git a/xCAT-server/lib/xcat/plugins/rinstall.pm b/xCAT-server/lib/xcat/plugins/rinstall.pm index d117f3035..c1c942669 100644 --- a/xCAT-server/lib/xcat/plugins/rinstall.pm +++ b/xCAT-server/lib/xcat/plugins/rinstall.pm @@ -113,7 +113,7 @@ sub rinstall { $OSIMAGE = $1; # osimage was specified xCAT::MsgUtils->message("I", $rsp, $callback); } - elsif ($state =~ /^boot$|^shell$|^osimage$|^runcmd=bmcsetup$|^runimage=/) { + elsif ($state =~ /^boot$|^shell$|^osimage$|^runcmd=|^runimage=/) { # the rest are valid actions, just pass to nodeset $STATES=$state; } @@ -584,7 +584,7 @@ sub usage { my $callback = shift; my $rsp = {}; $rsp->{data}->[0] = "Usage:"; - $rsp->{data}->[1] = " $command [boot | shell | runcmd=bmcsetup] [-c|--console] [-u|--uefimode] [-V|--verbose]"; + $rsp->{data}->[1] = " $command [boot | shell | runcmd=] [-c|--console] [-u|--uefimode] [-V|--verbose]"; $rsp->{data}->[2] = " $command osimage[=] [--ignorekernelchk] [-c|--console] [-u|--uefimode] [-V|--verbose]"; $rsp->{data}->[3] = " $command runimage="; $rsp->{data}->[4] = " $command [-h|--help|-v|--version]"; From ac7b9ab5efc271dd02d86ee051722c926d238538 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 2 Aug 2018 13:42:17 -0400 Subject: [PATCH 2/2] Updated man pages --- docs/source/guides/admin-guides/references/man8/nodeset.8.rst | 4 ++-- .../source/guides/admin-guides/references/man8/rinstall.8.rst | 4 ++-- xCAT-client/pods/man8/nodeset.8.pod | 4 ++-- xCAT-client/pods/man8/rinstall.8.pod | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) 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 79b9354f0..8e033b961 100644 --- a/docs/source/guides/admin-guides/references/man8/nodeset.8.rst +++ b/docs/source/guides/admin-guides/references/man8/nodeset.8.rst @@ -115,7 +115,7 @@ A user can supply their own scripts to be run on the mn or on the service node ( \ **runcmd=**\ \ *command*\ - This instructs the node to boot to the xCAT genesis environment and specified command to be executed. This causes the IP, netmask, gateway, username, and password to be programmed according to the configuration in node object definition. + This instructs the node to boot to the xCAT genesis environment and specified command to be executed. @@ -198,7 +198,7 @@ root directory and the TFTP xCAT subdirectory. /tftpboot and -3. Boot node1 into genesis environment and execute bmcsetup script. +3. Boot node1 into xCAT genesis environment and execute bmcsetup script. This causes the IP, netmask, gateway, username, and password to be programmed according to the configuration in node object definition. .. code-block:: perl diff --git a/docs/source/guides/admin-guides/references/man8/rinstall.8.rst b/docs/source/guides/admin-guides/references/man8/rinstall.8.rst index cd64a14b1..72c6298d5 100644 --- a/docs/source/guides/admin-guides/references/man8/rinstall.8.rst +++ b/docs/source/guides/admin-guides/references/man8/rinstall.8.rst @@ -72,7 +72,7 @@ If \ **-c**\ is specified, it will then run \ **rcons**\ on the node. This is \ **runcmd=**\ \ *command*\ - This instructs the node to boot to the xCAT genesis environment and specified command to be executed. This causes the IP, netmask, gateway, username, and password to be programmed according to the configuration in node object definition. + This instructs the node to boot to the xCAT genesis environment and specified command to be executed. @@ -150,7 +150,7 @@ If \ **-c**\ is specified, it will then run \ **rcons**\ on the node. This is -4. Boot node1 into genesis environment and execute bmcsetup script. +4. Boot node1 into xCAT genesis environment and execute bmcsetup script. This causes the IP, netmask, gateway, username, and password to be programmed according to the configuration in node object definition. .. code-block:: perl diff --git a/xCAT-client/pods/man8/nodeset.8.pod b/xCAT-client/pods/man8/nodeset.8.pod index 42270aa82..69712a268 100644 --- a/xCAT-client/pods/man8/nodeset.8.pod +++ b/xCAT-client/pods/man8/nodeset.8.pod @@ -80,7 +80,7 @@ Display the current boot loader config file description for the nodes requested. =item BI -This instructs the node to boot to the xCAT genesis environment and specified command to be executed. This causes the IP, netmask, gateway, username, and password to be programmed according to the configuration in node object definition. +This instructs the node to boot to the xCAT genesis environment and specified command to be executed. =item B @@ -138,7 +138,7 @@ To run http://$master/image.tgz after deployment: nodeset $node runimage=http://$MASTER/image.tgz =item 3. -Boot node1 into genesis environment and execute bmcsetup script. +Boot node1 into xCAT genesis environment and execute bmcsetup script. This causes the IP, netmask, gateway, username, and password to be programmed according to the configuration in node object definition. rinstall node1 runcmd=bmcsetup diff --git a/xCAT-client/pods/man8/rinstall.8.pod b/xCAT-client/pods/man8/rinstall.8.pod index 5a7900a47..f12773f4d 100644 --- a/xCAT-client/pods/man8/rinstall.8.pod +++ b/xCAT-client/pods/man8/rinstall.8.pod @@ -42,7 +42,7 @@ If you would like to run a task after deployment, you can define that task with =item BI -This instructs the node to boot to the xCAT genesis environment and specified command to be executed. This causes the IP, netmask, gateway, username, and password to be programmed according to the configuration in node object definition. +This instructs the node to boot to the xCAT genesis environment and specified command to be executed. =item B @@ -92,7 +92,7 @@ Provision node1 and start a console to monitor the process. rinstall node1 -c =item 4. -Boot node1 into genesis environment and execute bmcsetup script. +Boot node1 into xCAT genesis environment and execute bmcsetup script. This causes the IP, netmask, gateway, username, and password to be programmed according to the configuration in node object definition. rinstall node1 runcmd=bmcsetup