Termination signals not handled correctly in case of several ProcessLauncher instances in one process
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Invalid
|
Undecided
|
Elena Ezhova | ||
oslo-incubator |
Fix Released
|
Undecided
|
Elena Ezhova |
Bug Description
Neutron server has api and rpc workers and when their number is configured to be non-zero each worker is launched using ProcessLauncher from oslo-incubator's service.py. It is important to note that different instances of ProcessLauncher are used for launching api and rpc workers. [1], [2]
When ProcessLauncher is initialized, among else it setups handlers for termination signals (SIGHUP, SIGTERM and SIGINT) [3]. It is known that only one signal handler can be installed per signal and only the latest installed handler will be active. So, if several ProcessLauncher instances are being initialized in the same process then only handlers of the last instance will be triggered on receiving a signal.
The consequence is that when neutron-server is running with non-zero number of api and rpc workers sending a parent process SIGHUP would result in reset method being called only for rpc workers.
The possible solution is to store all handlers in a class attribute and redefine handle_signal so that it calls all handlers one by one.
An alternative is to inherit from ProcessLauncher in neutron and redefine signal handling there.
[1] https:/
[2] https:/
[3] https:/
Changed in oslo-incubator: | |
assignee: | nobody → Elena Ezhova (eezhova) |
Changed in neutron: | |
status: | New → Opinion |
assignee: | nobody → Elena Ezhova (eezhova) |
Changed in oslo-incubator: | |
status: | New → Confirmed |
Changed in oslo-incubator: | |
status: | Confirmed → In Progress |
Changed in oslo-incubator: | |
milestone: | none → 2015.1.0 |
status: | Fix Committed → Fix Released |
Changed in neutron: | |
status: | Opinion → Invalid |
Review for oslo-incubator: https:/ /review. openstack. org/#/c/ 164993