Pecan: startup assumes controllers specify plugins

Bug #1528510 reported by Salvatore Orlando
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Salvatore Orlando

Bug Description

At startup, the Pecan API server associates a plugin (core or service) to every Neutron resource.
With this association, every Pecan controller gets a plugin where calls should be dispatched.

However, this association is not performed for 'pecanized extensions' [1]. A 'pecanized' extension is a Neutron API extension which is able to return Pecan controllers. The plugin association is instead currently performed only for those extensions for which a controller is generated on-the-fly using the generic CollectionController and ItemController.

This approach has the drawback that the API extension descriptor should have the logic to identify a plugin for the API itself.
While this is not a bad idea, it requires extensions descriptors to identify a plugin, thus duplicating, in a way, what's already done by the extension manager.

For this reason it is advisable to do plugin association for all extensions during pecan startup unless until the Pecan framework won't rely anymore on the home grown extension manager.

[1] http://git.openstack.org/cgit/openstack/neutron/tree/neutron/pecan_wsgi/startup.py#n86

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

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

Changed in neutron:
status: New → In Progress
Changed in neutron:
milestone: mitaka-2 → mitaka-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/260439
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=5273c6cc86c403f6f787c5d5d357a28462c9b868
Submitter: Jenkins
Branch: master

commit 5273c6cc86c403f6f787c5d5d357a28462c9b868
Author: Salvatore Orlando <email address hidden>
Date: Mon Dec 21 16:00:27 2015 -0800

    Pecan: Always associate plugins with resource

    with this patch, the logic for associating a resource with a plugin
    is now executed for every resoruce. This will avoid requiring the
    method get_pecan_controllers in extensions descriptors to deal with
    this. This item of work is required for a speedy "Pecanization" of
    existing extensions, in particular the 'router' extension.

    The routine for finding a plugin for a resource has been modified to
    allow special treatment of the 'quotas' extension. This extension
    indeed is declared as supported by plugins (usually the core one),
    but the plugin does not implement relevant methods as quota management
    is performed by a distinct driver.

    Further, NeutronPecanController's plugin attribute has been
    converted into a property which loads the value from NeutronManager
    if not yet defined. Indeed in some cases the plugin might be
    instantiated after the controller instance is created.

    Closes-Bug: #1528510

    Change-Id: Ibbfec8fd53855641bd21dec8ef824d5741dfebea

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/neutron 8.0.0.0b3

This issue was fixed in the openstack/neutron 8.0.0.0b3 development milestone.

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.