commit d795cfc5c89e9445148a48e9a0b9000485bc4ba3
Author: Jeff Peeler <email address hidden>
Date: Fri Aug 1 14:39:00 2014 -0400
Fix signal handling for WSGI servers
Previously, sending a SIGHUP to the parent process would close the
shared socket used with all the WSGI servers (problematic when multiple
workers are present). Also, exiting the wait loop in the parent would
cause the children to be orphaned. Instead, make the parent process
restart all the children servers upon receipt of SIGHUP. This behavior
seems to make sense given that sending SIGHUP to a child restarts and
creates a new server (due to the parent handling of the children).
Another fix was to issue a SIGTERM upon Ctrl-C in order to not leave
parentless children. SIGTERM was chosen instead of SIGINT simply to
avoid worker tracebacks on the terminal.
Minor unrelated change: the WSGI server in single worker mode has been
changed to also respect the debug flag, exactly the same as with
multiple workers.
Note: the original bug report was examining lack of signal handling
based on the Oslo service code. However, only the engine makes use of
it.
Reviewed: https:/ /review. openstack. org/111363 /git.openstack. org/cgit/ openstack/ heat/commit/ ?id=d795cfc5c89 e9445148a48e9a0 b9000485bc4ba3
Committed: https:/
Submitter: Jenkins
Branch: master
commit d795cfc5c89e944 5148a48e9a0b900 0485bc4ba3
Author: Jeff Peeler <email address hidden>
Date: Fri Aug 1 14:39:00 2014 -0400
Fix signal handling for WSGI servers
Previously, sending a SIGHUP to the parent process would close the
shared socket used with all the WSGI servers (problematic when multiple
workers are present). Also, exiting the wait loop in the parent would
cause the children to be orphaned. Instead, make the parent process
restart all the children servers upon receipt of SIGHUP. This behavior
seems to make sense given that sending SIGHUP to a child restarts and
creates a new server (due to the parent handling of the children).
Another fix was to issue a SIGTERM upon Ctrl-C in order to not leave
parentless children. SIGTERM was chosen instead of SIGINT simply to
avoid worker tracebacks on the terminal.
Minor unrelated change: the WSGI server in single worker mode has been
changed to also respect the debug flag, exactly the same as with
multiple workers.
Note: the original bug report was examining lack of signal handling
based on the Oslo service code. However, only the engine makes use of
it.
Change-Id: I8519cc6fedf72b 38a8ce0762bb86c d70e58e0dc7
Closes-bug: #1276694