Bug 1536156 - ironic node name must not have single digit suffix
Summary: ironic node name must not have single digit suffix
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-ironic
Version: 10.0 (Newton)
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: beta
: 13.0 (Queens)
Assignee: Dmitry Tantsur
QA Contact: Alexander Chuzhoy
URL:
Whiteboard:
Depends On:
Blocks: 1473267
TreeView+ depends on / blocked
 
Reported: 2018-01-18 18:09 UTC by Siggy Sigwald
Modified: 2018-06-27 13:43 UTC (History)
5 users (show)

Fixed In Version: openstack-ironic-10.1.1-0.20180215224348.f15aaec.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-27 13:42:33 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Launchpad 1643995 None None None 2018-01-22 10:58:54 UTC
OpenStack gerrit 541289 None MERGED Stop guessing mime types based on URLs 2020-04-15 18:30:14 UTC
Red Hat Product Errata RHEA-2018:2086 None None None 2018-06-27 13:43:13 UTC

Description Siggy Sigwald 2018-01-18 18:09:57 UTC
What problem/issue/behavior are you having trouble with?  What do you expect to see?

when an ironic node is created with a single digit numeric suffix then that name cannot be used as an identifier in API calls.  For example:


Create a ironic node with a numeric suffix

[stack@undercloud ~]$ ironic node-create --name my-vm.5 -d pxe_ssh
+-------------------+--------------------------------------+
| Property          | Value                                |
+-------------------+--------------------------------------+
| chassis_uuid      |                                      |
| driver            | pxe_ssh                              |
| driver_info       | {}                                   |
| extra             | {}                                   |
| name              | my-vm.5                              |
| network_interface |                                      |
| properties        | {}                                   |
| resource_class    |                                      |
| uuid              | a51c9036-bb56-4d59-90ac-72edff30cd60 |
+-------------------+--------------------------------------+


Use the node name for operations to make it fail

[stack@undercloud ~]$ ironic node-show my-vm.5
Not Found (HTTP 404)


Use the UUID to make it work

[stack@undercloud ~]$ ironic node-show a51c9036-bb56-4d59-90ac-72edff30cd60
+------------------------+--------------------------------------+
| Property               | Value                                |
+------------------------+--------------------------------------+
| chassis_uuid           |                                      |
| clean_step             | {}                                   |
| console_enabled        | False                                |
| created_at             | 2018-01-18T05:17:39+00:00            |
| driver                 | pxe_ssh                              |
| driver_info            | {}                                   |
| driver_internal_info   | {}                                   |
| extra                  | {}                                   |
| inspection_finished_at | None                                 |
| inspection_started_at  | None                                 |
| instance_info          | {}                                   |
| instance_uuid          | None                                 |
| last_error             | None                                 |
| maintenance            | False                                |
| maintenance_reason     | None                                 |
| name                   | my-vm.5                              |
| network_interface      |                                      |
| power_state            | None                                 |
| properties             | {}                                   |
| provision_state        | available                            |
| provision_updated_at   | None                                 |
| raid_config            |                                      |
| reservation            | None                                 |
| resource_class         |                                      |
| target_power_state     | None                                 |
| target_provision_state | None                                 |
| target_raid_config     |                                      |
| updated_at             | None                                 |
| uuid                   | a51c9036-bb56-4d59-90ac-72edff30cd60 |
+------------------------+--------------------------------------+



if you rename the node to not have the single digit suffix (e.g. my-vm.55) then it works.


we see this in the ironic-api.log

2018-01-17 20:57:27.277 20853 ERROR pecan.core [-] Controller 'get_one' defined does not support content_type 'application/x-troff-man'. Supported type(s): ['application/json']
2018-01-17 20:57:27.279 20853 INFO eventlet.wsgi.server [-] 192.0.2.1 "GET /v1/nodes/my-vm.5 HTTP/1.1" status: 404  len: 224 time: 0.1177211

Where are you experiencing the behavior?  What environment?

this is happening in production environments when users choose a name that has a numeric suffix.
users choose this naming format to comply with their datacenter naming conventions

When does the behavior occur? Frequently?  Repeatedly?   At certain times?

every time.

Comment 1 Dmitry Tantsur 2018-01-22 10:58:54 UTC
Known problem with the underlying library: https://bugs.launchpad.net/ironic/+bug/1643995

Comment 2 Dmitry Tantsur 2018-02-06 15:48:36 UTC
I have proposed a fix for this issue. I cannot promise to backport it all the way back to 10, because it touches some important bits of the API.

Note that this issue has a hacky workaround:

 $ ironic node-create --name my-vm.5 -d pxe_ssh
 $ ironic node-show my-vm.5.json

(note the .json suffix for node show)

Comment 3 Bob Fournier 2018-02-08 20:53:31 UTC
Dmitry - can we change this to be a rhos-13 bug?  That change looks quite risky to backport all the way down to OSP-10.  Plus you've provided a workaround.

Comment 4 Dmitry Tantsur 2018-02-09 09:36:49 UTC
Agreed, let's change it to 13. If anybody requires a backport to any release, please close this bug for the target version.

Comment 6 Dmitry Tantsur 2018-02-09 09:37:36 UTC
Sigh, I meant "clone", not "close".

Comment 10 Alexander Chuzhoy 2018-05-07 15:45:08 UTC
Verified:
Environment:
python2-ironicclient-2.2.0-1.el7ost.noarch
python-ironic-lib-2.12.1-1.el7ost.noarch
puppet-ironic-12.4.0-0.20180329034302.8285d85.el7ost.noarch
openstack-ironic-common-10.1.2-3.el7ost.noarch
openstack-ironic-staging-drivers-0.9.0-4.el7ost.noarch
python-ironic-inspector-client-3.1.1-1.el7ost.noarch
openstack-ironic-api-10.1.2-3.el7ost.noarch
openstack-ironic-inspector-7.2.1-0.20180409163359.2435d97.el7ost.noarch
python2-ironic-neutron-agent-1.0.0-1.el7ost.noarch
openstack-ironic-conductor-10.1.2-3.el7ost.noarch


(undercloud) [stack@undercloud-0 ~]$  ironic node-create --name my-vm.5 -d ipmi
The "ironic" CLI is deprecated and will be removed in the S* release. Please use the "openstack baremetal" CLI instead.
+----------------------+--------------------------------------+
| Property             | Value                                |
+----------------------+--------------------------------------+
| boot_interface       | pxe                                  |
| chassis_uuid         | None                                 |
| console_interface    | ipmitool-socat                       |
| deploy_interface     | iscsi                                |
| driver               | ipmi                                 |
| driver_info          | {}                                   |
| extra                | {}                                   |
| inspect_interface    | inspector                            |
| management_interface | ipmitool                             |
| name                 | my-vm.5                              |
| network_interface    | flat                                 |
| power_interface      | ipmitool                             |
| properties           | {}                                   |
| raid_interface       | no-raid                              |
| resource_class       | baremetal                            |
| storage_interface    | noop                                 |
| uuid                 | ebe28c51-7f4e-418c-b093-41b2436407b1 |
| vendor_interface     | ipmitool                             |
+----------------------+--------------------------------------+
(undercloud) [stack@undercloud-0 ~]$ ironic node-show my-vm.5
The "ironic" CLI is deprecated and will be removed in the S* release. Please use the "openstack baremetal" CLI instead.
+------------------------+--------------------------------------+
| Property               | Value                                |
+------------------------+--------------------------------------+
| boot_interface         | pxe                                  |
| chassis_uuid           | None                                 |
| clean_step             | {}                                   |
| console_enabled        | False                                |
| console_interface      | ipmitool-socat                       |
| created_at             | 2018-05-07T15:44:01+00:00            |
| deploy_interface       | iscsi                                |
| driver                 | ipmi                                 |
| driver_info            | {}                                   |
| driver_internal_info   | {}                                   |
| extra                  | {}                                   |
| inspect_interface      | inspector                            |
| inspection_finished_at | None                                 |
| inspection_started_at  | None                                 |
| instance_info          | {}                                   |
| instance_uuid          | None                                 |
| last_error             | None                                 |
| maintenance            | False                                |
| maintenance_reason     | None                                 |
| management_interface   | ipmitool                             |
| name                   | my-vm.5                              |
| network_interface      | flat                                 |
| power_interface        | ipmitool                             |
| power_state            | None                                 |
| properties             | {}                                   |
| provision_state        | enroll                               |
| provision_updated_at   | None                                 |
| raid_config            | {}                                   |
| raid_interface         | no-raid                              |
| reservation            | None                                 |
| resource_class         | baremetal                            |
| storage_interface      | noop                                 |
| target_power_state     | None                                 |
| target_provision_state | None                                 |
| target_raid_config     | {}                                   |
| traits                 |                                      |
| updated_at             | None                                 |
| uuid                   | ebe28c51-7f4e-418c-b093-41b2436407b1 |
| vendor_interface       | ipmitool                             |
+------------------------+--------------------------------------+

Comment 12 errata-xmlrpc 2018-06-27 13:42:33 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-2018:2086


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