)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":11816,"name":"mike_mp@zzzcomputing.com","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"a132c86a57d9bc3f80ffed65030a52d5c0fef347","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"0f4905c5_77a1f02a","updated":"2021-11-12 17:20:25.000000000","message":"Im just noting the stack trace here so when I come back to this it\u0027s still there\n\n\n330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors [None req-7ad5bed0-c86d-4f5e-abe1-718348f81fb9 admin admin] An error occurred during processing the request: POST /v2.0/subnetpools HTTP/1.0\n\nNov 12 17:04:18.213966 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors Traceback (most recent call last):\n\nNov 12 17:04:18.215526 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/oslo_middleware/catch_errors.py\", line 40, in __call__\n\nNov 12 17:04:18.215526 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     response \u003d req.get_response(self.application)\n\nNov 12 17:04:18.215526 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/webob/request.py\", line 1313, in send\n\nNov 12 17:04:18.215526 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     status, headers, app_iter \u003d self.call_application(\n\nNov 12 17:04:18.215526 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/webob/request.py\", line 1278, in call_application\n\nNov 12 17:04:18.215526 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     app_iter \u003d application(self.environ, start_response)\n\nNov 12 17:04:18.215526 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/webob/dec.py\", line 129, in __call__\n\nNov 12 17:04:18.215526 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     resp \u003d self.call_func(req, *args, **kw)\n\nNov 12 17:04:18.215526 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/webob/dec.py\", line 193, in call_func\n\nNov 12 17:04:18.215526 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     return self.func(req, *args, **kwargs)\n\nNov 12 17:04:18.215526 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/osprofiler/web.py\", line 112, in __call__\n\nNov 12 17:04:18.215526 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     return request.get_response(self.application)\n\nNov 12 17:04:18.215526 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/webob/request.py\", line 1313, in send\n\nNov 12 17:04:18.215526 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     status, headers, app_iter \u003d self.call_application(\n\nNov 12 17:04:18.215526 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/webob/request.py\", line 1278, in call_application\n\nNov 12 17:04:18.215526 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     app_iter \u003d application(self.environ, start_response)\n\nNov 12 17:04:18.215526 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/webob/dec.py\", line 129, in __call__\n\nNov 12 17:04:18.217659 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     resp \u003d self.call_func(req, *args, **kw)\n\nNov 12 17:04:18.217659 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/webob/dec.py\", line 193, in call_func\n\nNov 12 17:04:18.217659 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     return self.func(req, *args, **kwargs)\n\nNov 12 17:04:18.217659 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/keystonemiddleware/auth_token/__init__.py\", line 341, in __call__\n\nNov 12 17:04:18.217659 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     response \u003d req.get_response(self._app)\n\nNov 12 17:04:18.217659 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/webob/request.py\", line 1313, in send\n\nNov 12 17:04:18.217659 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     status, headers, app_iter \u003d self.call_application(\n\nNov 12 17:04:18.217659 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/webob/request.py\", line 1278, in call_application\n\nNov 12 17:04:18.217659 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     app_iter \u003d application(self.environ, start_response)\n\nNov 12 17:04:18.217659 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/webob/dec.py\", line 143, in __call__\n\nNov 12 17:04:18.217659 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     return resp(environ, start_response)\n\nNov 12 17:04:18.217659 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/webob/dec.py\", line 143, in __call__\n\nNov 12 17:04:18.217659 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     return resp(environ, start_response)\n\nNov 12 17:04:18.217659 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/routes/middleware.py\", line 153, in __call__\n\nNov 12 17:04:18.217659 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     response \u003d self.app(environ, start_response)\n\nNov 12 17:04:18.217659 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/webob/dec.py\", line 143, in __call__\n\nNov 12 17:04:18.217659 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     return resp(environ, start_response)\n\nNov 12 17:04:18.219964 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/pecan/middleware/recursive.py\", line 56, in __call__\n\nNov 12 17:04:18.219964 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     return self.application(environ, start_response)\n\nNov 12 17:04:18.219964 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/pecan/core.py\", line 840, in __call__\n\nNov 12 17:04:18.219964 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     return super(Pecan, self).__call__(environ, start_response)\n\nNov 12 17:04:18.219964 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/pecan/core.py\", line 733, in __call__\n\nNov 12 17:04:18.219964 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     self.handle_hooks(\n\nNov 12 17:04:18.219964 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/pecan/core.py\", line 865, in handle_hooks\n\nNov 12 17:04:18.219964 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     return super(Pecan, self).handle_hooks(hooks, *args, **kw)\n\nNov 12 17:04:18.219964 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/pecan/core.py\", line 342, in handle_hooks\n\nNov 12 17:04:18.219964 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     result \u003d getattr(hook, hook_type)(*args)\n\nNov 12 17:04:18.219964 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/neutron_lib/db/api.py\", line 139, in wrapped\n\nNov 12 17:04:18.219964 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     setattr(e, \u0027_RETRY_EXCEEDED\u0027, True)\n\nNov 12 17:04:18.219964 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/oslo_utils/excutils.py\", line 227, in __exit__\n\nNov 12 17:04:18.219964 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     self.force_reraise()\n\nNov 12 17:04:18.219964 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/oslo_utils/excutils.py\", line 200, in force_reraise\n\nNov 12 17:04:18.219964 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     raise self.value\n\nNov 12 17:04:18.219964 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/neutron_lib/db/api.py\", line 135, in wrapped\n\nNov 12 17:04:18.219964 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     return f(*args, **kwargs)\n\nNov 12 17:04:18.222242 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/opt/stack/oslo.db/oslo_db/api.py\", line 154, in wrapper\n\nNov 12 17:04:18.222242 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     ectxt.value \u003d e.inner_exc\n\nNov 12 17:04:18.222242 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/oslo_utils/excutils.py\", line 227, in __exit__\n\nNov 12 17:04:18.222242 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     self.force_reraise()\n\nNov 12 17:04:18.222242 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/oslo_utils/excutils.py\", line 200, in force_reraise\n\nNov 12 17:04:18.222242 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     raise self.value\n\nNov 12 17:04:18.222242 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/opt/stack/oslo.db/oslo_db/api.py\", line 142, in wrapper\n\nNov 12 17:04:18.222242 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     return f(*args, **kwargs)\n\nNov 12 17:04:18.222242 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/neutron_lib/db/api.py\", line 183, in wrapped\n\nNov 12 17:04:18.222242 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     LOG.debug(\"Retry wrapper got retriable exception: %s\", e)\n\nNov 12 17:04:18.222242 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/oslo_utils/excutils.py\", line 227, in __exit__\n\nNov 12 17:04:18.222242 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     self.force_reraise()\n\nNov 12 17:04:18.222242 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/oslo_utils/excutils.py\", line 200, in force_reraise\n\nNov 12 17:04:18.222242 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     raise self.value\n\nNov 12 17:04:18.222242 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/usr/local/lib/python3.8/dist-packages/neutron_lib/db/api.py\", line 179, in wrapped\n\nNov 12 17:04:18.222242 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     return f(*dup_args, **dup_kwargs)\n\nNov 12 17:04:18.222242 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/opt/stack/neutron/neutron/pecan_wsgi/hooks/quota_enforcement.py\", line 83, in after\n\nNov 12 17:04:18.222242 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     quota.QUOTAS.commit_reservation(\n\nNov 12 17:04:18.224530 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/opt/stack/neutron/neutron/quota/__init__.py\", line 105, in commit_reservation\n\nNov 12 17:04:18.224530 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     self.get_driver().commit_reservation(context, reservation_id)\n\nNov 12 17:04:18.224530 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/opt/stack/neutron/neutron/db/quota/driver.py\", line 270, in commit_reservation\n\nNov 12 17:04:18.224530 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     quota_api.remove_reservation(context, reservation_id,\n\nNov 12 17:04:18.224530 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors   File \"/opt/stack/neutron/neutron/common/utils.py\", line 692, in inner\n\nNov 12 17:04:18.224530 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors     raise RuntimeError(_(\"Method %s cannot be called within a \"\n\nNov 12 17:04:18.224530 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors RuntimeError: Method \u003cfunction remove_reservation at 0x7f4e77e19b80\u003e cannot be called within a transaction.\n\nNov 12 17:04:18.224530 ubuntu-focal-rax-iad-0027330039 neutron-server[105942]: ERROR oslo_middleware.catch_errors ","commit_id":"a62459d079bbcc7dee375ae158c061d74fdcfc37"},{"author":{"_account_id":11816,"name":"mike_mp@zzzcomputing.com","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"c1ba703d3e1e82504e31243666d522355c8726ec","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"7c00431a_10dec4df","updated":"2021-11-12 16:26:53.000000000","message":"recheck\n\ni want to see what the neutron issue was","commit_id":"a62459d079bbcc7dee375ae158c061d74fdcfc37"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"685dc5e2d380d1fda958a4791de47ea352a07c28","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"ad0303fb_f832e3f6","updated":"2022-02-09 15:25:12.000000000","message":"@zzzeek I pushed [1] to neutron-lib to preempt this. Just need to figure out how to get it to pass now, heh\n\n[1] https://review.opendev.org/c/openstack/neutron-lib/+/828514","commit_id":"a530cbfcf2fadbc1bbd7a85086278100f15abf2e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"be554d73ee433e8c170d5f1d32b7c459634751d6","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"3631040a_863a59fa","updated":"2022-02-10 16:25:00.000000000","message":"Hi Stephen and Mike. Checking the \"session.is_active\" property [1] I see that, when autocommit\u003dFalse (the default since 1.4 and only value in 2.0), it returns True when the _transaction is not present, according to [2]. The problem we have in Neutron is that we are considering the old logic: the session is active when there is a txn and this txn is active.\n\nThere are many checks like this in Neutron/neutron-lib code that are now broken because of this change.\n\nI\u0027ve pushed [3][4] to change the way Neutron retrieves if the session is active, only considering when there is a transaction created. Could you please review both patches?\n\nThanks in advance.\n\n[1]https://github.com/sqlalchemy/sqlalchemy/blob/rel_1_4/lib/sqlalchemy/orm/session.py#L3950\n[2]https://github.com/sqlalchemy/sqlalchemy/blob/rel_1_4/lib/sqlalchemy/orm/session.py#L3930-L3932\n[3]https://review.opendev.org/c/openstack/neutron-lib/+/828738\n[4]https://review.opendev.org/c/openstack/neutron/+/828739\n","commit_id":"a530cbfcf2fadbc1bbd7a85086278100f15abf2e"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"2f31eea7cf26a751a7ce5a79f623572d6057f305","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"2997aca9_85ffbad7","updated":"2022-09-04 07:57:22.000000000","message":"Seems like this is causing widespread failures, see https://review.opendev.org/c/openstack/requirements/+/855153","commit_id":"a530cbfcf2fadbc1bbd7a85086278100f15abf2e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5a6f5bc3443bfefc4b8bc89dd9a31c61be0b2867","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"3aa066ed_3c7ed6b8","updated":"2022-02-08 16:32:04.000000000","message":"This is still failing with neutron\u0027s weirdness","commit_id":"a530cbfcf2fadbc1bbd7a85086278100f15abf2e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cbdcea6192b19c1fe58cac8f258eefcb2e33660a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"103d4556_94cbd561","updated":"2022-05-03 16:17:32.000000000","message":"We may need to wait for a neutron-lib release to actually merge this. Let\u0027s see","commit_id":"a530cbfcf2fadbc1bbd7a85086278100f15abf2e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cb81ece8b59751b8993faf0f3128edd4745d5e53","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"4c931919_851c7523","updated":"2022-07-14 10:25:58.000000000","message":"recheck","commit_id":"a530cbfcf2fadbc1bbd7a85086278100f15abf2e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a66c28181ee3c72e6299efbbc1b8bc208225d974","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"a55e00db_b792053c","updated":"2022-05-03 16:17:06.000000000","message":"recheck","commit_id":"a530cbfcf2fadbc1bbd7a85086278100f15abf2e"},{"author":{"_account_id":11816,"name":"mike_mp@zzzcomputing.com","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"f81edc938ba84ca39136f003f3c8dfab5494363c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"d790533a_63d77142","updated":"2022-05-03 13:36:36.000000000","message":"recheck\n\n\nseems like the downstream has been merged?  ","commit_id":"a530cbfcf2fadbc1bbd7a85086278100f15abf2e"},{"author":{"_account_id":11816,"name":"mike_mp@zzzcomputing.com","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"fbf0765c9d0b012662244c0ce2e36c9daec56948","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"09a5e520_ae08dce8","updated":"2022-05-03 18:29:07.000000000","message":"waht is TIMED OUT, is it deadlocking?  ","commit_id":"a530cbfcf2fadbc1bbd7a85086278100f15abf2e"},{"author":{"_account_id":11816,"name":"mike_mp@zzzcomputing.com","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"18b6a4906c8404e0917e5f4997128f0020bd7593","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"60277206_4b03fe9f","updated":"2022-07-20 14:15:58.000000000","message":"well this is the big one.   so I\u0027m away for a week starting friday, so...if this merges, I will be back in august to deal with whatever it breaks :)","commit_id":"a530cbfcf2fadbc1bbd7a85086278100f15abf2e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c0918df7566d6352579dd5abd8142947d46465d6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"0d32addc_283e995e","in_reply_to":"09a5e520_ae08dce8","updated":"2022-05-04 14:35:37.000000000","message":"TIMED OUT means the job failed to complete in the time specified in a zuul.yaml  file somewhere. Looking at the logs [1], it looks like there are quite a lot of failures. I\u0027ll take a look into the \"why\" now...\n\n[1] https://zuul.opendev.org/t/openstack/build/15d40adda302459aada648087dd768b1/log/job-output.txt","commit_id":"a530cbfcf2fadbc1bbd7a85086278100f15abf2e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"f9020d95635d5b65c23a77ed8e2baf5601918ce8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"52df2fa5_63363d57","in_reply_to":"103d4556_94cbd561","updated":"2022-05-06 08:15:29.000000000","message":"I\u0027m working on this now. I\u0027ll update this patch once Neutron uses it.","commit_id":"a530cbfcf2fadbc1bbd7a85086278100f15abf2e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"8267b0b18fa8142c276bbc02981d3fc16bb3e3d5","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"d81ae633_6fad2573","in_reply_to":"3631040a_863a59fa","updated":"2022-02-10 16:51:55.000000000","message":"Ok, the neutron/neutron-lib patches are not enough. We need to finish/close the transaction in a writer or reader context. How should we proceed? Do you have a document?\n\nThanks in advance.","commit_id":"a530cbfcf2fadbc1bbd7a85086278100f15abf2e"},{"author":{"_account_id":11816,"name":"mike_mp@zzzcomputing.com","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"f48b84633d4adce50fb3e0aa8c294ba83ffb1493","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"8b5debaa_330594a0","in_reply_to":"4c619d70_d4b9c088","updated":"2022-02-12 18:16:42.000000000","message":"correction with code change:\n\n\"that\u0027s also not going to work anymore.  The above code should be changed to:\"\n\n\ns \u003d Session()\nresult \u003d s.query(MyObject).all()\ns.close()\n\n\nnote the objects in \"result\" won\u0027t have lazy-loading capability because the session is closed and the objects are detached.  that\u0027s a good thing because you don\u0027t want ad-hoc transactions starting up in the middle of attribute accesses.","commit_id":"a530cbfcf2fadbc1bbd7a85086278100f15abf2e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"499b6f2d7673e04f1686417dd973e9fb4f3f18ce","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"678775bb_bd8a0446","in_reply_to":"60e3693b_9dbeb376","updated":"2022-02-11 16:13:19.000000000","message":"Thanks a lot for the information. I\u0027ll update Neutron/neutron-lib accordingly.","commit_id":"a530cbfcf2fadbc1bbd7a85086278100f15abf2e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"c31c86744743b5eff941ae3d469a07cca6899ddc","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"c3924d56_0dfadeff","in_reply_to":"678775bb_bd8a0446","updated":"2022-02-11 18:22:50.000000000","message":"Hi Mike: I\u0027m trying to replace the checks we have in neutron/neutron-lib of session.is_active. What we need to know is that the session has no pending commands to be execute, that the transaction has nothing to commit.\n\nWe used this logic to know if we were able or not to execute some actions (usually resource creation: ports, networks, etc). Now with this change we can have a session with a transaction active when before the transaction was not active.\n\nIs there a way to mimic the same logic we had before now with \"__autocommit\u003dFalse\"?","commit_id":"a530cbfcf2fadbc1bbd7a85086278100f15abf2e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"7013cfc5fc05769ca6b67d16b003046c4d15be76","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"b801d88e_ab6010eb","in_reply_to":"8b5debaa_330594a0","updated":"2022-02-23 17:39:29.000000000","message":"Hi Mike, can you review https://review.opendev.org/c/openstack/neutron-lib/+/828738? (and the Neutron patch that depends on)","commit_id":"a530cbfcf2fadbc1bbd7a85086278100f15abf2e"},{"author":{"_account_id":11816,"name":"mike_mp@zzzcomputing.com","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"1812e62d590550f9409f8040844ee505ec7a624e","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"60e3693b_9dbeb376","in_reply_to":"b061e15b_49c90de4","updated":"2022-02-10 17:20:19.000000000","message":"also see clarified documentation for the meaning of \"is_active\": https://docs.sqlalchemy.org/en/14/orm/session_api.html#sqlalchemy.orm.Session.is_active   this attribute is only useful to detect the state where the Session has encountered an error, and will not proceed until .rollback() is called.","commit_id":"a530cbfcf2fadbc1bbd7a85086278100f15abf2e"},{"author":{"_account_id":11816,"name":"mike_mp@zzzcomputing.com","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"90e781ed917609d2cbf6a394b591b2a90c6f4c6b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"40ae4576_8d58e65c","in_reply_to":"b801d88e_ab6010eb","updated":"2022-07-20 14:16:19.000000000","message":"Done","commit_id":"a530cbfcf2fadbc1bbd7a85086278100f15abf2e"},{"author":{"_account_id":11816,"name":"mike_mp@zzzcomputing.com","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"8a66ceaa47c8af9c934f8a4e412a1781a13a3f25","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"ea2be827_fefda114","in_reply_to":"c3924d56_0dfadeff","updated":"2022-02-11 23:30:26.000000000","message":"if session.in_transaction() is False, then there are no pending operations.  as soon as a state change causes a pending operation to be present, in_transaction() is True.  This goes for non-SQL operations, like session.add(), changes on objects, etc.  it should be exactly what you want here (and certainly I was thinking about openstack-like use cases when i wrote this API):\n\ns \u003d Session(e)\n\n# session starts out not in transaction\nassert not s.in_transaction()\n\n# adding objects starts the transaction\nb1 \u003d B()\na1 \u003d A(bs\u003d[b1])\ns.add(a1)\nassert s.in_transaction()\n\n# after commit, again not in transaction\ns.commit()\nassert not s.in_transaction()\n\n# changes on objects starts the transaction\na1.data \u003d \u0027new data\u0027\nassert s.in_transaction()\n\ns.commit()\nassert not s.in_transaction()\n\n\n\nThe only way I can see this not being what you want, is if you want \"pending operations\" to be detected independently of session.begin() already being called.  if that is the case, then you want to look at session.new, session.deleted, session.dirty - if those are all empty, there should again be no pending operations.  but id assume you want to cancel the transaciton in that case - session.close() is the best way to do this without a lot of fanfare, assuming you dont need whatever state is in the session.","commit_id":"a530cbfcf2fadbc1bbd7a85086278100f15abf2e"},{"author":{"_account_id":11816,"name":"mike_mp@zzzcomputing.com","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"3806f146c8ff0249d0664aaa5832ba10e117c74f","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"b061e15b_49c90de4","in_reply_to":"d81ae633_6fad2573","updated":"2022-02-10 17:18:01.000000000","message":"as of SQLAlchemy 1.4, the Session does not \"begin\" the transaction immediately, and instead waits until any kind of SQL is to be emitted.   that\u0027s how it resolves the original use case of \"autocommit\" mode, which was basically that \"the user wants to be able to call the .begin() method\", which you can now do so, if no transaction was begun.\n\nTo test if .begin() has already been called, either explicitly or implicitly due to SQL being emitted, use the \"in_transaction\" accessor, which was added to serve this use case explicitly: https://docs.sqlalchemy.org/en/14/orm/session_api.html#sqlalchemy.orm.Session.in_transaction","commit_id":"a530cbfcf2fadbc1bbd7a85086278100f15abf2e"},{"author":{"_account_id":11816,"name":"mike_mp@zzzcomputing.com","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"97879562d735e5d026c471cdcd25657a60d2ac62","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"4c619d70_d4b9c088","in_reply_to":"ea2be827_fefda114","updated":"2022-02-12 17:58:22.000000000","message":"oh i should clarify, that\u0027s not fully accurate if by \"pending operations\" you want to include state in the server-side transaction that hasn\u0027t been committed to disk yet.  if flushes have already proceeded on the Session, and it\u0027s still in_transaction(), the new/dirty/deleted collections would be clear, even though CRUD statements have been emitted which are not yet committed.  If you wanted to detect the state of previous flushes within the scope of the current transaction, you\u0027d need to look on SessionTransaction itself at some other collections that are more private at the moment, but that still wouldn\u0027t tell you if someone emitted INSERT/UPDATE/DELETE to the database already within the database transaction (including ORM calls like query.update() / query.delete()) - there\u0027s no generalized way in place to know if a particular database transaction already in progress has changes on the database server not committed to disk yet. is_active definitely doesn\u0027t do that (it can be done using event hooks, if thats what were needed).   so not sure what it is you want to do exactly.\n\nSo this is becoming unfamiliar to me as something that was possible with autocommit\u003dTrue mode.   I just re-read the 1.3.x docs for is_active, and this matches my  recollection of it, it\u0027s only going to tell you if someone called begin() or not, either explicitly or implicitly, and if the state is not in \"pending rollback\".  that\u0027s not really affected by \"autocommit\" mode for version 1.4.  Prior to 1.4, if autocommit\u003dFalse, that would cause \"is_active\" to be true all the time because \"begin\" was always called immediately after Session construction and immediately after any previous transaction completed, but in 1.4 this was changed so that the is_transaction() method could be added and be meaningful.\n\nso in 1.4, whether or not you have autocommit\u003dTrue set:\n\ns \u003d Session()\ns.in_transaction()  # -\u003e always False\ns.begin()\ns.in_transaction()  # -\u003e always True\n\n\nThis matches the behavior of is_active for autocommit\u003dTrue.  so I maintain that in 1.4 you should be able to swap out is_active for in_transaction().\n\nhowever, there is still a major behavioral change when you no longer use autocommit\u003dTrue which is that the Session wont...automatically commit!  so if you have code like this\n\ns \u003d Session(autocommit\u003dTrue)\ns.add(MyObject())\ns.flush()\n\n# .. continue on and assume MyObject is persisted\n\nthat\u0027s not going to work anymore.  the above code would be changed to:\n\ns \u003d Session()\ns.add(MyObject())\ns.commit()\n\nSimilarly, any emit of ad-hoc SQL or queries will also start a transaction.  That is, if you have code like this:\n\ns \u003d Session(autocommit\u003dTrue)\nresult \u003d s.query(MyObject).all()\n\n# .. continue on and assume no database transactions are in progress\n\nthat\u0027s also not going to work anymore.  The above code should be changed to:\n\n\ns \u003d Session(autocommit\u003dTrue)\nresult \u003d s.query(MyObject).all()\ns.close()\n\n\nSo to the degree that neutron is somewhere using autocommit\u003dTrue mode in that extremely legacy fashion where a Session is held opened, queries and/or flushes are emitted on it, and commit()/rollback()/close() is not called at all, that has to be changed and for the above use cases, you will see different behavior of in_transaction() because transactions are not automatically closed.\n \n\n\nAnyway here is a list of the kinds of things we can detect, depending on what you want to do:\n\n1. detect if begin() was called, either implicitly or explicitly, or not\n\n2. detect if begin() was called as above, and whether or not an actual database transaction was started, or not.  we can do this   you can look in the SessionTransaction._connections collection for that, I can add public API.\n\n3. detect if begin() was called, and a database transaction was started, and if any flush() calls have proceeded.  again private API I can publicize.\n\n4. detect if begin() was called, and detect if flush() would emit SQL when next called.  use session.new/dirty/deleted, can add more convenience API for that.\n\n5. detect if begin() was called, and whether a database transaction were started, and whether or not any SQL whatsoever were emitted on that transaction, optionally filtering for CRUD only.  This is more challenging and would require an event hook that just logs all the statements and flips on if any INSERT/UPDATE/DELETE goes over the connection.\n\n\nHere\u0027s what we can\u0027t do, unless we tinkered with events and rigged up the Session to act like autocommit, which I advise against:\n\n1. have a Session where you can run any ad-hoc SELECT, flush() or CRUD statements, and the Session is not in a transaction subsequent to that without commit()/rollback()/close() being called.\n\n\nso overall I think we need to understand to what extent \"autocommit\" mode is being used, and if there are true \"autocommit\" use cases in neutron, those have to be fixed first.","commit_id":"a530cbfcf2fadbc1bbd7a85086278100f15abf2e"}]}
