Plugin gets loaded twice

Bug #834449 reported by Sumit Naiksatam on 2011-08-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
High
Salvatore Orlando
quantum (Ubuntu)
Undecided
Unassigned
Nominated for Precise by Yolanda Robla

Bug Description

I believe there was bug earlier which resolved something similar, but I am still seeing this in the latest build (plugin loads exactly twice):

2011-08-25 23:42:54 DEBUG [quantum.service] ********************************************************************************
2011-08-25 23:42:54 DEBUG [quantum.service] Configuration options gathered from config file:
2011-08-25 23:42:54 DEBUG [quantum.service] /root/sw/openstack/src/quantum/quantum/quantum/common/../../etc/quantum.conf
2011-08-25 23:42:54 DEBUG [quantum.service] ================================================
2011-08-25 23:42:54 DEBUG [quantum.service] / quantumversions
2011-08-25 23:42:54 DEBUG [quantum.service] /v1.0 quantumapi
2011-08-25 23:42:54 DEBUG [quantum.service] api_extensions_path extensions
2011-08-25 23:42:54 DEBUG [quantum.service] bind_host 0.0.0.0
2011-08-25 23:42:54 DEBUG [quantum.service] bind_port 9696
2011-08-25 23:42:54 DEBUG [quantum.service] debug True
2011-08-25 23:42:54 DEBUG [quantum.service] verbose True
2011-08-25 23:42:54 DEBUG [quantum.service] ********************************************************************************
2011-08-25 23:42:54 INFO [quantum.service] Using paste.deploy config at: /root/sw/openstack/src/quantum/quantum/quantum/common/../../etc/quantum.conf
2011-08-25 23:42:54 DEBUG [quantum.manager] Plugin location:quantum.plugins.SamplePlugin.FakePlugin
2011-08-25 23:42:55 DEBUG [quantum.manager] Successfully imported Quantum plug-in.All compatibility tests passed
2011-08-25 23:42:55 DEBUG [routes.middleware] Initialized with method overriding = True, and path info altering = True
2011-08-25 23:42:55 DEBUG [quantum.manager] Plugin location:quantum.plugins.SamplePlugin.FakePlugin
2011-08-25 23:42:55 DEBUG [quantum.manager] Successfully imported Quantum plug-in.All compatibility tests passed
2011-08-25 23:42:55 INFO [quantum.common.extensions] Initializing extension manager.
2011-08-25 23:42:55 INFO [quantum.common.extensions] Loading extension file: __init__.py
2011-08-25 23:42:55 DEBUG [quantum.common.extensions] Extended resource: extensions
2011-08-25 23:42:55 DEBUG [routes.middleware] Initialized with method overriding = True, and path info altering = True
2011-08-25 23:42:55 DEBUG [eventlet.wsgi.server] (8431) wsgi starting up on http://0.0.0.0:9696/

Related branches

Changed in quantum:
milestone: none → diablo-rbp

Thanks for reporting this bug.
This is definitely a regression. The root cause is the extension framework, as the following line:

        ext_mgr = PluginAwareExtensionManager(extensions_path,
                                              QuantumManager().get_plugin())

not only invokes the class method get_plugin but also creates an instance of QuantumManager, whose constructor load the plugin.
The fix is very trivial.

A branch has been attached and proposed for merge.

Changed in quantum:
importance: Undecided → High
assignee: nobody → Salvatore Orlando (salvatore-orlando)
status: New → In Progress
Sumit Naiksatam (snaiksat) wrote :

Thanks Salvatore. I have tested this and can confirm that the plugin is loaded only once after your fix. However, I did notice that the extensions are getting loaded now (might not necessarily be a side effect of your fix) even when the configured plugin is not supporting them. Just want to make sure that this is indeed the expected behavior.

I would have ideally expected the loading of a particular plugin to drive the loading of the extensions it supports (since without the support from the plugin, the loading of the extensions does not have too much meaning). If you agree with this line of reasoning, an enhancement bug can be created for the extension framework (I can create it).

Changed in quantum:
status: In Progress → Fix Committed
dan wendlandt (danwent) on 2012-01-24
Changed in quantum:
status: Fix Committed → Fix Released
Changed in quantum (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers