yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #90987
[Bug 1888829] Re: Improve core plugin extension filtering using the mechanism driver information
** Changed in: neutron
Status: New => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1888829
Title:
Improve core plugin extension filtering using the mechanism driver
information
Status in neutron:
Fix Released
Bug description:
Those are the current steps to load the plugins and extensions during the Neutron server initialization:
1) The plugins are loaded. The first one is the core plugin (ML2Plugin). During the initialization, the mechanism drivers are loaded [1].
2) The PluginAwareExtensionManager is instantiated [2]. It will load all extensions from the loaded plugins, first from the core one (ML2Plugin) and then the service plugins. The extensions are defined, per plugin (and the inherited classes), in "supported_extension_aliases".
Some plugins, "Ml2Plugin" and "L3RouterPlugin", implement a non standard method (at least not defined in the ServicePluginBase abs class) to remove from the supported extensions list those ones not matching a defined criteria.
3) The PluginAwareExtensionManager extend the extension resources [3].
In this phase, some extensions will request the presence of other ones
(get_required_extensions). If those requirements are not fulfilled,
the server will exit with an exception.
The proposal of this RFE is to add a step in this process, between (2) and (3): each plugin will be able to revisit the list of loaded extensions and unload gracefully those ones not needed.
In this description I'm reducing the scope of this feature to just the
ML2Plugin. This plugin will filter the extension list depending on the
loaded mechanism drivers. If one extension is not supported by any
loaded mechanism driver, it will be removed. This is very similar to
the process done in (2) when "Ml2Plugin" or "L3RouterPlugin" remove
those extensions not configured or not supported.
In order to allow each mechanism driver to filter the loaded extensions, the mechanism driver will have two lists:
- A list of supported extensions.
- A list of not supported extensions.
In some cases, it will be easier to maintain only this list of not
supported extensions (could be shorter).
If a mechanism driver does not have any of those lists populated (by
default), the behavior will be current one, keeping backwards
compatibility.
[1]https://github.com/openstack/neutron/blob/13c5fc4ddd70aba7909f017f49b1047d2af1482b/neutron/plugins/ml2/managers.py#L428
[2]https://github.com/openstack/neutron/blob/a388701ddfe628e9a5bd16a78422164799b11ef8/neutron/pecan_wsgi/startup.py#L40
[3]https://github.com/openstack/neutron/blob/a388701ddfe628e9a5bd16a78422164799b11ef8/neutron/pecan_wsgi/startup.py#L41
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1888829/+subscriptions
References