From e70ed0f3f0951b4474a3ffb5d9b2a97b869432ac Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Thu, 25 Jan 2018 09:17:41 -0500 Subject: [PATCH 1/8] Handle some warning messages based on this code - isn't numeric in numeric ne (!=) - Scalar value @attr_value[-1] better written as $attr_value[-1] --- xCAT-server/lib/xcat/plugins/openbmc.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 87a979061..66ef88298 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -1171,7 +1171,7 @@ sub parse_args { my $all_subcommand = ""; foreach $subcommand (@ARGV) { $::RSPCONFIG_CONFIGURED_API_KEY = &is_valid_config_api($subcommand, $callback); - if ($::RSPCONFIG_CONFIGURED_API_KEY != -1) { + if ($::RSPCONFIG_CONFIGURED_API_KEY ne -1) { # subcommand defined in the configured API hash, return from here, the RSPCONFIG_CONFIGURED_API_KEY is the key into the hash return; } @@ -1574,7 +1574,7 @@ sub parse_command_status { my @options = (); my $num_subcommand = @$subcommands; #Setup chain to process the configured command - if ($::RSPCONFIG_CONFIGURED_API_KEY != -1) { + if ($::RSPCONFIG_CONFIGURED_API_KEY ne -1) { $subcommand = $$subcommands[0]; # Check if setting or quering if ($subcommand =~ /^(\w+)=(.*)/) { @@ -3609,7 +3609,7 @@ sub rspconfig_api_config_response { # For example "xyz.openbmc_project.Control.Power.RestorePolicy.Policy.Restore" # will be displayed as "Restore" my @attr_value = split('\.', $value); - my $last_component = @attr_value[-1]; + my $last_component = $attr_value[-1]; my @valid_values = values $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_value}; if ($value) { if ($value ~~ @valid_values) { From e2d49ce2b273069df2b9277f650128fbcff5a9e6 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Thu, 25 Jan 2018 13:12:21 -0500 Subject: [PATCH 2/8] Add data structure to support get/set BootMode of the BMC --- xCAT-server/lib/xcat/plugins/openbmc.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 66ef88298..18d4cc796 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -596,6 +596,20 @@ my %api_config_info = ( type => "boolean", subcommand => "autoreboot", }, + RSPCONFIG_BOOT_MODE => { + command => "rspconfig", + url => "/control/host0/boot", + attr_url => "BootMode", + display_name => "BMC BootMode", + instruct_msg => "", + type => "attribute", + subcommand => "bootmode", + attr_value => { + regular => "xyz.openbmc_project.Control.Boot.Mode.Modes.Regular", + safe => "xyz.openbmc_project.Control.Boot.Mode.Modes.Safe", + setup => "xyz.openbmc_project.Control.Boot.Mode.Modes.Setup", + }, + }, RSPCONFIG_POWERSUPPLY_REDUNDANCY => { command => "rspconfig", url => "/sensors/chassis/PowerSupplyRedundancy", From 0a51ba60fdda3e64549b6ddbf83bb6a712771b56 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Thu, 25 Jan 2018 13:26:51 -0500 Subject: [PATCH 3/8] Reduce duplicate print statement, only print when value does not match --- xCAT-server/lib/xcat/plugins/openbmc.pm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 18d4cc796..7ef7e5947 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -3626,13 +3626,12 @@ sub rspconfig_api_config_response { my $last_component = $attr_value[-1]; my @valid_values = values $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_value}; if ($value) { - if ($value ~~ @valid_values) { - # Received one of the expected values (defined in attr_value hash for this command - xCAT::SvrUtils::sendmsg($api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{display_name} . " : $last_component", $callback, $node); - } else { + xCAT::SvrUtils::sendmsg($api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{display_name} . " : $last_component", $callback, $node); + my $found = grep(/$value/, @valid_values); + if ($found eq 0) { # Received data value not expected - xCAT::SvrUtils::sendmsg($api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{display_name} . " : $last_component", $callback, $node); - xCAT::SvrUtils::sendmsg("Warning: Unexpected value set. Valid values: " . join(",", @valid_values), $callback, $node); + xCAT::SvrUtils::sendmsg("WARNING: Unexpected value set: $value", $callback, $node); + xCAT::SvrUtils::sendmsg("WARNING: Valid values: " . join(",", @valid_values), $callback, $node); } } else { From 84ea2dd458583c5a8f37564d34bbbf1103e995da Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Thu, 25 Jan 2018 13:56:21 -0500 Subject: [PATCH 4/8] PowerSupplyRedundancy does not take effect in bmcreboot, but on IPL --- xCAT-server/lib/xcat/plugins/openbmc.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 7ef7e5947..3a6a3514c 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -616,7 +616,7 @@ my %api_config_info = ( attr_url => "/action/setValue", query_url => "/action/getValue", display_name => "BMC PowerSupplyRedundancy", - instruct_msg => "bmc reboot is required", + instruct_msg => "", type => "action_attribute", subcommand => "powersupplyredundancy", attr_value => { From dc5e5fb3e2020e06a5002a0da208353e0dd2be53 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Thu, 25 Jan 2018 14:16:59 -0500 Subject: [PATCH 5/8] Adding man page for rspconfig to add boot mode --- .../admin-guides/references/man1/rspconfig.1.rst | 10 ++++++++++ xCAT-client/pods/man1/rspconfig.1.pod | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/docs/source/guides/admin-guides/references/man1/rspconfig.1.rst b/docs/source/guides/admin-guides/references/man1/rspconfig.1.rst index f8d9e8b85..118a39de1 100644 --- a/docs/source/guides/admin-guides/references/man1/rspconfig.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rspconfig.1.rst @@ -63,6 +63,10 @@ OpenBMC specific: \ **rspconfig**\ \ *noderange*\ \ **autoreboot={0|1}**\ +\ **rspconfig**\ \ *noderange*\ \ **bootmode**\ + +\ **rspconfig**\ \ *noderange*\ \ **bootmode={safe|regular|setup}**\ + MPA specific: ============= @@ -462,6 +466,12 @@ OPTIONS +\ **bootmode**\ + + Display or control BMC Boot Mode attribute setting. + + + \ **dump**\ Manage OpenBMC system dumps. If no sub-option is provided, will generate, wait, and download the dump. diff --git a/xCAT-client/pods/man1/rspconfig.1.pod b/xCAT-client/pods/man1/rspconfig.1.pod index 2f72806f2..c75d8dae7 100644 --- a/xCAT-client/pods/man1/rspconfig.1.pod +++ b/xCAT-client/pods/man1/rspconfig.1.pod @@ -40,6 +40,10 @@ B I B B I B +B I B + +B I B + =head2 MPA specific: B I {B|B|B|B|B|B|B|B|B} @@ -350,6 +354,10 @@ Display or control BMC Power Supply Redundancy attribute setting. Display or control BMC Auto Reboot attribute setting. +=item B + +Display or control BMC Boot Mode attribute setting. + =item B Manage OpenBMC system dumps. If no sub-option is provided, will generate, wait, and download the dump. From f2c4ce1677b0b1084b753c82214e60e862eb01e0 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Thu, 25 Jan 2018 14:19:21 -0500 Subject: [PATCH 6/8] Update man page for RTD for 2.13.10 release --- .../guides/admin-guides/references/man5/servicenode.5.rst | 2 +- docs/source/guides/admin-guides/references/man5/site.5.rst | 4 ++++ docs/source/guides/admin-guides/references/man7/group.7.rst | 5 ++--- docs/source/guides/admin-guides/references/man7/node.7.rst | 5 ++--- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/source/guides/admin-guides/references/man5/servicenode.5.rst b/docs/source/guides/admin-guides/references/man5/servicenode.5.rst index d4b581288..a13cb606c 100644 --- a/docs/source/guides/admin-guides/references/man5/servicenode.5.rst +++ b/docs/source/guides/admin-guides/references/man5/servicenode.5.rst @@ -68,7 +68,7 @@ servicenode Attributes: \ **conserver**\ - Do we set up console service on this service node? Valid values: 0, 1, or 2. If 0, it does not change the current state of the service. If 1, configures and starts conserver daemon. If 2, configures and starts goconserver daemon. + Do we set up console service on this service node? Valid values: 0, 1, or 2. If 0, it does not change the current state of the service. If 1, configures and starts conserver daemon. If 2, configures and starts goconserver daemon. diff --git a/docs/source/guides/admin-guides/references/man5/site.5.rst b/docs/source/guides/admin-guides/references/man5/site.5.rst index 94259601d..d4ea2ab7e 100644 --- a/docs/source/guides/admin-guides/references/man5/site.5.rst +++ b/docs/source/guides/admin-guides/references/man5/site.5.rst @@ -136,6 +136,8 @@ site Attributes: service nodes will ignore this value and always be configured to forward to the management node. + emptyzonesenable: (yes or no). This is to set empty-zones-enable value in named.conf options section. + master: The hostname of the xCAT management node, as known by the nodes. nameservers: A comma delimited list of DNS servers that each node in the cluster should @@ -260,6 +262,8 @@ site Attributes: defserialspeed: The default serial speed - currently only used by mknb. + disablenodesetwarning: Allow the legacy xCAT non-osimage style nodeset to execute. + genmacprefix: When generating mac addresses automatically, use this manufacturing prefix (e.g. 00:11:aa) diff --git a/docs/source/guides/admin-guides/references/man7/group.7.rst b/docs/source/guides/admin-guides/references/man7/group.7.rst index de06fff57..5fa203420 100644 --- a/docs/source/guides/admin-guides/references/man7/group.7.rst +++ b/docs/source/guides/admin-guides/references/man7/group.7.rst @@ -679,8 +679,7 @@ group Attributes: \ **nicsadapter**\ (nics.nicsadapter) - Comma-separated list of extra parameters that will be used for each NIC configuration. - !,!, for example, enP3p3s0f1!mac=98:be:94:59:fa:cd linkstate=DOWN,enP3p3s0f2!mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face + Comma-separated list of NIC information collected by getadapter. !,!, for example, enP3p3s0f1!mac=98:be:94:59:fa:cd linkstate=DOWN,enP3p3s0f2!mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face @@ -975,7 +974,7 @@ group Attributes: \ **setupconserver**\ (servicenode.conserver) - Do we set up Conserver on this service node? Valid values:1 or 0. If 1, configures and starts conserver daemon. If 0, it does not change the current state of the service. + Do we set up console service on this service node? Valid values: 0, 1, or 2. If 0, it does not change the current state of the service. If 1, configures and starts conserver daemon. If 2, configures and starts goconserver daemon. diff --git a/docs/source/guides/admin-guides/references/man7/node.7.rst b/docs/source/guides/admin-guides/references/man7/node.7.rst index eb772d3b5..167c561d4 100644 --- a/docs/source/guides/admin-guides/references/man7/node.7.rst +++ b/docs/source/guides/admin-guides/references/man7/node.7.rst @@ -679,8 +679,7 @@ node Attributes: \ **nicsadapter**\ (nics.nicsadapter) - Comma-separated list of extra parameters that will be used for each NIC configuration. - !,!, for example, enP3p3s0f1!mac=98:be:94:59:fa:cd linkstate=DOWN,enP3p3s0f2!mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face + Comma-separated list of NIC information collected by getadapter. !,!, for example, enP3p3s0f1!mac=98:be:94:59:fa:cd linkstate=DOWN,enP3p3s0f2!mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face @@ -987,7 +986,7 @@ node Attributes: \ **setupconserver**\ (servicenode.conserver) - Do we set up Conserver on this service node? Valid values:1 or 0. If 1, configures and starts conserver daemon. If 0, it does not change the current state of the service. + Do we set up console service on this service node? Valid values: 0, 1, or 2. If 0, it does not change the current state of the service. If 1, configures and starts conserver daemon. If 2, configures and starts goconserver daemon. From f40ea6d4b14801de9aab3c393254b14bdd91a9d3 Mon Sep 17 00:00:00 2001 From: xuweibj Date: Fri, 26 Jan 2018 11:14:05 +0800 Subject: [PATCH 7/8] fix issue 4731, specify variable to hash type (#4732) --- xCAT-server/lib/xcat/plugins/openbmc.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 3a6a3514c..658dee13c 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -1625,7 +1625,7 @@ sub parse_command_status { else { # Everything else is invalid xCAT::SvrUtils::sendmsg([1, "Invalid value '$subcommand_value' for '$subcommand_key'"], $callback); - my @valid_values = keys $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_value}; + my @valid_values = keys %{ $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_value} }; xCAT::SvrUtils::sendmsg([1, "Valid values: " . join(",", @valid_values)], $callback); return 1; } @@ -3624,7 +3624,7 @@ sub rspconfig_api_config_response { # will be displayed as "Restore" my @attr_value = split('\.', $value); my $last_component = $attr_value[-1]; - my @valid_values = values $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_value}; + my @valid_values = values %{ $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_value} }; if ($value) { xCAT::SvrUtils::sendmsg($api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{display_name} . " : $last_component", $callback, $node); my $found = grep(/$value/, @valid_values); From 3d2615f0111eaed3a16b1c013279cffbc29b4985 Mon Sep 17 00:00:00 2001 From: ertaozh Date: Thu, 25 Jan 2018 22:37:41 -0500 Subject: [PATCH 8/8] update release information for 2.13.10 release --- README.rst | 78 ++++---------------------- docs/source/conf.py | 2 +- docs/source/overview/xcat2_release.rst | 12 ++++ 3 files changed, 24 insertions(+), 68 deletions(-) diff --git a/README.rst b/README.rst index 1b8779f68..79e316ff4 100644 --- a/README.rst +++ b/README.rst @@ -6,9 +6,18 @@ xCAT is a toolkit for the deployment and administration of clusters. Documentation ------------- -xCAT documentation is available at: http://xcat-docs.readthedocs.io/en/latest/ +Latest xCAT documentation is available at: http://xcat-docs.readthedocs.io/en/latest/ + +`document for xCAT 2.13.10 `_ + +`document for xCAT 2.13.9 `_ + +`document for xCAT 2.13 `_ + +`document for xCAT 2.12 `_ + +`document for xCAT 2.11 `_ -|docs_latest| |docs_2139| |docs_2138| |docs_2137| |docs_2136| |docs_2135| |docs_2134| |docs_2133| |docs_2132| |docs_2131| |docs_2130| |docs_212| Open Source License ------------------- @@ -21,68 +30,3 @@ Developers Developers and prospective contributors are encouraged to read the `Developers Guide `_ In particular the `GitHub `_ related subsection. - -.. |docs_2139| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.9 - :alt: 2.13.9 documentation status - :scale: 100% - :target: http://xcat-docs.readthedocs.io/en/2.13.9/ - -.. |docs_2138| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.8 - :alt: 2.13.8 documentation status - :scale: 100% - :target: http://xcat-docs.readthedocs.io/en/2.13.8/ - -.. |docs_2137| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.7 - :alt: 2.13.7 documentation status - :scale: 100% - :target: http://xcat-docs.readthedocs.io/en/2.13.7/ - -.. |docs_2136| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.6 - :alt: 2.13.6 documentation status - :scale: 100% - :target: http://xcat-docs.readthedocs.io/en/2.13.6/ - -.. |docs_2135| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.5 - :alt: 2.13.5 documentation status - :scale: 100% - :target: http://xcat-docs.readthedocs.io/en/2.13.5/ - -.. |docs_2134| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.4 - :alt: 2.13.4 documentation status - :scale: 100% - :target: http://xcat-docs.readthedocs.io/en/2.13.4/ - -.. |docs_2133| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.3 - :alt: 2.13.3 documentation status - :scale: 100% - :target: http://xcat-docs.readthedocs.io/en/2.13.3/ - -.. |docs_2132| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.2 - :alt: 2.13.2 documentation status - :scale: 100% - :target: http://xcat-docs.readthedocs.io/en/2.13.2/ - -.. |docs_2131| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.1 - :alt: 2.13.1 documentation status - :scale: 100% - :target: http://xcat-docs.readthedocs.io/en/2.13.1/ - -.. |docs_2130| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.0 - :alt: 2.13.0 documentation status - :scale: 100% - :target: http://xcat-docs.readthedocs.io/en/2.13.0/ - -.. |docs_212| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.12 - :alt: 2.12 documentation status - :scale: 100% - :target: http://xcat-docs.readthedocs.io/en/2.12/ - -.. |docs_211| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.11 - :alt: 2.11 documentation status - :scale: 100% - :target: http://xcat-docs.readthedocs.io/en/2.11/ - -.. |docs_latest| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=latest - :alt: Latest documentation status - :scale: 100% - :target: http://xcat-docs.readthedocs.io/en/latest/ diff --git a/docs/source/conf.py b/docs/source/conf.py index f5c5b3eaa..dfab0f4db 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -59,7 +59,7 @@ author = u'IBM Corporation' # The short X.Y version. version = '2' # The full version, including alpha/beta/rc tags. -release = '2.13.9' +release = '2.13.10' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/source/overview/xcat2_release.rst b/docs/source/overview/xcat2_release.rst index 56e021d2c..0031570e2 100644 --- a/docs/source/overview/xcat2_release.rst +++ b/docs/source/overview/xcat2_release.rst @@ -14,6 +14,18 @@ xCAT 2.13.x |xCAT |New OS |New |New Feature | |Version | |Hardware | | +=================================+===============+=============+==================================+ +|| xCAT 2.13.10 | | |- OpenBMC support: | +|| 2018/1/26 | | | | +|| | | | rspconfig powersupplyredundancy,| +| `2.13.10 Release Notes `_ | | | | +| | | |- goconserver enhancement | +| | | | | +| | | | run goconserver on SN | +| | | | | +| | | | redirect console log | ++---------------------------------+---------------+-------------+----------------------------------+ || xCAT 2.13.9 | | |- OpenBMC support: | || 2017/12/18 | | | | || | | | rflash -a/-u enhance, add -d |