
There are several cases where plugin initialization should be handled after neutron-server forks API/RPC workers. For example, starting a client connection to an SDN controller before forking copies the fd of the socket to the child process, but then you have multiple processes trying to read/write the same socket connection. It is also useful for a plugin to be able to do something in only one process, regardless of how many workers are forked. One example would be handling syncing from an external system to the neutron database. This patch does 3 things: 1) Treats rpc_workers=0 as = 1. This simplifies the code for handling notification that forking has completed. In the existing code, calling the notification in the Worker object's start() method would happen twice in the case where both api and rpc workers were 0, despite there being only one process. An earlier patch already changed the default api_workers to be the number of processors. 2) Adds notification of forking via the callbacks mechanism. Plugins can subscribe to resources.PROCESS, event.AFTER_CREATE and do any post-fork initialization that needs to be done for every spawned process. 3) Adds core/service plugin calls to get_workers() which defaults to returning (). Plugins that need additional processes to spawn should just return an iterable of NeutronWorkers that will be spawned in their own process. DocImpact Closes-Bug: #1463129 Change-Id: Ib99954678c2b4f32f486b537979d446aafbea07b
Welcome!
You have come across a cloud computing network fabric controller. It has identified itself as "Neutron." It aims to tame your (cloud) networking!
External Resources:
The homepage for Neutron is: http://launchpad.net/neutron. Use this site for asking for help, and filing bugs. Code is available on git.openstack.org at <http://git.openstack.org/cgit/openstack/neutron>.
The latest and most in-depth documentation on how to use Neutron is available at: <http://docs.openstack.org>. This includes:
- Neutron Administrator Guide
- Networking Guide
- Neutron API Reference:
-
http://docs.openstack.org/api/openstack-network/2.0/content/
- Current Neutron developer documentation is available at:
For help on usage and hacking of Neutron, please send mail to <mailto:openstack-dev@lists.openstack.org>.
For information on how to contribute to Neutron, please see the contents of the CONTRIBUTING.rst file.
Description
Languages
Python
99.7%
Shell
0.3%