From a88a695c01bce02c4eabef18e60caaac37ce5567 Mon Sep 17 00:00:00 2001 From: OpenStack Release Bot Date: Fri, 10 Sep 2021 14:39:00 +0000 Subject: [PATCH 1/5] Update master for stable/xena Add file to the reno documentation build to show release notes for stable/xena. Use pbr instruction to increment the minor version number automatically so that master versions are higher than the versions on stable/xena. Sem-Ver: feature Change-Id: I218ac5f11e3ac8042988d91b6a2beef3522dde70 --- releasenotes/source/index.rst | 1 + releasenotes/source/xena.rst | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 releasenotes/source/xena.rst diff --git a/releasenotes/source/index.rst b/releasenotes/source/index.rst index 0d4a4e6..ae4e6d8 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 0000000..1be85be --- /dev/null +++ b/releasenotes/source/xena.rst @@ -0,0 +1,6 @@ +========================= +Xena Series Release Notes +========================= + +.. release-notes:: + :branch: stable/xena -- GitLab From fcdeb4a1b6da8b2a6c7935909e82db07e3c9b1c1 Mon Sep 17 00:00:00 2001 From: OpenStack Release Bot Date: Fri, 10 Sep 2021 14:39:01 +0000 Subject: [PATCH 2/5] Add Python3 yoga unit tests This is an automatically generated patch to ensure unit testing is in place for all the of the tested runtimes for yoga. See also the PTI in governance [1]. [1]: https://governance.openstack.org/tc/reference/project-testing-interface.html Change-Id: I8dc196b1b2cd3f6986fb2e80b1399a90c26bd6f9 --- .zuul.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.zuul.yaml b/.zuul.yaml index 84bb45c..4066fb4 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 -- GitLab From d3ee8ef00a6c61cb0326d06fd277ceb5f1bdf0c5 Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Thu, 16 Sep 2021 10:14:34 -0700 Subject: [PATCH 3/5] Fix BackOffLoopingCall error so it is not misleading The backoff looping call logging was previously making a decision on if timeout had or was going to be exceeded by including idle time and it's internal time, however this is misleading as the overall operation may take 30 seconds externally, a user initiated timeout of 30 seconds is requested, and the error might say something like 18 seconds has passed, when that is incorrect. The logic is actualy correct, the logging was just misleading. Fixes the exception message to use the total time. Change-Id: Ie9ef5a53abb24f6ab7de0ad57a672c0a8d7ff0ee --- oslo_service/loopingcall.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oslo_service/loopingcall.py b/oslo_service/loopingcall.py index 32c7573..794f0cf 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 -- GitLab From eb191548cffa43fb808ec6443dc3540881902137 Mon Sep 17 00:00:00 2001 From: Sebastian Lohff Date: Wed, 14 Jul 2021 12:37:49 +0200 Subject: [PATCH 4/5] Fix fo() backdoor command for non-class objects The backdoor command fo() uses isinstance() to check if an object is an instance of a class. This only works with objects that have a __class__ attribute, else an AttributeError is raised by isinstance(). This is seldomly the case, though if there is one such object fo() will cease to work. Therefore we need to protect us against this case by checking for a __class__ attribute before calling isinstance(). An example for an object without __class__ would be functools._lru_list_elem. Change-Id: Ia4c5cbdc249535d36f6e71f7b2a7359bc6fdf219 Closes-Bug: #1946072 --- oslo_service/eventlet_backdoor.py | 3 ++- .../notes/fix-find-object-in-backdoor-487bf78c4c502594.yaml | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/fix-find-object-in-backdoor-487bf78c4c502594.yaml diff --git a/oslo_service/eventlet_backdoor.py b/oslo_service/eventlet_backdoor.py index 8390805..ada9a93 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/releasenotes/notes/fix-find-object-in-backdoor-487bf78c4c502594.yaml b/releasenotes/notes/fix-find-object-in-backdoor-487bf78c4c502594.yaml new file mode 100644 index 0000000..31c088a --- /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. -- GitLab From 6552b9a820c1b4880cd999f0b44561275019b9f4 Mon Sep 17 00:00:00 2001 From: Bence Romsics Date: Fri, 19 Nov 2021 13:52:00 +0100 Subject: [PATCH 5/5] Make debug option of wsgi server configurable Because in some deployments tracebacks in API responses are unwanted for security reasons. Change-Id: I8a2acea7393c369bfa7d7822f21b4d40d56d6739 Needed-By: https://review.opendev.org/c/openstack/neutron/+/818391 Partial-Bug: #1951429 --- oslo_service/_options.py | 5 +++++ oslo_service/wsgi.py | 2 +- .../notes/add-wsgi_server_debug-opt-70d818b5b78bfc7c.yaml | 7 +++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/add-wsgi_server_debug-opt-70d818b5b78bfc7c.yaml diff --git a/oslo_service/_options.py b/oslo_service/_options.py index 0b356d2..72c06f3 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/wsgi.py b/oslo_service/wsgi.py index 731e2a4..8b518bd 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 0000000..b9a952c --- /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. -- GitLab