Bug 1647931 - Incorrect capabilities handling on node update
Summary: Incorrect capabilities handling on node update
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-common
Version: 13.0 (Queens)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z4
: 13.0 (Queens)
Assignee: Dmitry Tantsur
QA Contact: Alexander Chuzhoy
URL:
Whiteboard:
Depends On:
Blocks: 1655776
TreeView+ depends on / blocked
 
Reported: 2018-11-08 15:04 UTC by Dmitry Tantsur
Modified: 2019-01-16 17:55 UTC (History)
6 users (show)

Fixed In Version: openstack-tripleo-common-8.6.6-7.el7ost
Doc Type: Bug Fix
Doc Text:
Previously, when you updated a node from the undercloud, the `capabilities` field values were not always converted to a string value type. After this bug fix, the `capabilities field now always converts to the string value type during node updates.
Clone Of:
: 1655776 (view as bug list)
Environment:
Last Closed: 2019-01-16 17:55:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1802318 0 None None None 2018-11-08 15:04:12 UTC
OpenStack gerrit 616577 0 None None None 2018-11-08 15:05:10 UTC
Red Hat Product Errata RHBA-2019:0068 0 None None None 2019-01-16 17:55:33 UTC

Description Dmitry Tantsur 2018-11-08 15:04:13 UTC
Capabilities provided as a dict are not converted into string representation.

Comment 10 Dmitry Tantsur 2019-01-02 16:55:28 UTC
To be honest, I can no longer trigger the bug on unpatched master, but the idea was the following: you need to enroll nodes, then update them via instackenv.json by setting capabilities to a dict.

E.g. pick one node, and add/replace its "capabilities" in instackenv.json with "capabilities": {"profile": "control", "boot_option": "local", "foo": "bar"}. Then update the nodes via 'openstack overcloud node import instackenv.json'. The capabilities should be correctly converted to a string:

$ openstack baremetal node show control-0 -c properties                                                                                                                           
+------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| Field      | Value                                                                                                                                              |
+------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| properties | {u'memory_mb': u'10240', u'cpu_arch': u'x86_64', u'local_gb': u'50', u'cpus': u'2', u'capabilities': u'profile:control,foo:bar,boot_option:local'} |
+------------+----------------------------------------------------------------------------------------------------------------------------------------------------+

Comment 11 mlammon 2019-01-02 19:22:57 UTC
13   -p 2018-12-13.4

Env:
(undercloud) [stack@undercloud-0 ~]$ sudo rpm -qa | grep openstack-tripleo-common
openstack-tripleo-common-containers-8.6.6-8.el7ost.noarch
openstack-tripleo-common-8.6.6-8.el7ost.noarch

original
controller-1 original capabilities
(undercloud) [stack@undercloud-0 ~]$ openstack baremetal node show controller-1 -c properties
+------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field      | Value                                                                                                                                                                                                       |
+------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| properties | {u'memory_mb': u'20480', u'cpu_arch': u'x86_64', u'local_gb': u'39', u'cpus': u'4', u'capabilities': u'cpu_aes:true,cpu_hugepages:true,boot_option:local,cpu_vt:true,cpu_hugepages_1g:true,boot_mode:bios'} |
+------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------

Note: changed the boot_mode to uefi

.... instackenv.json

      "name": "controller-1",
      "mac": ["52:54:00:d4:82:b3"],
      "cpu": "4",
      "memory": "20480",
      "capabilities": {"profile": "controller", "boot_option": "local", "cpu_vt": "true", "cpu_hugepages_1g": "true", "boot_mode": "uefi"},
      "disk": "40",
            "arch": "x86_64",
              "pm_addr": "172.16.0.1",
        "pm_type": "ipmi",
        "pm_user": "admin",
        "pm_password": "password",
        "pm_port": "6231"

.....


openstack overcloud node import instackenv.json

You can see we successfully updated and did not have any error

(undercloud) [stack@undercloud-0 ~]$ openstack baremetal node show controller-1 -c properties
+------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field      | Value                                                                                                                                                                                          |
+------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| properties | {u'memory_mb': u'20480', u'cpu_arch': u'x86_64', u'local_gb': u'40', u'cpus': u'4', u'capabilities': u'boot_mode:uefi,boot_option:local,cpu_hugepages_1g:true,cpu_vt:true,profile:controller'} |
+------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Comment 14 errata-xmlrpc 2019-01-16 17:55:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:0068


Note You need to log in before you can comment on or make changes to this bug.