load extension lead to error calling 'volumes': 'NoneType' object has no attribute 'controller' for v3 api

Bug #1373238 reported by jichenjc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
jichenjc

Bug Description

Add a new plugin lead to following error, the root cause is servers was loaded after volumes
so the inherits.controller is None

if resource.inherits:
                inherits = self.resources.get(resource.inherits)
                if not resource.controller:
                    resource.controller = inherits.controller

ERROR [stevedore.extension] error calling 'volumes': 'NoneType' object has no attribute 'controller'
ERROR [stevedore.extension] 'NoneType' object has no attribute 'controller'
Traceback (most recent call last):
  File "/home/jichen/git/nova/.venv/local/lib/python2.7/site-packages/stevedore/extension.py", line 248, in _invoke_one_plugin
    response_callback(func(e, *args, **kwds))
  File "/home/jichen/git/nova/nova/api/openstack/__init__.py", line 376, in _register_resources
    resource.controller = inherits.controller
AttributeError: 'NoneType' object has no attribute 'controller'
DEBUG [nova.api.openstack] Running _register_resources on <nova.api.openstack.compute.plugins.v3.servers.Servers object at 0xb484d6c>

Tags: api
jichenjc (jichenjc)
Changed in nova:
assignee: nobody → jichenjc (jichenjc)
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/123640

Changed in nova:
status: New → In Progress
Alex Xu (xuhj)
tags: added: api
Changed in nova:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/123640
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=510d2eb7a61d7524f6e0a203cb81b475a9ba3035
Submitter: Jenkins
Branch: master

commit 510d2eb7a61d7524f6e0a203cb81b475a9ba3035
Author: jichenjc <email address hidden>
Date: Mon Nov 10 05:30:18 2014 +0800

    Load extension 2 times fix load sequence issue

    Some extensions such as volumes need to inherit servers, however
    the extension load sequence can't be guaranted. If the servers
    extension is loaded after volumes, the controller of volumes will
    be None and lead to problem.

    Change-Id: Iec1e759f5c1f570a6b0ac65fb357b4f15102499c
    Closes-Bug: #1373238

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-1 → 2015.1.0
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.