ironic-inspector/ironic_inspector
Harald Jensås 99c88629ad Raise KeyboardInterrupt on SIGTERM - Workaround
Catch SIGTERM signal and call the signal handler method.
The signal handler then raises KeyboardInterrupt. The
KeyboardInterrupt won't be caught by any 'except Exception'
clauses.

Without this the service does not stop periodic workers,
tear down pxe filters etc as it is supposed to on shutdown.

NOTE: Calling shutdown() directly from the signal handler
causes the below error. This is why the signal handler
raises KeyboardInterrupt.
 AssertionError: Cannot switch to MAINLOOP from MAINLOOP

This patch differs from the commit on master:
 * It also imports 'signal' module. In master the signal
   module was already imported.

Related-Bug: #1765700

Story: 2001890
Task: 14374
Change-Id: If0e24eae767b7806243fa4ae34fedb30ae9af25a
(cherry picked from commit 737dbeae11)
2018-05-25 11:05:21 +02:00
..
cmd Preparing for service splitting 2017-05-26 11:59:35 +03:00
common Remove use of construct lib FieldError exception 2018-02-03 23:20:55 +00:00
migrations Merge "PGSQL: create Enum before using" 2017-07-29 21:40:20 +00:00
plugins Only set switch_id in local_link_connection if it is a mac address 2018-02-13 06:58:35 -08:00
pxe_filter PXE boot filtering drivers 2017-06-28 12:25:37 +02:00
test Only set switch_id in local_link_connection if it is a mac address 2018-02-13 06:58:35 -08:00
__init__.py Switch to pbr 2015-06-18 16:09:07 +02:00
alembic.ini Add alembic migrations for the inspector database 2015-09-23 14:44:46 +01:00
api_tools.py Add API for listing all introspection statuses 2016-11-21 15:58:24 +01:00
conf.py PXE filter options have no effect yet 2017-08-15 16:02:43 +02:00
db.py Use new oslo db EngineFacade 2017-06-15 14:25:55 +03:00
dbsync.py Use flake8-import-order 2017-02-16 10:11:06 -08:00
firewall.py Merge "Remove translation of log messages Part-2" 2017-03-29 11:17:30 +00:00
introspect.py Clean up deprecated config options 2017-08-09 11:38:29 +03:00
introspection_state.py Allow timeout in active states 2017-05-10 15:11:59 +02:00
main.py Merge "Completely remove support for setting IPMI credentials" 2017-05-31 15:04:49 +00:00
node_cache.py Merge "Deprecate removing old status and disable it by default" 2017-06-15 10:33:15 +00:00
process.py Do not rely on the older ipmi_address field on lookup 2017-09-08 10:07:36 +00:00
rules.py Remove rollback support from introspection rules 2017-05-17 18:33:34 +02:00
utils.py Merge "Treat 0.0.0.0 and '' as missing BMC address" 2017-08-10 16:51:42 +00:00
version.py Use Reno for release notes management 2015-11-26 10:12:14 +01:00
wsgi_service.py Raise KeyboardInterrupt on SIGTERM - Workaround 2018-05-25 11:05:21 +02:00