Inconsistency in CLI for hypervisor and baremetal node names

Bug #1790637 reported by Cédric Jeanneret
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Low
Unassigned

Bug Description

Dear Stackers,

There is an inconsistency in tripleo CLI: we can run the following:
openstack baremetal node introspect controller-1

where "controller-1" the value of the "Name" column in openstack baremetal node list

But this command will eventually fail, because it will obsess with the following message:
[u"The action raised an exception [action_ex_id=7fdfb424-9732-4d61-b673-84d98557371d, action_cls='<class 'mistral.actions.action_factory.NovaAction'>', attributes='{u'client_method_name': u'hypervisors.find'}', params='{u'hypervisor_hostname': u'controller-1'}']\n NovaAction.hypervisors.find failed: No Hypervisor matching {u'hypervisor_hostname': u'controller-1'}. (HTTP 404)"]

After a small check with "openstack hypervisor list", we can indeed see the "Hypervisor Hostname" is set to an UUID, not a Hostname.

Now, the "Name" field of the `openstack baremetal node list' might be empty, so it makes sense Hypervisor Hostname uses UUID, but then we might want to forbid the use of "Name" for the `openstack baremetal node introspect' command.

What do you think? Code issue, or doc issue?

Cheers,

C.

Revision history for this message
Bob Fournier (bfournie) wrote :

It appears the problem is when using --provide

For example this works fine.
(undercloud) [stack@host01 ~]$ openstack baremetal node list
+--------------------------------------+-------+---------------+-------------+--------------------+-------------+
| UUID | Name | Instance UUID | Power State | Provisioning State | Maintenance |
+--------------------------------------+-------+---------------+-------------+--------------------+-------------+
| 4de51a48-abdc-4da7-85d1-4393b2bf9a90 | host2 | None | power on | manageable | False |
| ec6694c6-8c0c-437f-a7f6-82e7c2ab3793 | host3 | None | power on | manageable | False |
+--------------------------------------+-------+---------------+-------------+--------------------+-------------+

(undercloud) [stack@host01 ~]$ openstack overcloud node introspect host2
Waiting for introspection to finish...
Started Mistral Workflow tripleo.baremetal.v1.introspect. Execution ID: 2c03e135-514f-4bfe-9107-77aae3a2e535
Waiting for messages on queue 'tripleo' with no timeout.
Introspection of node 4de51a48-abdc-4da7-85d1-4393b2bf9a90 completed. Status:SUCCESS. Errors:None
Successfully introspected 1 node(s).

But when using --provides we get the error:
(undercloud) [stack@host01 ~]$ openstack overcloud node introspect host2 --provide
Waiting for introspection to finish...
Started Mistral Workflow tripleo.baremetal.v1.introspect. Execution ID: 6306dfac-444e-4d94-81e7-6b160aadd4d4
Waiting for messages on queue 'tripleo' with no timeout.
Introspection of node 4de51a48-abdc-4da7-85d1-4393b2bf9a90 completed. Status:SUCCESS. Errors:None
Successfully introspected 1 node(s).
Started Mistral Workflow tripleo.baremetal.v1.provide. Execution ID: 49af91cc-3757-4297-a881-bcb4a63fc86d
Waiting for messages on queue 'tripleo' with no timeout.
[u"Failed to run action [action_ex_id=4d57d3bb-a7f4-4870-8d0f-22464fa9aa25, action_cls='<class 'mistral.actions.action_factory.NovaAction'>', attributes='{u'client_method_name': u'hypervisors.find'}', params='{u'hypervisor_hostname': u'host2'}']\n NovaAction.hypervisors.find failed: No Hypervisor matching {u'hypervisor_hostname': u'host2'}. (HTTP 404)"]

According to Dmitry the provide workflow cannot accept names.

Changed in tripleo:
milestone: stein-1 → stein-2
Changed in tripleo:
milestone: stein-2 → stein-3
Changed in tripleo:
milestone: stein-3 → train-1
Changed in tripleo:
milestone: train-1 → train-2
Revision history for this message
Bob Fournier (bfournie) wrote :
Changed in tripleo:
status: Triaged → Fix Committed
wes hayutin (weshayutin)
Changed in tripleo:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.