Report client does not handle keystone errors properly

Bug #1768953 reported by Oliver Walsh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Undecided
Oliver Walsh

Bug Description

_create_resource_provider is wrapped by safe_connect which results in a None return value if keystone/connect exceptions are raised.

On master the result is a TypeError and the rp isn't cached:
      File "nova/scheduler/client/report.py", line 697, in _ensure_resource_provider
        rps_to_refresh or [created_rp])
      File "nova/compute/provider_tree.py", line 268, in populate_from_iterable
        to_add_by_uuid = {pd['uuid']: pd for pd in provider_dicts}
      File "nova/compute/provider_tree.py", line 268, in <dictcomp>
        to_add_by_uuid = {pd['uuid']: pd for pd in provider_dicts}
    TypeError: 'NoneType' object has no attribute '__getitem__'

However on stable/pike _ensure_resource_provider caches the None return value and never retries the resource provider create. Seen in https://bugs.launchpad.net/tripleo/+bug/1767076

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

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

Changed in nova:
assignee: nobody → Oliver Walsh (owalsh)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Oliver Walsh (<email address hidden>) on branch: master
Review: https://review.openstack.org/566148

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.