From f3a681d1f1e7aeed353de896e73513c3485c5707 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Tue, 10 Apr 2018 14:38:36 -0400 Subject: [PATCH 1/7] Man page change for rvitals --- docs/source/guides/admin-guides/references/man1/rvitals.1.rst | 2 +- xCAT-client/pods/man1/rvitals.1.pod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 From 462af566a2c3a4b1d9cd777dfd74423e7e24b57c Mon Sep 17 00:00:00 2001 From: ertaozh Date: Tue, 10 Apr 2018 23:07:39 -0400 Subject: [PATCH 2/7] Update doc about ondiscover and bmcvlantag --- .../discovery/mtms/discovery_using_defined.rst | 11 +++++++++++ .../ppc64le/discovery/mtms/discovery_using_dhcp.rst | 6 ++++++ .../ppc64le/discovery/seq_discovery.rst | 12 ++++++++++++ .../ppc64le/discovery/switch_discovery.rst | 13 +++++++++++++ 4 files changed, 42 insertions(+) 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..672e584ed 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,12 @@ 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 and copy SSH key for **OpenBMC** :: + + chdef cn01 -p chain=ondiscover="makegocons|rspconfig:sshcfg" + #. 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 +119,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..e33ac0939 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,12 @@ 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 and copy SSH key for **OpenBMC** :: + + chdef cn01 -p chain=ondiscover="makegocons|rspconfig:sshcfg" + #. 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..5751d9c0e 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,22 @@ 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 and copy SSH key for **OpenBMC** :: + + chdef cn1 -p chain=ondiscover="makegocons|rspconfig:sshcfg" + 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..206a48306 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,23 @@ 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 and copy SSH key for **OpenBMC** :: + + chdef cn01 -p chain=ondiscover="makegocons|rspconfig:sshcfg" + 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=" From 4f8b769ba31c32203d1500792e158a371781a91a Mon Sep 17 00:00:00 2001 From: ertaozh Date: Thu, 12 Apr 2018 05:52:22 -0400 Subject: [PATCH 3/7] update document to add powersupplyredundancy for ondiscover --- .../ppc64le/discovery/mtms/discovery_using_defined.rst | 6 ++++-- .../ppc64le/discovery/mtms/discovery_using_dhcp.rst | 6 ++++-- .../manage_clusters/ppc64le/discovery/seq_discovery.rst | 6 ++++-- .../manage_clusters/ppc64le/discovery/switch_discovery.rst | 6 ++++-- 4 files changed, 16 insertions(+), 8 deletions(-) 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 672e584ed..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 @@ -103,9 +103,11 @@ The BMC IP address is obtained by the open range dhcp server and the plan in thi #. **[Optional]** More operation plan to do after hardware disocvery is done, ``ondiscover`` option can be used. - For example, configure console and copy SSH key for **OpenBMC** :: + For example, configure console, copy SSH key for **OpenBMC**, then disable ``powersupplyredundancy`` :: - chdef cn01 -p chain=ondiscover="makegocons|rspconfig:sshcfg" + 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. :: 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 e33ac0939..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 @@ -87,9 +87,11 @@ The BMC IP address is obtained by the open range dhcp server and the plan is to #. **[Optional]** More operation plan to do after hardware disocvery is done, ``ondiscover`` option can be used. - For example, configure console and copy SSH key for **OpenBMC** :: + For example, configure console, copy SSH key for **OpenBMC**, then disable ``powersupplyredundancy`` :: - chdef cn01 -p chain=ondiscover="makegocons|rspconfig:sshcfg" + 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. :: 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 5751d9c0e..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 @@ -30,9 +30,11 @@ In order to do BMC configuration during the discovery process, set ``runcmd=bmcs **[Optional]** More operation plan to do after hardware disocvery is done, ``ondiscover`` option can be used. - For example, configure console and copy SSH key for **OpenBMC** :: + For example, configure console, copy SSH key for **OpenBMC**, then disable ``powersupplyredundancy`` :: - chdef cn1 -p chain=ondiscover="makegocons|rspconfig:sshcfg" + 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. :: 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 206a48306..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 @@ -67,9 +67,11 @@ In order to do BMC configuration during the discovery process, set ``runcmd=bmcs **[Optional]** More operation plan to do after hardware disocvery is done, ``ondiscover`` option can be used. - For example, configure console and copy SSH key for **OpenBMC** :: + For example, configure console, copy SSH key for **OpenBMC**, then disable ``powersupplyredundancy`` :: - chdef cn01 -p chain=ondiscover="makegocons|rspconfig:sshcfg" + 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. :: From 2c9bdf848056306dc9dd6b3cd6a2970b9efdfa53 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 12 Apr 2018 23:15:26 -0400 Subject: [PATCH 4/7] Properly fix updatenode syncfiles (#5013) * Fix xdcp username on updatenode -F xdcp was not using the username and trusted facility, fix updatenode usage. * Remove security risk of forceroot Any user can specificy 'forceroot'. Remove this and rely upon the other method to properly use the 'trusted' role. --- xCAT-server/lib/xcat/plugins/updatenode.pm | 1 + xCAT-server/lib/xcat/plugins/xdsh.pm | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) 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..3378e512a 100644 --- a/xCAT-server/lib/xcat/plugins/xdsh.pm +++ b/xCAT-server/lib/xcat/plugins/xdsh.pm @@ -639,7 +639,6 @@ 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 @@ -1216,9 +1215,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]); From 7e9fd95111a07d8de61cb0a7593c925ba5b918b0 Mon Sep 17 00:00:00 2001 From: XuWei Date: Thu, 12 Apr 2018 23:17:55 -0400 Subject: [PATCH 5/7] fix typo error for rspconfig powersupplyredundancy --- .../agent/hwctl/executor/openbmc_bmcconfig.py | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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): From 4b1709e59d81a198736ea6c23a969a8c3c4308e0 Mon Sep 17 00:00:00 2001 From: Bin Xu Date: Fri, 13 Apr 2018 16:58:42 +0800 Subject: [PATCH 6/7] When xdcp files to CN and CN is controlled by a SN, xcat will push (#5102) files to SN first (site.SNsyncfiledir). This should be run as admin for normal user as they cannot touch that directory. --- xCAT-server/lib/xcat/plugins/xdsh.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/xdsh.pm b/xCAT-server/lib/xcat/plugins/xdsh.pm index 3378e512a..50ae19bb3 100644 --- a/xCAT-server/lib/xcat/plugins/xdsh.pm +++ b/xCAT-server/lib/xcat/plugins/xdsh.pm @@ -645,6 +645,12 @@ sub process_servicenodes_xdcp 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"); From b239bfafd9d4bfcfa40a1ffb9dfd9b8b5279d87a Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Fri, 13 Apr 2018 05:10:53 -0400 Subject: [PATCH 7/7] update a light status --- xCAT-test/autotest/testcase/rbeacon/cases0 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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