Failure to create a host

Bug #1814594 reported by Pierre Riteau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Blazar
Fix Released
High
Tetsuro Nakamura

Bug Description

I tried applying https://review.openstack.org/#/c/632929/1 but it doesn't seem to help.

To reproduce:

1) deploy DevStack with blazar plugin
2) `source openrc admin admin`
3) blazar host-create <hostname>

blazar-manager logs:

 [-] Exception during message handling: TypeError: 'NoneType' object has no attribute '__getitem__'
 Traceback (most recent call last):
   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 166, in _process_incoming
     res = self.dispatcher.dispatch(message)
   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 265, in dispatch
     return self._do_dispatch(endpoint, method, ctxt, args)
   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 194, in _do_dispatch
     result = func(ctxt, **new_args)
   File "/opt/stack/blazar/blazar/utils/service.py", line 77, in run_method
     return method(**kwargs)
   File "/opt/stack/blazar/blazar/plugins/oshosts/host_plugin.py", line 365, in create_computehost
     host_details['service_name'])
   File "/opt/stack/blazar/blazar/utils/openstack/placement.py", line 188, in create_reservation_provider
     host_uuid = host_rp['uuid']
 TypeError: 'NoneType' object has no attribute '__getitem__'

Pierre Riteau (priteau)
Changed in blazar:
assignee: nobody → Tetsuro Nakamura (tetsuro0907)
Pierre Riteau (priteau)
Changed in blazar:
milestone: none → stein-3
description: updated
description: updated
Revision history for this message
Tetsuro Nakamura (tetsuro0907) wrote :

It would be appreciated if you tell me what the following two commands display
$ openstack resource provider list
$ openstack hypervisor list

Revision history for this message
Pierre Riteau (priteau) wrote :

$ openstack resource provider list
WARNING: Failed to import plugin orchestration.
+--------------------------------------+--------------------------+------------+
| uuid | name | generation |
+--------------------------------------+--------------------------+------------+
| b17d026f-59c4-41e9-b288-225b1dc953f7 | priteau-blazar.novalocal | 2 |
+--------------------------------------+--------------------------+------------+
$ openstack hypervisor list
WARNING: Failed to import plugin orchestration.
+----+--------------------------+-----------------+---------------+-------+
| ID | Hypervisor Hostname | Hypervisor Type | Host IP | State |
+----+--------------------------+-----------------+---------------+-------+
| 1 | priteau-blazar.novalocal | QEMU | 10.140.81.147 | up |
+----+--------------------------+-----------------+---------------+-------+

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to blazar (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/634906

Revision history for this message
Pierre Riteau (priteau) wrote :

I found the reason, it is related to a hostname mismatch between the nova-compute service (where the hostname is priteau-blazar) and hypervisor / resource provider entries (where the hostname is priteau-blazar.novalocal).

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to blazar (master)

Fix proposed to branch: master
Review: https://review.openstack.org/635106

Changed in blazar:
status: New → In Progress
Pierre Riteau (priteau)
Changed in blazar:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to blazar (master)

Reviewed: https://review.openstack.org/634906
Committed: https://git.openstack.org/cgit/openstack/blazar/commit/?id=41efc33338064f349890e7ee3528eb95a9804b8b
Submitter: Zuul
Branch: master

commit 41efc33338064f349890e7ee3528eb95a9804b8b
Author: Tetsuro Nakamura <email address hidden>
Date: Tue Feb 5 10:27:58 2019 +0000

    Raise error if resource provider is not found

    On reservation provider creation, dict key error occurred if the host
    resource provider is not found, which is difficult to debug. This
    patch changes it to raise a more understandable one,
    ResourceProviderNotFound error.

    Change-Id: Id9a23a3fd92597c87dcdfba7b8e73e720b0ab656
    Related-Bug: #1814594

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to blazar (master)

Reviewed: https://review.openstack.org/635106
Committed: https://git.openstack.org/cgit/openstack/blazar/commit/?id=7dc9a6a7bfe35ffb204a24ab4ad8e32d4e3496ea
Submitter: Zuul
Branch: master

commit 7dc9a6a7bfe35ffb204a24ab4ad8e32d4e3496ea
Author: Tetsuro Nakamura <email address hidden>
Date: Wed Jan 23 17:06:13 2019 +0000

    Use hypervisor_hostname for host name

    In Nova, "service host" is where nova-compute is running and
    "hypervisor_hostname" represent each physical node that the virt
    driver reports. They can be different in some of the hypervisor
    backends where one nova-compute corresponds to multiple physical
    nodes. Blazar holds the values separately as "service_name" and
    "hypervisor_hostname".

    Since Nova aggreate is associated to nova-compute service, we used
    "service_name" with aggregate solution for reservation. However, now
    we can use "hypervisor_hostname" with placement api solution for
    reservation. This patch switches it.

    Change-Id: I0e089c764e81894f065872e7b44a4ea8cfa49bd6
    Closes-Bug: #1814594

Changed in blazar:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/blazar 3.0.0.0rc1

This issue was fixed in the openstack/blazar 3.0.0.0rc1 release candidate.

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.