oslo.reports/oslo_reports
Takashi Kajinami db11260c11 GMR: Allow disabling signal handler
Some services such as nova introduced GMR for API wsgi application
so that GMR can be generated via a file handler. However the current
setup method tries to register signal handler and causes warnings.

For example we are seeing the following error when starting nova-api
by apache + mod_wsgi.

mod_wsgi (pid=80323): Callback registration for signal 12 ignored.
  File "/var/www/cgi-bin/nova/nova-api", line 52, in <module>
    application = init_application()
  File "/usr/lib/python3.9/site-packages/nova/api/openstack/compute/wsgi.py", line 20, in init_application
    return wsgi_app.init_application(NAME)
  File "/usr/lib/python3.9/site-packages/nova/api/openstack/wsgi_app.py", line 128, in init_application
    init_global_data(conf_files, name)
  File "/usr/lib/python3.9/site-packages/nova/utils.py", line 1122, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/nova/api/openstack/wsgi_app.py", line 105, in init_global_data
    gmr.TextGuruMeditation.setup_autorun(
  File "/usr/lib/python3.9/site-packages/oslo_reports/guru_meditation_report.py", line 152, in setup_autorun
    cls._setup_signal(signal.SIGUSR2,
  File "/usr/lib/python3.9/site-packages/oslo_reports/guru_meditation_report.py", line 185, in _setup_signal
    signal.signal(signum,

This introduces the new argument so that we can disable signal handler
completely to avoid such warnings.

Change-Id: I95170542fecb493260a22d9148f3a2777207cb0e
2023-08-03 21:37:33 +09:00
..
generators Stop to use the __future__ module. 2020-06-02 20:40:02 +02:00
locale/en_GB/LC_MESSAGES Imported Translations from Zanata 2018-03-01 06:04:38 +00:00
models Remove all six usage 2020-10-14 10:24:52 +08:00
tests Support integer keys of dicts in text serialization 2021-12-20 11:19:19 +01:00
views Support integer keys of dicts in text serialization 2021-12-20 11:19:19 +01:00
__init__.py Graduation Prep: Initial Import Fixup 2015-06-03 13:46:39 -04:00
_i18n.py Update the documentation link 2017-08-23 15:12:32 +08:00
_utils.py Remove all six usage 2020-10-14 10:24:52 +08:00
guru_meditation_report.py GMR: Allow disabling signal handler 2023-08-03 21:37:33 +09:00
opts.py Update hacking version 2019-02-17 11:16:48 +08:00
report.py Remove all six usage 2020-10-14 10:24:52 +08:00