Allow ml2 drivers to start their own RPC listeners#66
Open
sebageek wants to merge 2 commits into
Open
Conversation
To allow MechanismDrivers to start their own RPC listeners (e.g. for communication with custom agents) the MechanismManager will now call start_rpc_listeners() of each driver. This is done as part of Ml2Plugin.start_rpc_listeners(). It is added as an alternative to create the backends in initialize(), as in cases where a driver is split up into the API and RPC part we want to make sure these backends are only started in the RPC part of neutron. This patch depends on MechanismDrivers.start_rpc_listeners() in neutron-lib[0]. [0] https://review.opendev.org/c/openstack/neutron-lib/+/919589 Change-Id: I31e253180f474abf6d266d23c50f9dc89f17f687 Depends-On: https://review.opendev.org/c/openstack/neutron-lib/+/919589 Closes-Bug: #2065198
We do not need to call start_rpc_workers() to start the rpc listeners of our ml2 drivers, as these are now started via start_rpc_listeners(), which is called from within Ml2Plugin's own start_rpc_listeners() method. All drivers that rely on their listeners to be started via get_workers() and do not have a proper start_rpc_listeners() method will need to implement one, but as most use get_workers() to just call their own start_rpc_listeners() there shouldn't be much to be done on the driver's side. This reverts commit b2376f8.
f34a418 to
bfd911d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a backport of a proposed commit to upstream (which is not yet merged there). We also revert the original patch which starts workers in our neutron-rpc-servers (which we did as a crutch to start rpc listeners our ml2 drivers needed), as this is now done via the Ml2Plugin. For details, see the individual commit messages.