Bug 1583893 - [RHOSP12] Not able to register baremetal nodes when using pxe_ucs driver
Summary: [RHOSP12] Not able to register baremetal nodes when using pxe_ucs driver
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-common
Version: 12.0 (Pike)
Hardware: x86_64
OS: Linux
high
high
Target Milestone: z4
: 12.0 (Pike)
Assignee: Ilya Etingof
QA Contact: mlammon
URL:
Whiteboard:
Depends On:
Blocks: 1596763
TreeView+ depends on / blocked
 
Reported: 2018-05-30 01:55 UTC by MD Sufiyan
Modified: 2021-12-10 16:23 UTC (History)
6 users (show)

Fixed In Version: openstack-tripleo-common-7.6.13-5.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1596763 (view as bug list)
Environment:
Last Closed: 2018-12-05 18:52:40 UTC
Target Upstream Version:
Embargoed:
ietingof: needinfo-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1739024 0 None None None 2018-06-06 15:57:30 UTC
OpenStack gerrit 528726 0 None MERGED ensure unique ironic node ID with UCS driver 2020-09-14 16:30:20 UTC
OpenStack gerrit 591766 0 None MERGED ensure unique ironic node ID with UCS driver 2020-09-14 16:30:20 UTC
Red Hat Issue Tracker OSP-11410 0 None None None 2021-12-10 16:23:03 UTC
Red Hat Product Errata RHBA-2018:3789 0 None None None 2018-12-05 18:54:21 UTC

Description MD Sufiyan 2018-05-30 01:55:01 UTC
Description of problem:

Not able to register baremetal nodes when using pxe_ucs driver and hitting below error

~~~
(undercloud) [stack@osdirector ~]$ openstack overcloud node import instackenv.json
Started Mistral Workflow tripleo.baremetal.v1.register_or_update. Execution ID: 1e910049-529b-41b3-89f3-54f1c42e0560
Waiting for messages on queue 'bb63c2f0-d05b-44a2-93b3-ea7ce8c69b79' with no timeout.
Invalid node data: node #1: Node identified by 10.x.y.z is already present
{u'status': u'FAILED', u'message': u'Invalid node data: node #1: Node identified by 10.x.y.z is already present', u'result': None}
Exception registering nodes: {u'status': u'FAILED', u'message': u'Invalid node data: node #1: Node identified by 10.x.y.z is already present', u'result': None}
~~~

~~~
egrep -iv '^$|^#' ../sosreport-20180523-122212/etc/ironic/ironic.conf | grep -i enabled_driver
enabled_drivers=pxe_ucs,pxe_ipmitool,fake_pxe
~~~

This works fine with fake_pxe and pxe_ipmitool, however issue appears when using pxe_ucs driver. It seems the IP for some reason IP address has been used as unique id in the code.

Version-Release number of selected component (if applicable):

~~~
OSP : rhosp12
Ironic:

cat ../sosreport-20180523-122212/installed-rpms | grep -i ironic
openstack-ironic-api-9.1.3-1.el7ost.noarch                  Wed May 16 17:51:13 2018
openstack-ironic-common-9.1.3-1.el7ost.noarch               Wed May 16 17:51:06 2018
openstack-ironic-conductor-9.1.3-1.el7ost.noarch            Wed May 16 17:51:21 2018
openstack-ironic-inspector-6.0.1-1.el7ost.noarch            Wed May 16 17:51:30 2018
puppet-ironic-11.5.0-1.el7ost.noarch                        Wed May 16 16:07:16 2018
python-ironic-inspector-client-2.1.0-1.el7ost.noarch        Wed May 16 16:07:22 2018
python-ironic-lib-2.10.0-1.el7ost.noarch                    Wed May 16 17:51:04 2018
python-ironicclient-1.17.0-1.el7ost.noarch                  Wed May 16 16:07:26 2018


How reproducible:
Evertime when using pxe_ucs driver

Comment 3 MD Sufiyan 2018-06-28 10:14:41 UTC
Hi Team,

Any update on this ?

thanks..
Sufiyan

Comment 4 Bob Fournier 2018-06-28 13:10:31 UTC
Sufiyan - the patch is still in review, we will push it along.

Comment 10 mlammon 2018-11-20 16:09:49 UTC
installed latest osp 12 -p 2018-11-14.1

No hardware to reproduce so will just verify environment seemed updated an in order.
please re-open if issue still continues. 

Environment:
openstack-tripleo-common-7.6.13-6.el7ost.noarch 

verify new driver code in place for ucs
/usr/lib/python2.7/site-packages/tripleo_common/utils/nodes.py

class UcsDriverInfo(DriverInfo):
    def __init__(self):
        mapping = {
            'pm_addr': 'ucs_address',
            'pm_user': 'ucs_username',
            'pm_password': 'ucs_password',
            'pm_service_profile': 'ucs_service_profile'
        }
        mandatory_fields = list(mapping)

        super(UcsDriverInfo, self).__init__(
            'ucs', mapping,
            mandatory_fields=mandatory_fields
        )

    def unique_id_from_fields(self, fields):
        try:
            return '%s:%s' % (fields['pm_addr'], fields['pm_service_profile'])

        except KeyError:
            return

    def unique_id_from_node(self, node):
        try:
            return '%s:%s' % (node.driver_info['ucs_address'],
                              node.driver_info['ucs_service_profile'])
        except KeyError:
            return
^^^^^

DRIVER_INFO = {
    # production drivers
    '(ipmi|.*_ipmitool)': PrefixedDriverInfo('ipmi', has_port=True,
                                             default_port=623),
    '.*_drac': PrefixedDriverInfo('drac', has_port=True),
    '.*_ilo': PrefixedDriverInfo('ilo'),
    '.*_ucs': UcsDriverInfo(),  <---

Comment 13 errata-xmlrpc 2018-12-05 18:52:40 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-2018:3789


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