Bug 1362361 - [RFE] Enable Ironic Node auto-discovery with ironic-inspector
Summary: [RFE] Enable Ironic Node auto-discovery with ironic-inspector
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: instack-undercloud
Version: 11.0 (Ocata)
Hardware: All
OS: Linux
medium
medium
Target Milestone: Upstream M1
: 12.0 (Pike)
Assignee: Dmitry Tantsur
QA Contact: mlammon
URL:
Whiteboard:
Depends On:
Blocks: 1415164 1442136
TreeView+ depends on / blocked
 
Reported: 2016-08-02 03:34 UTC by Anand Nande
Modified: 2018-02-05 19:02 UTC (History)
10 users (show)

Fixed In Version: instack-undercloud-7.0.0-0.20170419175928.25c90b8.1.el7ost
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-13 20:44:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1524753 0 None None None 2016-08-02 03:34:16 UTC
OpenStack gerrit 423256 0 'None' MERGED Configure ironic-inspector parameters related to node discovery 2020-12-27 10:53:59 UTC
OpenStack gerrit 423265 0 'None' MERGED Allow enabling node auto-discovery on the undercloud 2020-12-27 10:53:59 UTC
Red Hat Product Errata RHEA-2017:3462 0 normal SHIPPED_LIVE Red Hat OpenStack Platform 12.0 Enhancement Advisory 2018-02-16 01:43:25 UTC

Description Anand Nande 2016-08-02 03:34:17 UTC
Currently instack.json seems the only way to add overcloud nodes
in bulk. If there are a lot many nodes, it would get difficult to 
have a track of each nodes pm_credentials/mac/ip etc.

It would be great to have ironic do this by discovering the nodes
automatically. 

Upstream feature : https://bugs.launchpad.net/ironic-inspector/+bug/1524753

Comment 2 Dmitry Tantsur 2016-08-02 08:54:45 UTC
I'm moving the component to a more generic one, as the code in ironic-inspector is there since IIRC Mitaka, but we don't have TripleO bits to wire it in. We need an instack-undercloud option to enable discovery, then we need to document example introspection rules. Maybe even provide some pre-created rules with well known BMC credentials (like Dell's).

Comment 5 Dmitry Tantsur 2017-01-20 13:34:58 UTC
Quick patch for this feature: https://review.openstack.org/#/c/423265/. I doubt it's going to make it in Ocata though.

Comment 6 Dmitry Tantsur 2017-01-26 15:42:45 UTC
Posted TripleO blueprint: https://blueprints.launchpad.net/tripleo/+spec/inspector-node-autodiscovery

Comment 8 Dmitry Tantsur 2017-03-21 17:12:07 UTC
This can be enabled via undercloud.conf now.

Comment 11 Dmitry Tantsur 2017-04-11 14:39:30 UTC
Merged long ago.

Comment 13 mlammon 2017-06-20 18:12:37 UTC
Successfully verified using Dell PowerEdge R320 on (8) servers for auto-discovery.
It applied the credential rule and Dell specific which successfully put node in pxe_drac.(seen below)
In addition, standard pxe_ipmitool was also verified to work and discover nodes.

Environment:
python-ironicclient-1.13.0-0.20170512184144.7cceefe.el7ost.noarch
openstack-ironic-common-8.0.1-0.20170610002959.adf3461.el7ost.noarch
python-ironic-inspector-client-1.12.0-0.20170331023022.045fd9e.el7ost.noarch
puppet-ironic-11.2.0-0.20170611220351.0fa87ae.el7ost.noarch
openstack-ironic-conductor-8.0.1-0.20170610002959.adf3461.el7ost.noarch
python-ironic-lib-2.7.0-0.20170331023537.8d899bd.el7ost.noarch
openstack-ironic-inspector-5.1.1-0.20170608115120.a46e708.el7ost.noarch
openstack-ironic-api-8.0.1-0.20170610002959.adf3461.el7ost.noarch
instack-6.0.1-0.20170525020340.103d575.el7ost.noarch
instack-undercloud-7.0.1-0.20170609013145.el7ost.noarch


[stack@undercloud ~]$ . stackrc
(undercloud) [stack@undercloud ~]$ ironic node-list
+--------------------------------------+------+---------------+-------------+--------------------+-------------+
| UUID                                 | Name | Instance UUID | Power State | Provisioning State | Maintenance |
+--------------------------------------+------+---------------+-------------+--------------------+-------------+
| c6e63aec-e5ba-4d63-8d37-bd57628148e8 | None | None          | power off   | enroll             | False       |
| 0362b7b2-5b9c-4113-92e1-0b34a2835d9b | None | None          | power off   | enroll             | False       |
| 4dfebd57-0f57-411e-8462-cbd317fab3fe | None | None          | power off   | enroll             | False       |
| 186bdd75-f5b6-468e-912d-ae86af9f34d3 | None | None          | power off   | enroll             | False       |
| 8b7d6fbd-0d43-46d0-9e0a-62321396b8c1 | None | None          | power off   | enroll             | False       |
| 6972604b-1930-4edd-b907-cc3b6dc6ecaa | None | None          | power off   | enroll             | False       |
| 8b070266-7a1f-4dec-915a-0a202f87212b | None | None          | power off   | enroll             | False       |
| 559dd4bf-51bc-48f2-8221-aaa4f2b69148 | None | None          | power off   | enroll             | False       |
+--------------------------------------+------+---------------+-------------+--------------------+-------------+
(undercloud) [stack@undercloud ~]$ ironic node-show c6e63aec-e5ba-4d63-8d37-bd57628148e8
+------------------------+--------------------------------------------------------------------------+
| Property               | Value                                                                    |
+------------------------+--------------------------------------------------------------------------+
| boot_interface         |                                                                          |
| chassis_uuid           | None                                                                     |
| clean_step             | {}                                                                       |
| console_enabled        | False                                                                    |
| console_interface      |                                                                          |
| created_at             | 2017-06-13T15:33:57+00:00                                                |
| deploy_interface       |                                                                          |
| driver                 | pxe_drac                                                                 |
| driver_info            | {u'ipmi_address': u'10.19.184.10', u'drac_password': u'******',          |
|                        | u'drac_username': u'root', u'drac_address': u'10.19.184.10'}             |
| driver_internal_info   | {}                                                                       |
| extra                  | {u'hardware_swift_object': u'extra_hardware-c6e63aec-e5ba-               |
|                        | 4d63-8d37-bd57628148e8'}                                                 |
| inspect_interface      |                                                                          |
| inspection_finished_at | None                                                                     |
| inspection_started_at  | None                                                                     |
| instance_info          | {}                                                                       |
| instance_uuid          | None                                                                     |
| last_error             | None                                                                     |
| maintenance            | False                                                                    |
| maintenance_reason     | None                                                                     |
| management_interface   |                                                                          |
| name                   | None                                                                     |
| network_interface      | flat                                                                     |
| power_interface        |                                                                          |
| power_state            | power off                                                                |
| properties             | {u'memory_mb': u'49152', u'cpu_arch': u'x86_64', u'local_gb': u'464',    |
|                        | u'cpus': u'12', u'capabilities': u'cpu_hugepages:true,cpu_vt:true,cpu_tx |
|                        | t:true,cpu_aes:true,cpu_hugepages_1g:true,boot_mode:bios'}               |
| provision_state        | enroll                                                                   |
| provision_updated_at   | None                                                                     |
| raid_config            | {}                                                                       |
| raid_interface         |                                                                          |
| reservation            | None                                                                     |
| resource_class         | None                                                                     |
| target_power_state     | None                                                                     |
| target_provision_state | None                                                                     |
| target_raid_config     | {}                                                                       |
| updated_at             | 2017-06-13T15:34:09+00:00                                                |
| uuid                   | c6e63aec-e5ba-4d63-8d37-bd57628148e8                                     |
| vendor_interface       |                                                                          |
+------------------------+--------------------------------------------------------------------------+
(undercloud) [stack@undercloud ~]$ openstack baremetal introspection rule list
+--------------------------------------+-----------------------------------------+
| UUID                                 | Description                             |
+--------------------------------------+-----------------------------------------+
| 823ac164-05af-4289-99ae-461dde2d7029 | Set default IPMI credentials            |
| 271f93d7-0ac5-4dfa-94c2-e474f61171e8 | Set the vendor driver for Dell hardware |
+--------------------------------------+-----------------------------------------+
(undercloud) [stack@undercloud ~]$ openstack baremetal introspection rule show 823ac164-05af-4289-99ae-461dde2d7029
+-------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field       | Value                                                                                                                                                                    |
+-------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| actions     | [{u'action': u'set-attribute', u'path': u'driver_info/ipmi_username', u'value': u'root'}, {u'action': u'set-attribute', u'path': u'driver_info/ipmi_password', u'value': |
|             | u'calvin'}]                                                                                                                                                              |
| conditions  | [{u'field': u'data://auto_discovered', u'invert': False, u'multiple': u'any', u'value': True, u'op': u'eq'}, {u'field': u'data://inventory.system_vendor.manufacturer',  |
|             | u'invert': False, u'multiple': u'any', u'value': u'Dell Inc.', u'op': u'ne'}]                                                                                            |
| description | Set default IPMI credentials                                                                                                                                             |
| uuid        | 823ac164-05af-4289-99ae-461dde2d7029                                                                                                                                     |
+-------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
(undercloud) [stack@undercloud ~]$ openstack baremetal introspection rule show 271f93d7-0ac5-4dfa-94c2-e474f61171e8
+-------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field       | Value                                                                                                                                                                    |
+-------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| actions     | [{u'action': u'set-attribute', u'path': u'driver', u'value': u'pxe_drac'}, {u'action': u'set-attribute', u'path': u'driver_info/drac_username', u'value': u'root'},      |
|             | {u'action': u'set-attribute', u'path': u'driver_info/drac_password', u'value': u'calvin'}, {u'action': u'set-attribute', u'path': u'driver_info/drac_address', u'value': |
|             | u'{data[inventory][bmc_address]}'}]                                                                                                                                      |
| conditions  | [{u'field': u'data://auto_discovered', u'invert': False, u'multiple': u'any', u'value': True, u'op': u'eq'}, {u'field': u'data://inventory.system_vendor.manufacturer',  |
|             | u'invert': False, u'multiple': u'any', u'value': u'Dell Inc.', u'op': u'eq'}]                                                                                            |
| description | Set the vendor driver for Dell hardware                                                                                                                                  |
| uuid        | 271f93d7-0ac5-4dfa-94c2-e474f61171e8                                                                                                                                     |
+-------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
(undercloud) [stack@undercloud ~]$

Comment 17 errata-xmlrpc 2017-12-13 20:44:49 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/RHEA-2017:3462


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