diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst index 1eb2d3d68..26042970c 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst @@ -101,6 +101,14 @@ The BMC IP address is obtained by the open range dhcp server and the plan in thi chdef cn01 chain="runcmd=bmcsetup" +#. **[Optional]** More operation plan to do after hardware disocvery is done, ``ondiscover`` option can be used. + + For example, configure console, copy SSH key for **OpenBMC**, then disable ``powersupplyredundancy`` :: + + chdef cn01 -p chain="ondiscover=makegocons|rspconfig:sshcfg|rspconfig:powersupplyredundancy=disabled" + + **Note**: ``|`` is used to split commands, and ``:`` is used to split command with its option. + #. Set the target `osimage` into the chain table to automatically provision the operating system after the node discovery is complete. :: chdef cn01 -p chain="osimage=" @@ -113,6 +121,11 @@ The BMC IP address is obtained by the open range dhcp server and the plan in thi chdef cn01 bmc=50.0.101.1 + **[Optional]** If more configuration planed to be done on BMC, the following command is also needed. :: + + chdef cn01 bmcvlantag= # tag VLAN ID for BMC + chdef cn01 bmcusername= + chdef cn01 bmcpassword= #. Add the compute node IP information to ``/etc/hosts``: :: diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_dhcp.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_dhcp.rst index b5e083ef7..17a7843c9 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_dhcp.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_dhcp.rst @@ -85,6 +85,14 @@ The BMC IP address is obtained by the open range dhcp server and the plan is to chdef cn01 chain="runcmd=bmcsetup" +#. **[Optional]** More operation plan to do after hardware disocvery is done, ``ondiscover`` option can be used. + + For example, configure console, copy SSH key for **OpenBMC**, then disable ``powersupplyredundancy`` :: + + chdef cn01 -p chain="ondiscover=makegocons|rspconfig:sshcfg|rspconfig:powersupplyredundancy=disabled" + + **Note**: ``|`` is used to split commands, and ``:`` is used to split command with its option. + #. Set the target `osimage` into the chain table to automatically provision the operating system after the node discovery is complete. :: chdef cn01 -p chain="osimage=" diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/seq_discovery.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/seq_discovery.rst index 7ec0f41cf..aea009420 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/seq_discovery.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/seq_discovery.rst @@ -18,10 +18,24 @@ Predefine a group of nodes with desired IP address for host and IP address for F nodeadd cn1 groups=powerLE,all chdef cn1 mgt=ipmi cons=ipmi ip=10.0.101.1 bmc=50.0.101.1 netboot=petitboot installnic=mac primarynic=mac +**[Optional]** If more configuration planed to be done on BMC, the following command is also needed. :: + + chdef cn1 bmcvlantag= # tag VLAN ID for BMC + chdef cn1 bmcusername= + chdef cn1 bmcpassword= + In order to do BMC configuration during the discovery process, set ``runcmd=bmcsetup``. :: chdef cn1 chain="runcmd=bmcsetup" +**[Optional]** More operation plan to do after hardware disocvery is done, ``ondiscover`` option can be used. + + For example, configure console, copy SSH key for **OpenBMC**, then disable ``powersupplyredundancy`` :: + + chdef cn01 -p chain="ondiscover=makegocons|rspconfig:sshcfg|rspconfig:powersupplyredundancy=disabled" + + **Note**: ``|`` is used to split commands, and ``:`` is used to split command with its option. + Set the target `osimage` into the chain table to automatically provision the operating system after the node discovery is complete. :: chdef cn1 -p chain="osimage=" diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/switch_discovery.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/switch_discovery.rst index cb5c2d9f4..ffa679488 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/switch_discovery.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/switch_discovery.rst @@ -54,10 +54,25 @@ After switches are defined, the server node can be predefined with the following chdef cn1 mgt=ipmi cons=ipmi ip=10.0.101.1 bmc=50.0.101.1 netboot=petitboot installnic=mac primarynic=mac chdef cn1 switch=switch1 switchport=0 + +**[Optional]** If more configuration planed to be done on BMC, the following command is also needed. :: + + chdef cn1 bmcvlantag= # tag VLAN ID for BMC + chdef cn1 bmcusername= + chdef cn1 bmcpassword= + In order to do BMC configuration during the discovery process, set ``runcmd=bmcsetup``. :: chdef cn1 chain="runcmd=bmcsetup" +**[Optional]** More operation plan to do after hardware disocvery is done, ``ondiscover`` option can be used. + + For example, configure console, copy SSH key for **OpenBMC**, then disable ``powersupplyredundancy`` :: + + chdef cn01 -p chain="ondiscover=makegocons|rspconfig:sshcfg|rspconfig:powersupplyredundancy=disabled" + + **Note**: ``|`` is used to split commands, and ``:`` is used to split command with its option. + Set the target `osimage` into the chain table to automatically provision the operating system after the node discovery is complete. :: chdef cn1 -p chain="osimage=" diff --git a/docs/source/guides/admin-guides/references/man1/rvitals.1.rst b/docs/source/guides/admin-guides/references/man1/rvitals.1.rst index f67fe481d..862f224ae 100644 --- a/docs/source/guides/admin-guides/references/man1/rvitals.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rvitals.1.rst @@ -67,7 +67,7 @@ OpenPOWER (OpenBMC) specific: ============================= -\ **rvitals**\ \ *noderange*\ [\ **temp | voltage | wattage | fanspeed | power | leds | altitude | all**\ ] +\ **rvitals**\ \ *noderange*\ [\ **temp | voltage | wattage | fanspeed | power | leds | altitude | all**\ ] [\ **-V**\ | \ **-**\ **-verbose**\ ] diff --git a/xCAT-client/pods/man1/rvitals.1.pod b/xCAT-client/pods/man1/rvitals.1.pod index e588434f3..4286f74c2 100644 --- a/xCAT-client/pods/man1/rvitals.1.pod +++ b/xCAT-client/pods/man1/rvitals.1.pod @@ -32,7 +32,7 @@ B I [B|B|B|B|B|B I [B|B|B|B|B|B|B|B] +B I [B|B|B|B|B|B|B|B] [B<-V>| B<--verbose>] =head1 B diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/executor/openbmc_bmcconfig.py b/xCAT-openbmc-py/lib/python/agent/hwctl/executor/openbmc_bmcconfig.py index 4ae5f1eff..cd108fb42 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/executor/openbmc_bmcconfig.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/executor/openbmc_bmcconfig.py @@ -386,13 +386,13 @@ rmdir \"/tmp/$userid\" \n") obmc.set_apis_values(key, value) except SelfServerException as e: return self.callback.error(e.message, node) - except SelfClientException: + except SelfClientException as e: if e.code == 404: - return self.callback.error('404 Not Found - Requested endpoint does not exist or may \ - indicate function is not supported on this OpenBMC firmware.', node) + return self.callback.error('404 Not Found - Requested endpoint does not exist or may ' \ + 'indicate function is not supported on this OpenBMC firmware.', node) if e.code == 403: - return self.callback.error('403 Forbidden - Requested endpoint does not exist or may \ - indicate function is not yet supported by OpenBMC firmware.', node) + return self.callback.error('403 Forbidden - Requested endpoint does not exist or may ' \ + 'indicate function is not yet supported by OpenBMC firmware.', node) return self.callback.error(e.message, node) self.callback.info("%s: BMC Setting %s..." % (node, openbmc.RSPCONFIG_APIS[key]['display_name'])) @@ -407,13 +407,13 @@ rmdir \"/tmp/$userid\" \n") except SelfServerException as e: return self.callback.error(e.message, node) - except SelfClientException: + except SelfClientException as e: if e.code == 404: - return self.callback.error('404 Not Found - Requested endpoint does not exist or may \ - indicate function is not supported on this OpenBMC firmware.', node) + return self.callback.error('404 Not Found - Requested endpoint does not exist or may ' \ + 'indicate function is not supported on this OpenBMC firmware.', node) if e.code == 403: - return self.callback.error('403 Forbidden - Requested endpoint does not exist or may \ - indicate function is not yet supported by OpenBMC firmware.', node) + return self.callback.error('403 Forbidden - Requested endpoint does not exist or may ' \ + 'indicate function is not yet supported by OpenBMC firmware.', node) return self.callback.error(e.message, node) if isinstance(value, dict): diff --git a/xCAT-server/lib/xcat/plugins/updatenode.pm b/xCAT-server/lib/xcat/plugins/updatenode.pm index c0dfb4081..8b4559179 100644 --- a/xCAT-server/lib/xcat/plugins/updatenode.pm +++ b/xCAT-server/lib/xcat/plugins/updatenode.pm @@ -1833,6 +1833,7 @@ sub updatenodesyncfiles { command => ["xdcp"], node => $syncfile_node{$synclist}, + username => $request->{username}, arg => $args, env => $env }, diff --git a/xCAT-server/lib/xcat/plugins/xdsh.pm b/xCAT-server/lib/xcat/plugins/xdsh.pm index 2a2c98fd5..50ae19bb3 100644 --- a/xCAT-server/lib/xcat/plugins/xdsh.pm +++ b/xCAT-server/lib/xcat/plugins/xdsh.pm @@ -639,13 +639,18 @@ sub process_servicenodes_xdcp $addreq->{'_xcatdest'} = $::mnname; $addreq->{node} = \@sn; $addreq->{noderange} = \@sn; - $addreq->{forceroot}->[0] = 1; # check input request for --nodestatus my $args = $req->{arg}; # argument if (grep(/^--nodestatus$/, @$args)) { push(@{ $addreq->{arg} }, "--nodestatus"); # return nodestatus } + + if (defined($req->{username}) && ($req->{username}->[0] ne "root")) { + # Using `root` when sync temporary files to `site.SNsyncfiledir` (default: /var/xcat/syncfiles) + push(@{ $addreq->{arg} }, "-l"); + push(@{ $addreq->{arg} }, "root"); + } push(@{ $addreq->{arg} }, "-v"); push(@{ $addreq->{arg} }, "-s"); push(@{ $addreq->{arg} }, "-F"); @@ -1216,9 +1221,6 @@ sub process_request $ENV{DSH_FROM_USERID} = $request->{username}->[0]; } } - if ($request->{forceroot}) { - $ENV{DSH_FROM_USERID} = 'root'; - } if ($command eq "xdsh") { xdsh($nodes, $args, $callback, $command, $request->{noderange}->[0]); diff --git a/xCAT-test/autotest/testcase/rbeacon/cases0 b/xCAT-test/autotest/testcase/rbeacon/cases0 index bf0343c72..b202d46bc 100644 --- a/xCAT-test/autotest/testcase/rbeacon/cases0 +++ b/xCAT-test/autotest/testcase/rbeacon/cases0 @@ -13,7 +13,7 @@ os:Linux hcp:openbmc cmd:rbeacon $$CN stat check:rc==0 -check:output=~$$CN\s*:\s*Front:Off Rear:Off|Front:On Rear:On|Front:Off Rear:On|Front:On Rear:Off +check:output=~$$CN\s*:\s*Front:Off Rear:Off|Front:On Rear:On|Front:Off Rear:On|Front:On Rear:Off|Front:Blink Rear:Blink end start:rbeacon_help