)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":35153,"name":"Ashish Gupta","email":"ashigupt@redhat.com","username":"ashigupt","status":"Redhat"},"change_message_id":"7f102d7703c5ae22dc75528a92b8a37364540239","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"608ac5ba_72233207","updated":"2026-06-11 11:24:44.000000000","message":"recheck","commit_id":"cf13f363e464baa1b48b6a97c1afb18468cdbd68"},{"author":{"_account_id":35153,"name":"Ashish Gupta","email":"ashigupt@redhat.com","username":"ashigupt","status":"Redhat"},"change_message_id":"61cc51df38c59d52763e35e025d5f6a3afb65b76","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"b728c55e_7890594f","updated":"2026-06-11 11:11:26.000000000","message":"recheck","commit_id":"cf13f363e464baa1b48b6a97c1afb18468cdbd68"}],"nova/tests/fixtures/nova.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"971bcf7828fd3c7144d7bafa34aec50d79b28f1e","unresolved":true,"context_lines":[{"line_number":427,"context_line":"        return ctxt"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"_DB_WRITE_LOCKS \u003d {}"},{"line_number":431,"context_line":"_DB_WRITE_LOCKS_GUARD \u003d threading.Lock()"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"def _db_write_lock_for(transaction_context_manager):"}],"source_content_type":"text/x-python","patch_set":1,"id":"68f1f2ae_360bfae1","line":431,"range":{"start_line":430,"start_character":0,"end_line":431,"end_character":40},"updated":"2026-06-11 13:23:59.000000000","message":"These does not need to be global, but can be part of DatabaseWriteLock along with the _db_write_lock_for function. There can only one instance of DatabaseWriteLock effectively anyhow as that fixture replaces the enginefacade._TransactionContextManager._transaction_scope function globally at setup.","commit_id":"cf13f363e464baa1b48b6a97c1afb18468cdbd68"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"971bcf7828fd3c7144d7bafa34aec50d79b28f1e","unresolved":true,"context_lines":[{"line_number":439,"context_line":"    \"\"\""},{"line_number":440,"context_line":"    root \u003d transaction_context_manager._root"},{"line_number":441,"context_line":"    with _DB_WRITE_LOCKS_GUARD:"},{"line_number":442,"context_line":"        lock \u003d _DB_WRITE_LOCKS.get(root)"},{"line_number":443,"context_line":"        if lock is None:"},{"line_number":444,"context_line":"            lock \u003d threading.RLock()"},{"line_number":445,"context_line":"            _DB_WRITE_LOCKS[root] \u003d lock"},{"line_number":446,"context_line":"        return lock"},{"line_number":447,"context_line":""},{"line_number":448,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"c300b595_ab97e927","line":445,"range":{"start_line":442,"start_character":0,"end_line":445,"end_character":40},"updated":"2026-06-11 13:23:59.000000000","message":"This is basically what a defaultdict is for. A defaultdict can be defined to create a value when a key is accessed the first time. \nhttps://docs.python.org/3/library/collections.html#collections.defaultdict\n\nI suggest you to look through all the generic collections in this module as knowing them is pretty useful in my cases.","commit_id":"cf13f363e464baa1b48b6a97c1afb18468cdbd68"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"38553b7f74cb7cd14a937026e1189f0d65880fb8","unresolved":true,"context_lines":[{"line_number":467,"context_line":"        @contextmanager"},{"line_number":468,"context_line":"        def _locked_scope(tcm_self, context):"},{"line_number":469,"context_line":"            if tcm_self._mode is enginefacade._WRITER:"},{"line_number":470,"context_line":"                with _db_write_lock_for(tcm_self):"},{"line_number":471,"context_line":"                    with original(tcm_self, context) as resource:"},{"line_number":472,"context_line":"                        yield resource"},{"line_number":473,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"214d99e3_4aed82c1","line":470,"updated":"2026-06-11 13:47:02.000000000","message":"OK I think I see some problem with the Placement DB url. Still with this patch I see placement code opening DB connection to the in memory sqlite DB.\n\nYou can see if you add this check here to check for the DB url and raise like:\n```\n            if str(tcm_self.reader.get_engine().url) \u003d\u003d \u0027sqlite://\u0027:\n                raise RuntimeError(\"Still using in memory sqlite\")\n```\n\n\nI see tracebacks about placement like:\n```\n2026-06-11 15:41:33,884 ERROR [placement.fault_wrap] Placement API unexpected error: Still using in memory sqlite\nTraceback (most recent call last):\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/placement/fault_wrap.py\", line 39, in __call__\n    return self.application(environ, start_response)\n           ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/webob/dec.py\", line 129, in __call__\n    resp \u003d self.call_func(req, *args, **kw)\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/webob/dec.py\", line 193, in call_func\n    return self.func(req, *args, **kwargs)\n           ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/microversion_parse/middleware.py\", line 105, in __call__\n    response \u003d req.get_response(sel\n    f.application)\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/webob/request.py\", line 1313, in send\n    status, headers, app_iter \u003d self.call_application(\n                                ~~~~~~~~~~~~~~~~~~~~~^\n        application, catch_exc_info\u003dFalse)\n        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/webob/request.py\", line 1278, in call_application\n    app_iter \u003d application(self.environ, start_response)\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/placement/handler.py\", line 215, in __call__\n    return dispatch(environ, start_response, self._map)\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/placement/handler.py\", line 149, in dispatch\n    return handler(environ, start_response)\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/webob/dec.py\", line 129, in __call__\n    resp \u003d self.call_func(req, *args, **kw)\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/placement/wsgi_wrapper.py\", line 29, in call_func\n    super(PlacementWsgify, self).call_func(req, *args, **kwargs)\n    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/webob/dec.py\", line 193, in call_func\n    return self.func(req, *args, **kwargs)\n           ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/placement/util.py\", line 64, in decorated_function\n    return f(req)\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/placement/handlers/resource_provider.py\", line 253, in list_resource_providers\n    resource_providers \u003d rp_obj.get_all_by_filters(context, filters)\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/placement/objects/resource_provider.py\", line 1046, in get_all_by_filters\n    resource_providers \u003d _get_all_by_filters_from_db(context, filters)\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/oslo_db/sqlalchemy/enginefacade.py\", line 1158, in wrapper\n    with self._transaction_scope(context):\n         ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^\n  File \"/usr/lib/python3.13/contextlib.py\", line 141, in __enter__\n    return next(self.gen)\n  File \"/home/gibi/upstream/git/openstack/nova/nova/tests/fixtures/nova.py\", line 471, in _locked_scope\n    raise RuntimeError(\"Still using in memory sqlite\")\nRuntimeError: Still using in memory sqlite\n2026-06-11 15:41:33,885 INFO [placement.requestlog] 127.0.0.1 \"GET /placement/resource_providers?in_tree\u003da060d79e-db7c-43b6-88aa-d72a4905bf16\" status: 500 len: 252 microversion: 1.14\n```\n\nYou shoudl check if you URL override is properly reaching placement here:\n* https://github.com/openstack/placement/blob/3cba66c70ce49e31e582c8d03e945017f38fcf11/placement/tests/fixtures.py#L43-L45\n* https://github.com/openstack/placement/blob/3cba66c70ce49e31e582c8d03e945017f38fcf11/placement/tests/fixtures.py#L54-L64\n\nAs far as I understand this is the two place we actually touching the DB infarstructure of placement from the functional test.","commit_id":"cf13f363e464baa1b48b6a97c1afb18468cdbd68"}]}
