)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4523b3e532d6d8321f6702bbc7f475ab63ef88af","unresolved":true,"context_lines":[{"line_number":13,"context_line":"BDM, raising BDMNotFound. This exception was not handled as a"},{"line_number":14,"context_line":"deletion signal, so it fell through to the generic except Exception"},{"line_number":15,"context_line":"handler, got wrapped as BuildAbortException, and set the instance to"},{"line_number":16,"context_line":"ERROR state instead of allowing a clean exit."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Add exception.BDMNotFound to the exception handling chain alongside"},{"line_number":19,"context_line":"InstanceNotFound and UnexpectedDeletingTaskStateError at four sites"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5ce1cf78_bad77868","line":16,"updated":"2026-07-27 09:33:45.000000000","message":"hm most of our VM state changing operation is guarded against another parallel operation by looking at transient states on the VM like task_state.\n\nI guess delete should work in any VM state, so we cannot block it just because it seems the VM build is still in progress as it maybe blocked for ever and the only way out would be the delete we just blocked.\n\nSo I agree that we need to fix it on the compute side to exit the build cleanly.","commit_id":"4177816d451bffd6ac78bfc7e48f9a46e0c825e0"},{"author":{"_account_id":6476,"name":"Thomas Goirand","email":"thomas@goirand.fr","username":"thomas-goirand"},"change_message_id":"99fb2a10fa2e6b6c204aa5ba9f0dd1b7e172931b","unresolved":false,"context_lines":[{"line_number":13,"context_line":"BDM, raising BDMNotFound. This exception was not handled as a"},{"line_number":14,"context_line":"deletion signal, so it fell through to the generic except Exception"},{"line_number":15,"context_line":"handler, got wrapped as BuildAbortException, and set the instance to"},{"line_number":16,"context_line":"ERROR state instead of allowing a clean exit."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Add exception.BDMNotFound to the exception handling chain alongside"},{"line_number":19,"context_line":"InstanceNotFound and UnexpectedDeletingTaskStateError at four sites"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"c8b94cf4_8489544b","line":16,"in_reply_to":"522e8d22_3aeb6f1f","updated":"2026-10-24 12:19:42.000000000","message":"Done","commit_id":"4177816d451bffd6ac78bfc7e48f9a46e0c825e0"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"8d1173ca42c8f96fab3219b11840bddbb364af09","unresolved":true,"context_lines":[{"line_number":13,"context_line":"BDM, raising BDMNotFound. This exception was not handled as a"},{"line_number":14,"context_line":"deletion signal, so it fell through to the generic except Exception"},{"line_number":15,"context_line":"handler, got wrapped as BuildAbortException, and set the instance to"},{"line_number":16,"context_line":"ERROR state instead of allowing a clean exit."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Add exception.BDMNotFound to the exception handling chain alongside"},{"line_number":19,"context_line":"InstanceNotFound and UnexpectedDeletingTaskStateError at four sites"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"522e8d22_3aeb6f1f","line":16,"in_reply_to":"5ce1cf78_bad77868","updated":"2026-07-27 16:46:20.000000000","message":"Exactly my thought too, delete should always work regardless of state.","commit_id":"4177816d451bffd6ac78bfc7e48f9a46e0c825e0"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"bedf4e9d9f213cf770f1e2f4321e8b420af421fd","unresolved":true,"context_lines":[{"line_number":22,"context_line":"_do_build_and_run_instance. This ensures the build exits cleanly"},{"line_number":23,"context_line":"when a concurrent delete has removed the BDMs."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Add a deterministic reproducer for the race: a new test patches the"},{"line_number":26,"context_line":"BDM DB update to find no row, as if the concurrent API delete had"},{"line_number":27,"context_line":"already cascade-removed it, and asserts the build exits with"},{"line_number":28,"context_line":"build_results.FAILED without setting the instance to ERROR state or"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"44714bde_abc68bf4","line":25,"updated":"2026-11-16 14:06:52.000000000","message":"its genreally better to do that via our 2 commit proces but i gues this is ok","commit_id":"b5cc328e065e1adac855f36eccc45e1bafd833a0"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f0670b08f0ace44afa808cb384bc41db863e7fba","unresolved":false,"context_lines":[{"line_number":22,"context_line":"_do_build_and_run_instance. This ensures the build exits cleanly"},{"line_number":23,"context_line":"when a concurrent delete has removed the BDMs."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Add a deterministic reproducer for the race: a new test patches the"},{"line_number":26,"context_line":"BDM DB update to find no row, as if the concurrent API delete had"},{"line_number":27,"context_line":"already cascade-removed it, and asserts the build exits with"},{"line_number":28,"context_line":"build_results.FAILED without setting the instance to ERROR state or"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"d50ddfda_1f89ac67","line":25,"in_reply_to":"44714bde_abc68bf4","updated":"2026-11-19 18:04:30.000000000","message":"I have added a functional regression test as a patch under this one.","commit_id":"b5cc328e065e1adac855f36eccc45e1bafd833a0"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":6476,"name":"Thomas Goirand","email":"thomas@goirand.fr","username":"thomas-goirand"},"change_message_id":"5f3674065fa210da1910cd83e183876ca8d1e341","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"39e7cff6_49777960","updated":"2026-10-24 12:18:54.000000000","message":"Hi melanie,\n\nI hope you don\u0027t mind, but I went ahead and wrote the test: I\u0027ve pushed a ps2 on top of your fix with a deterministic reproducer for the race. The test patches block_device_mapping_update to return no row (as if the concurrent API delete had already cascade-removed the BDM by the time the build thread saves its stale root BDM) and asserts the build exits with build_results.FAILED, without setting the instance to ERROR state or recording an instance fault. It fails on master and passes with your fix, which I hope addresses the reproducer request.\n\nIf you\u0027d rather finish the test yourself, feel free to drop my patchset, no hard feelings.","commit_id":"4177816d451bffd6ac78bfc7e48f9a46e0c825e0"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4523b3e532d6d8321f6702bbc7f475ab63ef88af","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"d7046ec3_b57a327b","updated":"2026-07-27 09:33:45.000000000","message":"How hard would it be to build a reproducer via mocking some all in the compute to be blocking then issuing the VM delete?\n\nGiven that I feel we have a class of issues behind this it might make sense to have a reproducer that easy to then mutate into other similar cases.","commit_id":"4177816d451bffd6ac78bfc7e48f9a46e0c825e0"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"645de704f528278463dc168096d1078277ddb24f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"3ca9ceae_52386cf5","in_reply_to":"39e7cff6_49777960","updated":"2026-10-27 15:02:01.000000000","message":"Hi, I don\u0027t mind at all, thank you for doing that! And feel free to add yourself as Co-authored-by on the commit message if you like 🙂","commit_id":"4177816d451bffd6ac78bfc7e48f9a46e0c825e0"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"8d1173ca42c8f96fab3219b11840bddbb364af09","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"e8abb103_90bca35a","in_reply_to":"d7046ec3_b57a327b","updated":"2026-07-27 16:46:20.000000000","message":"Not sure but I will try to create one.","commit_id":"4177816d451bffd6ac78bfc7e48f9a46e0c825e0"},{"author":{"_account_id":6476,"name":"Thomas Goirand","email":"thomas@goirand.fr","username":"thomas-goirand"},"change_message_id":"99fb2a10fa2e6b6c204aa5ba9f0dd1b7e172931b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"8057b24d_6e4f4c24","in_reply_to":"e8abb103_90bca35a","updated":"2026-10-24 12:19:42.000000000","message":"Done","commit_id":"4177816d451bffd6ac78bfc7e48f9a46e0c825e0"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d30858ba0b234605d296698a0e177a8c87864a78","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"0c2bb311_5d522449","updated":"2026-11-16 14:52:07.000000000","message":"I\u0027m fine with this. Lets fix Sean\u0027s comments then land thios","commit_id":"b5cc328e065e1adac855f36eccc45e1bafd833a0"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"bedf4e9d9f213cf770f1e2f4321e8b420af421fd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"9430492d_20aeb71c","updated":"2026-11-16 14:06:52.000000000","message":"i feel like this shoudl be a functionla test not a unit test but overall the fix looks valid","commit_id":"b5cc328e065e1adac855f36eccc45e1bafd833a0"}],"nova/compute/manager.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4523b3e532d6d8321f6702bbc7f475ab63ef88af","unresolved":true,"context_lines":[{"line_number":2591,"context_line":"            return build_results.RESCHEDULED"},{"line_number":2592,"context_line":"        except (exception.InstanceNotFound,"},{"line_number":2593,"context_line":"                exception.UnexpectedDeletingTaskStateError,"},{"line_number":2594,"context_line":"                exception.BDMNotFound):"},{"line_number":2595,"context_line":"            msg \u003d \u0027Instance disappeared during build.\u0027"},{"line_number":2596,"context_line":"            LOG.debug(msg, instance\u003dinstance)"},{"line_number":2597,"context_line":"            self._cleanup_allocated_networks(context, instance,"}],"source_content_type":"text/x-python","patch_set":1,"id":"328f5ff5_bdbad6d8","line":2594,"updated":"2026-07-27 09:33:45.000000000","message":"yepp if InstanceNotFound can happen then BDMNotFound can happen too. Wondering that we now see this more due to native threading. If so the I expect this is a class of errors. E.g. it might also happen with ShareMappings or any other DB content we cascade delete from the API.","commit_id":"4177816d451bffd6ac78bfc7e48f9a46e0c825e0"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"8d1173ca42c8f96fab3219b11840bddbb364af09","unresolved":true,"context_lines":[{"line_number":2591,"context_line":"            return build_results.RESCHEDULED"},{"line_number":2592,"context_line":"        except (exception.InstanceNotFound,"},{"line_number":2593,"context_line":"                exception.UnexpectedDeletingTaskStateError,"},{"line_number":2594,"context_line":"                exception.BDMNotFound):"},{"line_number":2595,"context_line":"            msg \u003d \u0027Instance disappeared during build.\u0027"},{"line_number":2596,"context_line":"            LOG.debug(msg, instance\u003dinstance)"},{"line_number":2597,"context_line":"            self._cleanup_allocated_networks(context, instance,"}],"source_content_type":"text/x-python","patch_set":1,"id":"4a50b992_24317ac9","line":2594,"in_reply_to":"328f5ff5_bdbad6d8","updated":"2026-07-27 16:46:20.000000000","message":"I think this is the case, that these class of errors and other races are being surfaced now due to native threading. I think the old eventlet provided quite a bit more \"synchronization\" as switches were much more limited where they could happen.","commit_id":"4177816d451bffd6ac78bfc7e48f9a46e0c825e0"},{"author":{"_account_id":6476,"name":"Thomas Goirand","email":"thomas@goirand.fr","username":"thomas-goirand"},"change_message_id":"99fb2a10fa2e6b6c204aa5ba9f0dd1b7e172931b","unresolved":false,"context_lines":[{"line_number":2591,"context_line":"            return build_results.RESCHEDULED"},{"line_number":2592,"context_line":"        except (exception.InstanceNotFound,"},{"line_number":2593,"context_line":"                exception.UnexpectedDeletingTaskStateError,"},{"line_number":2594,"context_line":"                exception.BDMNotFound):"},{"line_number":2595,"context_line":"            msg \u003d \u0027Instance disappeared during build.\u0027"},{"line_number":2596,"context_line":"            LOG.debug(msg, instance\u003dinstance)"},{"line_number":2597,"context_line":"            self._cleanup_allocated_networks(context, instance,"}],"source_content_type":"text/x-python","patch_set":1,"id":"422c4192_66702142","line":2594,"in_reply_to":"4a50b992_24317ac9","updated":"2026-10-24 12:19:42.000000000","message":"Done","commit_id":"4177816d451bffd6ac78bfc7e48f9a46e0c825e0"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"bedf4e9d9f213cf770f1e2f4321e8b420af421fd","unresolved":true,"context_lines":[{"line_number":11134,"context_line":"        self._test_build_and_run_exceptions(exception.InstanceNotFound("},{"line_number":11135,"context_line":"            instance_id\u003d\u0027\u0027))"},{"line_number":11136,"context_line":""},{"line_number":11137,"context_line":"    def test_build_and_run_bdm_not_found_exception(self):"},{"line_number":11138,"context_line":"        self._test_build_and_run_exceptions("},{"line_number":11139,"context_line":"            exception.BDMNotFound(id\u003d1))"},{"line_number":11140,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7e84cde5_f771d798","line":11137,"updated":"2026-11-16 14:06:52.000000000","message":"this is the type of failure i woudl expect to be repoduced in a funcitonal test not a unit test to aovid the heavy mockign required below.\n\nideally using a threading event to pause in the race windwow","commit_id":"b5cc328e065e1adac855f36eccc45e1bafd833a0"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f0670b08f0ace44afa808cb384bc41db863e7fba","unresolved":false,"context_lines":[{"line_number":11134,"context_line":"        self._test_build_and_run_exceptions(exception.InstanceNotFound("},{"line_number":11135,"context_line":"            instance_id\u003d\u0027\u0027))"},{"line_number":11136,"context_line":""},{"line_number":11137,"context_line":"    def test_build_and_run_bdm_not_found_exception(self):"},{"line_number":11138,"context_line":"        self._test_build_and_run_exceptions("},{"line_number":11139,"context_line":"            exception.BDMNotFound(id\u003d1))"},{"line_number":11140,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"d7ecc026_7376cbcf","line":11137,"in_reply_to":"7e84cde5_f771d798","updated":"2026-11-19 18:04:30.000000000","message":"Done","commit_id":"b5cc328e065e1adac855f36eccc45e1bafd833a0"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"bedf4e9d9f213cf770f1e2f4321e8b420af421fd","unresolved":true,"context_lines":[{"line_number":11204,"context_line":"                block_device_mapping\u003dbdms, node\u003dself.node,"},{"line_number":11205,"context_line":"                limits\u003dself.limits, host_list\u003dfake_host_list)"},{"line_number":11206,"context_line":""},{"line_number":11207,"context_line":"        # the delete won: the build exited cleanly, without setting the"},{"line_number":11208,"context_line":"        # instance to ERROR state or recording a fault"},{"line_number":11209,"context_line":"        mock_err.assert_not_called()"},{"line_number":11210,"context_line":"        mock_add.assert_not_called()"},{"line_number":11211,"context_line":"        mock_clean.assert_called_once_with(self.context, self.instance,"},{"line_number":11212,"context_line":"                self.requested_networks)"},{"line_number":11213,"context_line":""},{"line_number":11214,"context_line":"    def test_build_and_run_unexpecteddeleting_exception(self):"},{"line_number":11215,"context_line":"        self._test_build_and_run_exceptions("}],"source_content_type":"text/x-python","patch_set":2,"id":"ae8144fe_dd7b4f05","line":11212,"range":{"start_line":11207,"start_character":5,"end_line":11212,"end_character":40},"updated":"2026-11-16 14:06:52.000000000","message":"nit: so your not acttuly using mock_save or asserting that we never saved the instance in error state.\n\nyou are asserting that we dont call _set_instance_obj_error_state which i guess works\n\nbut do you actully need     @mock.patch.object(objects.Instance, \u0027save\u0027)\n\nperhpas it shoudl be \n\n@mock.patch.object(objects.Instance, \u0027save\u0027 new\u003dmock.Mock())\nand remove it form the parmter list if its never used \n\nthe same appleise to mock_build_net, mock_clean_net_prep and mock_claim\n\nall 4 are being mocked but never asserted or assgiend a return value\nwhich means we do nto need ot pass them as parmters to the fucniton and instead can just use the new sysnteax to have the mocks excist but not passed in which makes it a bit clearner.","commit_id":"b5cc328e065e1adac855f36eccc45e1bafd833a0"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f0670b08f0ace44afa808cb384bc41db863e7fba","unresolved":false,"context_lines":[{"line_number":11204,"context_line":"                block_device_mapping\u003dbdms, node\u003dself.node,"},{"line_number":11205,"context_line":"                limits\u003dself.limits, host_list\u003dfake_host_list)"},{"line_number":11206,"context_line":""},{"line_number":11207,"context_line":"        # the delete won: the build exited cleanly, without setting the"},{"line_number":11208,"context_line":"        # instance to ERROR state or recording a fault"},{"line_number":11209,"context_line":"        mock_err.assert_not_called()"},{"line_number":11210,"context_line":"        mock_add.assert_not_called()"},{"line_number":11211,"context_line":"        mock_clean.assert_called_once_with(self.context, self.instance,"},{"line_number":11212,"context_line":"                self.requested_networks)"},{"line_number":11213,"context_line":""},{"line_number":11214,"context_line":"    def test_build_and_run_unexpecteddeleting_exception(self):"},{"line_number":11215,"context_line":"        self._test_build_and_run_exceptions("}],"source_content_type":"text/x-python","patch_set":2,"id":"9b177e6d_68301e22","line":11212,"range":{"start_line":11207,"start_character":5,"end_line":11212,"end_character":40},"in_reply_to":"ae8144fe_dd7b4f05","updated":"2026-11-19 18:04:30.000000000","message":"This has been replaced with a functional test.","commit_id":"b5cc328e065e1adac855f36eccc45e1bafd833a0"}]}
