diff --git a/.zuul.yaml b/.zuul.yaml index 84bb45c2f858c4e54d39cadce50ede7e7390c34e..4066fb485dcffe5fa00d43fb7bf0120e30f09d3c 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -2,7 +2,7 @@ templates: - check-requirements - lib-forward-testing-python3 - - openstack-python3-xena-jobs + - openstack-python3-yoga-jobs - periodic-stable-jobs - publish-openstack-docs-pti - release-notes-jobs-python3 diff --git a/oslo_service/_options.py b/oslo_service/_options.py index 0b356d217221c1dae416b0849230e0f235435bb6..72c06f36cb733972f31a7264ec3888a3140acbf2 100644 --- a/oslo_service/_options.py +++ b/oslo_service/_options.py @@ -88,6 +88,11 @@ wsgi_opts = [ "If an incoming connection is idle for this number of " "seconds it will be closed. A value of '0' means " "wait forever."), + cfg.BoolOpt('wsgi_server_debug', + default=False, + help="True if the server should send exception tracebacks to " + "the clients on 500 errors. If False, the server will " + "respond with empty bodies."), ] ssl_opts = [ diff --git a/oslo_service/eventlet_backdoor.py b/oslo_service/eventlet_backdoor.py index 83908055ff96b77ca01483f3da8f00188b4b0750..ada9a938ca8de3308879abe540ccc0eb4e37ef9f 100644 --- a/oslo_service/eventlet_backdoor.py +++ b/oslo_service/eventlet_backdoor.py @@ -86,7 +86,8 @@ def _detailed_dump_frames(f, thread_index): def _find_objects(t): - return [o for o in gc.get_objects() if isinstance(o, t)] + return [o for o in gc.get_objects() + if hasattr(o, "__class__") and isinstance(o, t)] def _capture_profile(fname=''): diff --git a/oslo_service/loopingcall.py b/oslo_service/loopingcall.py index 32c7573a78fe254bdf2014685f1b5f1d68aa672a..794f0cfd6bdab69ad952230748b3de93ee1fc656 100644 --- a/oslo_service/loopingcall.py +++ b/oslo_service/loopingcall.py @@ -348,7 +348,7 @@ class BackOffLoopingCall(LoopingCallBase): if timeout > 0 and self._error_time + idle > timeout: raise LoopingCallTimeOut( _('Looping call timed out after %.02f seconds') - % self._error_time) + % (self._error_time + idle)) self._error_time += idle return idle diff --git a/oslo_service/wsgi.py b/oslo_service/wsgi.py index 731e2a468b4edd7b0e3664934d74de300ba8de29..8b518bd295f61528092413eb2b1a1767d4de6491 100644 --- a/oslo_service/wsgi.py +++ b/oslo_service/wsgi.py @@ -180,7 +180,7 @@ class Server(service.ServiceBase): 'custom_pool': self._pool, 'log': self._logger, 'log_format': self.conf.wsgi_log_format, - 'debug': False, + 'debug': self.conf.wsgi_server_debug, 'keepalive': self.conf.wsgi_keep_alive, 'socket_timeout': self.client_socket_timeout } diff --git a/releasenotes/notes/add-wsgi_server_debug-opt-70d818b5b78bfc7c.yaml b/releasenotes/notes/add-wsgi_server_debug-opt-70d818b5b78bfc7c.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b9a952cdb838d2fd207cb22e6a0c0f14a949eaa5 --- /dev/null +++ b/releasenotes/notes/add-wsgi_server_debug-opt-70d818b5b78bfc7c.yaml @@ -0,0 +1,7 @@ +--- +features: + - | + A new config options, ``[DEFAULT] wsgi_server_debug``, has been added. + This allows admins to configure whether the server should send exception + tracebacks to the clients on HTTP 500 errors. This defaults to ``False``, + preserving previous behavior. diff --git a/releasenotes/notes/fix-find-object-in-backdoor-487bf78c4c502594.yaml b/releasenotes/notes/fix-find-object-in-backdoor-487bf78c4c502594.yaml new file mode 100644 index 0000000000000000000000000000000000000000..31c088ade5ac14b1d15060e7ee1b04bd943bd706 --- /dev/null +++ b/releasenotes/notes/fix-find-object-in-backdoor-487bf78c4c502594.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fix the backdoor helper method fo() to also work when there are objects + present in the current python instance that do not have a __class__ + attribute. diff --git a/releasenotes/source/index.rst b/releasenotes/source/index.rst index 0d4a4e69077ffaa50d74c0cf4c79c4901a3b10b1..ae4e6d8986296fbe0a47ec079b7fd621b7166535 100644 --- a/releasenotes/source/index.rst +++ b/releasenotes/source/index.rst @@ -6,6 +6,7 @@ :maxdepth: 1 unreleased + xena wallaby victoria ussuri diff --git a/releasenotes/source/xena.rst b/releasenotes/source/xena.rst new file mode 100644 index 0000000000000000000000000000000000000000..1be85be3ebf18741d311aa41096d417a99c970bf --- /dev/null +++ b/releasenotes/source/xena.rst @@ -0,0 +1,6 @@ +========================= +Xena Series Release Notes +========================= + +.. release-notes:: + :branch: stable/xena