Missing extension aliases will not error

Bug #1225080 reported by Amir Sadoughi
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Amir Sadoughi

Bug Description

In neutron/api/extensions.py all extensions from a directory path are loaded, for each of the extensions their alias property is checked against a plugin's supported_extension_aliases property list. However, if an alias is in the list of supported_extension_aliases and not in the directory an error is not raised, misleading the user if an extension file is missing.

Tags: neutron-core
Changed in neutron:
assignee: nobody → Amir Sadoughi (amir-sadoughi)
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/47432

Changed in neutron:
status: New → In Progress
Changed in neutron:
importance: Undecided → Medium
tags: added: neutron-core
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/47432
Committed: http://github.com/openstack/neutron/commit/f4c8a1831402cd4d48b2876e0b223f855020d896
Submitter: Jenkins
Branch: master

commit f4c8a1831402cd4d48b2876e0b223f855020d896
Author: Amir Sadoughi <email address hidden>
Date: Thu Sep 5 01:38:41 2013 -0500

    Added check on plugin.supported_extension_aliases

    Added check to neutron.api.extensions.PluginAwareExtensionManager
    which raises an exception when an alias in the plugin's
    `supported_extension_aliases` list is not found in the set of loaded
    extension aliases. If an alias is missing, it means the extension for
    that alias has not been loaded, has not been found, and the file is
    missing from paths listed in `oslo.config.CONF.api_extensions_path`.

    This guards against a common class of bugs in plugins,
    such as typographical errors in the `supported_extension_aliases`
    property.

    Plugin changes:

    * bigswitch.plugin: Moves api_extensions_path override to plugin's
    __init__ method, similar to other plugins.

    * cisco.n1kv.n1kv_neutron_plugin: Removes "policy_profile_binding" and
    "network_profile_binding" as they don't exist in Neutron currently.
    Removed override of api_extensions_path as it is loaded through
    cisco.network_plugin.

    * cisco.network_plugin: Renames "Cisco Credential" to "credential".
    Adds api_extension_path override to plugin's __init__ method.

    * metaplugin.meta_neutron_plugin: Avoids alias of empty string when
    cfg.CONF.META.supported_extension_aliases is an empty string.

    * midonet.plugin: Fixes regression of 98e16a06 from 715b16ac.

    * nec.nec_plugin: Extended override of api_extensions_path to append
    nec extensions path to existing configured path.

    * nicira.NeutronPlugin: Extended override of api_extensions_path to
    append NXP_EXT_PATH to existing configured path.

    Fixes: bug 1225080

    Change-Id: Idcaade221d83c611fcbd87b503b2c8377d106962

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