Avoid loading plugin multiple times

Bug #804237 reported by Salvatore Orlando
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Salvatore Orlando
quantum (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Precise by Yolanda Robla

Bug Description

The API currently loads the plugin multiple times.
Plugin is loaded when the controller is initialized (quantum.api.api_common.QuantumController._init), as quantum.manager.QuantumManager.get_manager is invoked.

This happens because a distinct instance of QuantumManager is created for each controller. We should have a single instance of QuantumManager, and then pass it to all the controllers.

It would be good to provide this fix as plugins might have instance variables which will end up having different values in the two controllers.

Related branches

Changed in quantum:
assignee: nobody → Salvatore Orlando (salvatore-orlando)
Revision history for this message
dan wendlandt (danwent) wrote :

Good to know. This could definitely be a problem.

Changed in quantum:
importance: Undecided → High
Changed in quantum:
status: New → In Progress
Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

Branch will be proposed for merge as soon as the unit tests branch lands in trunk

Changed in quantum:
status: In Progress → Fix Committed
dan wendlandt (danwent)
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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