)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4d4810b41c89d8b68c5e39c62deec0067c03e725","unresolved":true,"context_lines":[{"line_number":19,"context_line":"all pCPUs as free and assigns ones already in use, leading to duplicate"},{"line_number":20,"context_line":"pCPU assignments."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Add _instance_is_evacuating() helper that detects in-progress"},{"line_number":23,"context_line":"evacuations by checking migration_type \u003d\u003d \u0027evacuation\u0027 and"},{"line_number":24,"context_line":"instance.host !\u003d migration.dest_compute. Add it as a third condition"},{"line_number":25,"context_line":"in the skip check so evacuation migrations are properly tracked."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1349d8b6_c747afad","line":22,"updated":"2026-08-19 14:23:10.000000000","message":"I think this is a partial fix. I feel we should not clear the task state until we set the instance.host. If we cannot do that in a single transation then the order should be\n1. set instance.host\n2. reset instance.task_state to None to signal that evac finished","commit_id":"e30c5cbc999e2beaa06c5b55e96a605ef78a9f13"},{"author":{"_account_id":16207,"name":"ribaudr","display_name":"uggla","email":"rene.ribaud@gmail.com","username":"uggla","status":"Red Hat"},"change_message_id":"06625260a03e2ac49b6c112d62be0916b0951518","unresolved":true,"context_lines":[{"line_number":19,"context_line":"all pCPUs as free and assigns ones already in use, leading to duplicate"},{"line_number":20,"context_line":"pCPU assignments."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Add _instance_is_evacuating() helper that detects in-progress"},{"line_number":23,"context_line":"evacuations by checking migration_type \u003d\u003d \u0027evacuation\u0027 and"},{"line_number":24,"context_line":"instance.host !\u003d migration.dest_compute. Add it as a third condition"},{"line_number":25,"context_line":"in the skip check so evacuation migrations are properly tracked."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"d083b59d_506fa3b0","line":22,"in_reply_to":"1349d8b6_c747afad","updated":"2026-09-04 13:16:25.000000000","message":"Hum partially fixed, the patch now has two parts:\n- in the compute manager, _update_instance_after_spawn keeps ask_state\u003dREBUILD_SPAWNING during evacuate, and finish_evacuation atomically sets instance.host and clears task_state in a single instance.save() under COMPUTE_RESOURCE_SEMAPHORE.\n- in the RT, I think _instance_is_evacuating is still needed because even with task_state kept non-None, if the periodic wins the semaphore before finish_evacuation, the instance has host\u003dsource and REBUILD_SPAWNING falls through both _instance_in_resize_state and instance_is_live_migrating.","commit_id":"e30c5cbc999e2beaa06c5b55e96a605ef78a9f13"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"00a9042e8a8ad7aa7ff02037955bc38cc83e77eb","unresolved":true,"context_lines":[{"line_number":9,"context_line":"During an evacuation, multiple race windows allow the ResourceTracker\u0027s"},{"line_number":10,"context_line":"periodic task or other API actions to corrupt instance state. This"},{"line_number":11,"context_line":"patch combines fixes for bug 2162835 (CPU pinning reset) and partially"},{"line_number":12,"context_line":"addresses bug 2165780 (sequential evacuations conflicting) by closing"},{"line_number":13,"context_line":"the task_state gap."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The approach is based on Gibi\u0027s analysis that both bugs share a common"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"06270249_799ae63e","line":12,"updated":"2026-09-28 15:14:14.000000000","message":"that feels like the incorrect bug","commit_id":"6a0d7ee3595ef56ba0783ba1332700b68b33310f"},{"author":{"_account_id":16207,"name":"ribaudr","display_name":"uggla","email":"rene.ribaud@gmail.com","username":"uggla","status":"Red Hat"},"change_message_id":"92093aa4adc96e5a617310d6027cd8f5d743c6a4","unresolved":false,"context_lines":[{"line_number":9,"context_line":"During an evacuation, multiple race windows allow the ResourceTracker\u0027s"},{"line_number":10,"context_line":"periodic task or other API actions to corrupt instance state. This"},{"line_number":11,"context_line":"patch combines fixes for bug 2162835 (CPU pinning reset) and partially"},{"line_number":12,"context_line":"addresses bug 2165780 (sequential evacuations conflicting) by closing"},{"line_number":13,"context_line":"the task_state gap."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The approach is based on Gibi\u0027s analysis that both bugs share a common"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ce5a67ca_49cf6760","line":12,"in_reply_to":"06270249_799ae63e","updated":"2026-10-06 09:28:03.000000000","message":"Done","commit_id":"6a0d7ee3595ef56ba0783ba1332700b68b33310f"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"23eb8aa603ea67b359a713869513ae03e82d4bc2","unresolved":false,"context_lines":[{"line_number":24,"context_line":"   from _do_rebuild_instance to rebuild_instance, after"},{"line_number":25,"context_line":"   finish_evacuation has set instance.host. This ensures the instance"},{"line_number":26,"context_line":"   is never visible with task_state\u003dNone while host still points to"},{"line_number":27,"context_line":"   the dead source, preventing other API actions from racing."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"2. Track evacuations in the ResourceTracker:"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"62aff878_1d76375d","line":27,"updated":"2026-09-28 09:58:16.000000000","message":"+1","commit_id":"6a0d7ee3595ef56ba0783ba1332700b68b33310f"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"00a9042e8a8ad7aa7ff02037955bc38cc83e77eb","unresolved":true,"context_lines":[{"line_number":42,"context_line":"2027.1 PTG."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Closes-Bug: #2162835"},{"line_number":45,"context_line":"Related-Bug: #2165780"},{"line_number":46,"context_line":"Assisted-By: Claude-Code opus 4.6"},{"line_number":47,"context_line":"Change-Id: Ia11e7778b6a18ccc63dd74dc8fe54d41f2284bd6"},{"line_number":48,"context_line":"Signed-off-by: René Ribaud \u003crene.ribaud@gmail.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"80e17dc9_7ec5c414","line":45,"updated":"2026-09-28 15:14:14.000000000","message":"this is not the right bug number, the correct one is launchpad.net/bugs/2166474 I think.","commit_id":"6a0d7ee3595ef56ba0783ba1332700b68b33310f"},{"author":{"_account_id":16207,"name":"ribaudr","display_name":"uggla","email":"rene.ribaud@gmail.com","username":"uggla","status":"Red Hat"},"change_message_id":"92093aa4adc96e5a617310d6027cd8f5d743c6a4","unresolved":false,"context_lines":[{"line_number":42,"context_line":"2027.1 PTG."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Closes-Bug: #2162835"},{"line_number":45,"context_line":"Related-Bug: #2165780"},{"line_number":46,"context_line":"Assisted-By: Claude-Code opus 4.6"},{"line_number":47,"context_line":"Change-Id: Ia11e7778b6a18ccc63dd74dc8fe54d41f2284bd6"},{"line_number":48,"context_line":"Signed-off-by: René Ribaud \u003crene.ribaud@gmail.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"2db31fc9_1c2d8ce6","line":45,"in_reply_to":"80e17dc9_7ec5c414","updated":"2026-10-06 09:28:03.000000000","message":"Done","commit_id":"6a0d7ee3595ef56ba0783ba1332700b68b33310f"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e80fb3eca3a27f6821407e80d31ac548c38dce6a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"82aba964_d77e2a04","updated":"2026-09-09 14:56:21.000000000","message":"sorry for keep changing the scope but I still believe that the race window is wider.","commit_id":"f789232fb1b0ad4b3f30873e7dc61c6953b74e0d"},{"author":{"_account_id":16207,"name":"ribaudr","display_name":"uggla","email":"rene.ribaud@gmail.com","username":"uggla","status":"Red Hat"},"change_message_id":"a7d1c66585ef731e9ea0e99ee5856bc3667eaed9","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":4,"id":"b110e08d_3959982d","updated":"2026-09-16 16:08:09.000000000","message":"@gibizer@gmail.com Patchset 4 is the combination of your patch and mine.\nI must admit that Claude helped me a lot at the initial version of this patch.\nThen I spent time refining it more or less manually. I think that\u0027s currently not bad, but I could have miss something because it is not so simple.\n\nRegarding testing, I had to change 2 unit tests due to \"REBUILDING\" status.\nBut the functional ones were not changed and they all passed locally.","commit_id":"6a0d7ee3595ef56ba0783ba1332700b68b33310f"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"23eb8aa603ea67b359a713869513ae03e82d4bc2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"4cb087b1_927596ae","updated":"2026-09-28 09:58:16.000000000","message":"@rene.ribaud@gmail.com Thanks for pulling in my extended fix for the task_state / instance.host issue. I think we can simplify the resulting code change a bit. Otherwise the logic looks good to me. I will have to look back for the test coverage later.","commit_id":"6a0d7ee3595ef56ba0783ba1332700b68b33310f"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"dbf54262e172f4cd73296abc9381201717f9952b","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":4,"id":"2149bb0c_0af11959","updated":"2026-09-28 16:02:49.000000000","message":"when you respin, could you please cherry-pick the https://review.opendev.org/c/openstack/nova/+/1007750 into the series before the fix and then make sure it is modified in this fix patch to show that the task_state part of the bug is also fixed?","commit_id":"6a0d7ee3595ef56ba0783ba1332700b68b33310f"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6116cf38e85032aaec075856579998838ffdce44","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":4,"id":"253b2e71_86d88d19","in_reply_to":"2149bb0c_0af11959","updated":"2026-09-28 16:28:05.000000000","message":"this is the adaptation of the new reproducer to the fix showing that nova is correctly keeping the task_state and rejecting an overlapping reboot.\n\n```\ndiff --git a/nova/tests/functional/regressions/test_bug_2162835.py b/nova/tests/functional/regressions/test_bug_2162835.py\nindex dfbd04e4a1..b5723a25eb 100644\n--- a/nova/tests/functional/regressions/test_bug_2162835.py\n+++ b/nova/tests/functional/regressions/test_bug_2162835.py\n@@ -175,9 +175,8 @@ class TestEvacuateTaskStateRace(base.ServersTestBase):\n     3. server evacuation requested and let it just before finish_evacuation\n        on the destination. At this point the task_state is None and the\n        instance.host is still pointing to the \u0027sorce\u0027 host.\n-    4. sends a reboot request to the server that is accepted\n-    5. let evuaction finishes and observer that the server is in an\n-       inconsistent state.\n+    4. sends a reboot request to the server that is now rejected properly\n+       and does not interfere with the ongoing evacuation.\n     \"\"\"\n \n     ADMIN_API \u003d True\n@@ -248,29 +247,26 @@ class TestEvacuateTaskStateRace(base.ServersTestBase):\n \n     def test_reboot_during_evacuation(self):\n         server, proceed, finished \u003d self._create_evac_and_stop_before_finish()\n-        # NOTE(gibi): we cannot user self._reboot_server() as it waits for the\n-        # reboot.end notification which also missing as this reboot never\n-        # finishes.\n+\n+        # The API now rejectes the reboot properly\n         self.api.api_post(\n             \"/servers/%s/action\" % server[\"id\"],\n             {\"reboot\": {\"type\": \"HARD\"}},\n-            check_response_status\u003d[202],\n+            check_response_status\u003d[409],\n         )\n \n-        # The API accepts the reboot and sends its RPC to\n-        # the dead source, leaving the evacuated guest stuck rebooting_hard.\n-        # This is part of bug 2162835 and 2166474 as well.\n         server \u003d self.api.get_server(server[\"id\"])\n         self._wait_for_server_parameter(\n             server,\n             {\n                 \"OS-EXT-SRV-ATTR:host\": \"source\",\n-                \"OS-EXT-STS:task_state\": \"rebooting_hard\",\n-                \"status\": \"SHUTOFF\",\n+                \"OS-EXT-STS:task_state\": \"rebuilding\",\n+                \"status\": \"REBUILD\",\n             })\n         self._wait_for_migration_status(server, [\"pre-migrating\"])\n \n-        # This allows the evacuation to finish but the reboot is still stuck\n+        # This allows the evacuation to finish and the reboot is not\n+        # interfering with it\n         proceed.set()\n         finished.wait(timeout\u003d60)\n         self.assertTrue(finished.is_set(), \"Evacuation did not finish\")\n@@ -279,7 +275,7 @@ class TestEvacuateTaskStateRace(base.ServersTestBase):\n             server,\n             {\n                 \"OS-EXT-SRV-ATTR:host\": \"dest\",\n-                \"OS-EXT-STS:task_state\": \"rebooting_hard\",\n+                \"OS-EXT-STS:task_state\": None,\n                 \"status\": \"SHUTOFF\",\n             })\n \n@@ -289,29 +285,25 @@ class TestEvacuateTaskStateRace(base.ServersTestBase):\n         self.api.microversion \u003d \"2.94\"\n         server, proceed, finished \u003d self._create_evac_and_stop_before_finish()\n \n-        # NOTE(gibi): we cannot user self._reboot_server() as it waits for the\n-        # reboot.end notification which also missing as this reboot never\n-        # finishes.\n+        # The API now rejectes the reboot properly\n         self.api.api_post(\n             \"/servers/%s/action\" % server[\"id\"],\n             {\"reboot\": {\"type\": \"HARD\"}},\n-            check_response_status\u003d[202],\n+            check_response_status\u003d[409],\n         )\n \n-        # The API accepts the reboot and sends its RPC to\n-        # the dead source, leaving the evacuated guest stuck rebooting_hard.\n-        # This is part of bug 2162835 and 2166474 as well.\n         server \u003d self.api.get_server(server[\"id\"])\n         self._wait_for_server_parameter(\n             server,\n             {\n                 \"OS-EXT-SRV-ATTR:host\": \"source\",\n-                \"OS-EXT-STS:task_state\": \"rebooting_hard\",\n-                \"status\": \"HARD_REBOOT\",\n+                \"OS-EXT-STS:task_state\": \"rebuilding\",\n+                \"status\": \"REBUILD\",\n             })\n         self._wait_for_migration_status(server, [\"pre-migrating\"])\n \n-        # This allows the evacuation to finish but the reboot is still stuck\n+        # This allows the evacuation to finish and the reboot is not\n+        # interfering with it\n         proceed.set()\n         finished.wait(timeout\u003d60)\n         self.assertTrue(finished.is_set(), \"Evacuation did not finish\")\n@@ -320,6 +312,6 @@ class TestEvacuateTaskStateRace(base.ServersTestBase):\n             server,\n             {\n                 \"OS-EXT-SRV-ATTR:host\": \"dest\",\n-                \"OS-EXT-STS:task_state\": \"rebooting_hard\",\n-                \"status\": \"HARD_REBOOT\",\n+                \"OS-EXT-STS:task_state\": None,\n+                \"status\": \"ACTIVE\",\n             })\n```","commit_id":"6a0d7ee3595ef56ba0783ba1332700b68b33310f"},{"author":{"_account_id":16207,"name":"ribaudr","display_name":"uggla","email":"rene.ribaud@gmail.com","username":"uggla","status":"Red Hat"},"change_message_id":"92093aa4adc96e5a617310d6027cd8f5d743c6a4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"67d9db5b_0d001878","in_reply_to":"253b2e71_86d88d19","updated":"2026-10-06 09:28:03.000000000","message":"Done","commit_id":"6a0d7ee3595ef56ba0783ba1332700b68b33310f"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"26257e27dc01666223fb8be06ef1951d17451687","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"015a4c5b_e5ae8280","updated":"2026-10-06 14:00:13.000000000","message":"Awesome! Thanks @rene.ribaud@gmail.com.","commit_id":"88a6bd6c2d9e048bcb9ef8b0004e1490a5098eaa"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"ae01c4b6575e44283f3242bb0de550f23a92a3a9","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":5,"id":"a319cd33_8c9bdd18","updated":"2026-10-28 02:16:44.000000000","message":"this is good fix, though I was(actually am) wondering why we did not consider evacuate as in-incoming migration since starting? if it was miss then fine but wondering if any rational behind not considering it in resource tracking. @gibizer@gmail.com if you remember/knows it? otherwise never mind as it fixes the things now.","commit_id":"88a6bd6c2d9e048bcb9ef8b0004e1490a5098eaa"}],"nova/compute/manager.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e80fb3eca3a27f6821407e80d31ac548c38dce6a","unresolved":true,"context_lines":[{"line_number":4293,"context_line":"            self._update_instance_after_spawn("},{"line_number":4294,"context_line":"                instance, task_state\u003dtask_states.REBUILD_SPAWNING)"},{"line_number":4295,"context_line":"        else:"},{"line_number":4296,"context_line":"            self._update_instance_after_spawn(instance)"},{"line_number":4297,"context_line":"        instance.save(expected_task_state\u003d[task_states.REBUILD_SPAWNING])"},{"line_number":4298,"context_line":""},{"line_number":4299,"context_line":"        if orig_vm_state \u003d\u003d vm_states.STOPPED:"}],"source_content_type":"text/x-python","patch_set":3,"id":"86955b78_d82e44c9","line":4296,"updated":"2026-09-09 14:56:21.000000000","message":"probably we are chasing a similar race window here and in my WIP \nhttps://review.opendev.org/c/openstack/nova/+/1003994/1/nova/compute/manager.py#4281\n\nI don\u0027t yet know how to merge the two to fixing the window in a forward looking way.\n\nI guess both of us figured that setting task_state to None here is a problem. And both patch basically extends the non-None task_state to a longer scope (you use REBUILD_SPAWNING, I using REBUILD but that is probably a minor difference)\n\nBut my patch went one step further and move the next section that stopping the instance to happen *after* the instance.host is set in finish_evacuation() to avoid the stop_instance call resetting the task_state before the instance.host is actually set.\n\nBut my https://review.opendev.org/c/openstack/nova/+/1003994 is not landable as is as it also targets the other race in the nova-api about parallel evacs that is controversial for other reasons.\n\nMaybe a way forward is to break apart my patch as it is indeed two separate patch stacked to solve the bigger problem, but the first step, the fix in the compute/manager is valid on its own and probably fixing your bug as well. And it is slightly better than what you propose here as it ensure that the instance.host is set and the the task_state is re-set to None. \n\nThink about it and if you have time and motivation feel free to take half of my patch and pull into this fix. (ignore the compute.api.evacuate change as that is controversial as we discussed on the Monday IRC meeting)","commit_id":"f789232fb1b0ad4b3f30873e7dc61c6953b74e0d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"26257e27dc01666223fb8be06ef1951d17451687","unresolved":false,"context_lines":[{"line_number":4293,"context_line":"            self._update_instance_after_spawn("},{"line_number":4294,"context_line":"                instance, task_state\u003dtask_states.REBUILD_SPAWNING)"},{"line_number":4295,"context_line":"        else:"},{"line_number":4296,"context_line":"            self._update_instance_after_spawn(instance)"},{"line_number":4297,"context_line":"        instance.save(expected_task_state\u003d[task_states.REBUILD_SPAWNING])"},{"line_number":4298,"context_line":""},{"line_number":4299,"context_line":"        if orig_vm_state \u003d\u003d vm_states.STOPPED:"}],"source_content_type":"text/x-python","patch_set":3,"id":"c3515ccb_6ec8de76","line":4296,"in_reply_to":"86955b78_d82e44c9","updated":"2026-10-06 14:00:13.000000000","message":"Done","commit_id":"f789232fb1b0ad4b3f30873e7dc61c6953b74e0d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e80fb3eca3a27f6821407e80d31ac548c38dce6a","unresolved":true,"context_lines":[{"line_number":4308,"context_line":"        # case of evacuate. The instance is on a new host and will need to"},{"line_number":4309,"context_line":"        # establish a new console connection."},{"line_number":4310,"context_line":"        self._update_scheduler_instance_info(context, instance)"},{"line_number":4311,"context_line":"        self._notify_about_instance_usage("},{"line_number":4312,"context_line":"                context, instance, \"rebuild.end\","},{"line_number":4313,"context_line":"                network_info\u003dnetwork_info,"},{"line_number":4314,"context_line":"                extra_usage_info\u003dextra_usage_info)"}],"source_content_type":"text/x-python","patch_set":3,"id":"109efcd2_9ef425b4","line":4311,"updated":"2026-09-09 14:56:21.000000000","message":"this is basically wrong now as it will send an end notification with REBUILD_SPAWNING state so it is not the end of the rebuild.","commit_id":"f789232fb1b0ad4b3f30873e7dc61c6953b74e0d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"23eb8aa603ea67b359a713869513ae03e82d4bc2","unresolved":false,"context_lines":[{"line_number":4308,"context_line":"        # case of evacuate. The instance is on a new host and will need to"},{"line_number":4309,"context_line":"        # establish a new console connection."},{"line_number":4310,"context_line":"        self._update_scheduler_instance_info(context, instance)"},{"line_number":4311,"context_line":"        self._notify_about_instance_usage("},{"line_number":4312,"context_line":"                context, instance, \"rebuild.end\","},{"line_number":4313,"context_line":"                network_info\u003dnetwork_info,"},{"line_number":4314,"context_line":"                extra_usage_info\u003dextra_usage_info)"}],"source_content_type":"text/x-python","patch_set":3,"id":"31ea722b_7c38d694","line":4311,"in_reply_to":"109efcd2_9ef425b4","updated":"2026-09-28 09:58:16.000000000","message":"Done","commit_id":"f789232fb1b0ad4b3f30873e7dc61c6953b74e0d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"23eb8aa603ea67b359a713869513ae03e82d4bc2","unresolved":true,"context_lines":[{"line_number":4081,"context_line":"                # _update_available_resources. See bug 1896463."},{"line_number":4082,"context_line":"                self.rt.finish_evacuation(instance, scheduled_node, migration)"},{"line_number":4083,"context_line":""},{"line_number":4084,"context_line":"                if evacuate:"},{"line_number":4085,"context_line":"                    if orig_vm_state \u003d\u003d vm_states.STOPPED:"},{"line_number":4086,"context_line":"                        LOG.info(\"bringing vm to original state: \u0027%s\u0027\","},{"line_number":4087,"context_line":"                            orig_vm_state, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"a26b0623_f871b22c","line":4084,"updated":"2026-09-28 09:58:16.000000000","message":"I\u0027m wondering if we allow rebuild on stopped VMs and expect that the VM is moved back to stopped. If so then we should not guard this with the conditional for evac only.\n\n\n// later yes reubild has the stopping behavior so I think we can simplify and do the stop at one place for both actions and avoid a bunch of repeated code and conditionals\n\n```\nstack@aio:~$ openstack server list\n+--------------------------------------+------+---------+---------------------------------------------------------+--------------------------+-----------+\n| ID                                   | Name | Status  | Networks                                                | Image                    | Flavor    |\n+--------------------------------------+------+---------+---------------------------------------------------------+--------------------------+-----------+\n| 6f4c41b5-0ea1-48f6-988b-cdb29db27f76 | vm1  | SHUTOFF | private\u003d10.0.0.37, fd86:5068:b4de:0:f816:3eff:fe73:899c | cirros-0.6.3-x86_64-disk | cirros256 |\n+--------------------------------------+------+---------+---------------------------------------------------------+--------------------------+-----------+\nstack@aio:~$ openstack server rebuild vm1\n+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+\n| Field                               | Value                                                                                                                                |\n+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+\n| OS-DCF:diskConfig                   | MANUAL                                                                                                                               |\n| OS-EXT-AZ:availability_zone         | nova                                                                                                                                 |\n| OS-EXT-SRV-ATTR:host                | aio                                                                                                                                  |\n| OS-EXT-SRV-ATTR:hostname            | vm1                                                                                                                                  |\n| OS-EXT-SRV-ATTR:hypervisor_hostname | aio                                                                                                                                  |\n| OS-EXT-SRV-ATTR:instance_name       | instance-00000001                                                                                                                    |\n| OS-EXT-SRV-ATTR:kernel_id           |                                                                                                                                      |\n| OS-EXT-SRV-ATTR:launch_index        | 0                                                                                                                                    |\n| OS-EXT-SRV-ATTR:ramdisk_id          |                                                                                                                                      |\n| OS-EXT-SRV-ATTR:reservation_id      | r-s7xs5nq7                                                                                                                           |\n| OS-EXT-SRV-ATTR:root_device_name    | /dev/vda                                                                                                                             |\n| OS-EXT-SRV-ATTR:user_data           | None                                                                                                                                 |\n| OS-EXT-STS:power_state              | Shutdown                                                                                                                             |\n| OS-EXT-STS:task_state               | rebuilding                                                                                                                           |\n| OS-EXT-STS:vm_state                 | stopped                                                                                                                              |\n| OS-SRV-USG:launched_at              | 2026-09-28T09:51:08.000000                                                                                                           |\n| OS-SRV-USG:terminated_at            | None                                                                                                                                 |\n| accessIPv4                          |                                                                                                                                      |\n| accessIPv6                          |                                                                                                                                      |\n| addresses                           | private\u003d10.0.0.37, fd86:5068:b4de:0:f816:3eff:fe73:899c                                                                              |\n| adminPass                           | u3nVS7yRMz43                                                                                                                         |\n| config_drive                        |                                                                                                                                      |\n| created                             | 2026-09-28T09:51:05Z                                                                                                                 |\n| description                         | None                                                                                                                                 |\n| flavor                              | description\u003d, disk\u003d\u00271\u0027, ephemeral\u003d\u00270\u0027, extra_specs.hw_rng:allowed\u003d\u0027True\u0027, id\u003d\u0027cirros256\u0027, is_disabled\u003d, is_public\u003d\u0027True\u0027, location\u003d, |\n|                                     | name\u003d\u0027cirros256\u0027, original_name\u003d\u0027cirros256\u0027, ram\u003d\u0027256\u0027, rxtx_factor\u003d, swap\u003d\u00270\u0027, vcpus\u003d\u00271\u0027                                            |\n| hostId                              | e48259351a4baa34d04153492f669218bddada6f6a9d68186d0942e4                                                                             |\n| host_status                         | UP                                                                                                                                   |\n| id                                  | 6f4c41b5-0ea1-48f6-988b-cdb29db27f76                                                                                                 |\n| image                               | cirros-0.6.3-x86_64-disk (e10011d0-bdbf-4ff2-b273-3a8c9122e144)                                                                      |\n| key_name                            | None                                                                                                                                 |\n| locked                              | False                                                                                                                                |\n| locked_reason                       | None                                                                                                                                 |\n| name                                | vm1                                                                                                                                  |\n| pinned_availability_zone            | None                                                                                                                                 |\n| progress                            | 0                                                                                                                                    |\n| project_id                          | d23c830ebcba4291892c8e27414b3aaf                                                                                                     |\n| properties                          |                                                                                                                                      |\n| scheduler_hints                     |                                                                                                                                      |\n| security_groups                     | name\u003d\u0027default\u0027                                                                                                                       |\n| server_groups                       | []                                                                                                                                   |\n| status                              | REBUILD                                                                                                                              |\n| tags                                |                                                                                                                                      |\n| trusted_image_certificates          | None                                                                                                                                 |\n| updated                             | 2026-09-28T09:51:50Z                                                                                                                 |\n| user_id                             | ac45949ce8844cc99a0aaa8daa6d1dde                                                                                                     |\n| volumes_attached                    |                                                                                                                                      |\n+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+\nstack@aio:~$ openstack server list\n+--------------------------------------+------+---------+---------------------------------------------------------+--------------------------+-----------+\n| ID                                   | Name | Status  | Networks                                                | Image                    | Flavor    |\n+--------------------------------------+------+---------+---------------------------------------------------------+--------------------------+-----------+\n| 6f4c41b5-0ea1-48f6-988b-cdb29db27f76 | vm1  | REBUILD | private\u003d10.0.0.37, fd86:5068:b4de:0:f816:3eff:fe73:899c | cirros-0.6.3-x86_64-disk | cirros256 |\n+--------------------------------------+------+---------+---------------------------------------------------------+--------------------------+-----------+\nstack@aio:~$ openstack server list\n+--------------------------------------+------+--------+---------------------------------------------------------+--------------------------+-----------+\n| ID                                   | Name | Status | Networks                                                | Image                    | Flavor    |\n+--------------------------------------+------+--------+---------------------------------------------------------+--------------------------+-----------+\n| 6f4c41b5-0ea1-48f6-988b-cdb29db27f76 | vm1  | ACTIVE | private\u003d10.0.0.37, fd86:5068:b4de:0:f816:3eff:fe73:899c | cirros-0.6.3-x86_64-disk | cirros256 |\n+--------------------------------------+------+--------+---------------------------------------------------------+--------------------------+-----------+\nstack@aio:~$ openstack server list\n+--------------------------------------+------+---------+---------------------------------------------------------+--------------------------+-----------+\n| ID                                   | Name | Status  | Networks                                                | Image                    | Flavor    |\n+--------------------------------------+------+---------+---------------------------------------------------------+--------------------------+-----------+\n| 6f4c41b5-0ea1-48f6-988b-cdb29db27f76 | vm1  | SHUTOFF | private\u003d10.0.0.37, fd86:5068:b4de:0:f816:3eff:fe73:899c | cirros-0.6.3-x86_64-disk | cirros256 |\n+--------------------------------------+------+---------+---------------------------------------------------------+--------------------------+-----------+\nstack@aio:~$ \n\n```","commit_id":"6a0d7ee3595ef56ba0783ba1332700b68b33310f"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"26257e27dc01666223fb8be06ef1951d17451687","unresolved":false,"context_lines":[{"line_number":4081,"context_line":"                # _update_available_resources. See bug 1896463."},{"line_number":4082,"context_line":"                self.rt.finish_evacuation(instance, scheduled_node, migration)"},{"line_number":4083,"context_line":""},{"line_number":4084,"context_line":"                if evacuate:"},{"line_number":4085,"context_line":"                    if orig_vm_state \u003d\u003d vm_states.STOPPED:"},{"line_number":4086,"context_line":"                        LOG.info(\"bringing vm to original state: \u0027%s\u0027\","},{"line_number":4087,"context_line":"                            orig_vm_state, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"d7dc8611_a7df53b9","line":4084,"in_reply_to":"a26b0623_f871b22c","updated":"2026-10-06 14:00:13.000000000","message":"Done","commit_id":"6a0d7ee3595ef56ba0783ba1332700b68b33310f"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"23eb8aa603ea67b359a713869513ae03e82d4bc2","unresolved":false,"context_lines":[{"line_number":4089,"context_line":"                        instance.task_state \u003d task_states.POWERING_OFF"},{"line_number":4090,"context_line":"                        instance.progress \u003d 0"},{"line_number":4091,"context_line":"                        instance.save("},{"line_number":4092,"context_line":"                            expected_task_state\u003d[task_states.REBUILDING])"},{"line_number":4093,"context_line":"                        self.stop_instance(context, instance, False)"},{"line_number":4094,"context_line":"                    else:"},{"line_number":4095,"context_line":"                        instance.task_state \u003d None"}],"source_content_type":"text/x-python","patch_set":4,"id":"7ce54b2e_698b669b","line":4092,"updated":"2026-09-28 09:58:16.000000000","message":"OK this is matching with the above task_state set","commit_id":"6a0d7ee3595ef56ba0783ba1332700b68b33310f"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"23eb8aa603ea67b359a713869513ae03e82d4bc2","unresolved":true,"context_lines":[{"line_number":4315,"context_line":"            # NOTE(rpodolyaka): driver doesn\u0027t provide specialized version"},{"line_number":4316,"context_line":"            # of rebuild, fall back to the default implementation"},{"line_number":4317,"context_line":"            self._rebuild_default_impl(**kwargs)"},{"line_number":4318,"context_line":"        if evacuate:"},{"line_number":4319,"context_line":"            # Keep task_state\u003dREBUILDING so that the instance is never"},{"line_number":4320,"context_line":"            # visible with task_state\u003dNone while host still points to"},{"line_number":4321,"context_line":"            # the dead source. rebuild_instance will clear task_state"}],"source_content_type":"text/x-python","patch_set":4,"id":"05be7351_2d2e2789","line":4318,"updated":"2026-09-28 09:58:16.000000000","message":"I\u0027m wondering if it would be better overall to make this code move for rebuild case as well. It would be definetly simpler implementation.","commit_id":"6a0d7ee3595ef56ba0783ba1332700b68b33310f"},{"author":{"_account_id":16207,"name":"ribaudr","display_name":"uggla","email":"rene.ribaud@gmail.com","username":"uggla","status":"Red Hat"},"change_message_id":"92093aa4adc96e5a617310d6027cd8f5d743c6a4","unresolved":false,"context_lines":[{"line_number":4315,"context_line":"            # NOTE(rpodolyaka): driver doesn\u0027t provide specialized version"},{"line_number":4316,"context_line":"            # of rebuild, fall back to the default implementation"},{"line_number":4317,"context_line":"            self._rebuild_default_impl(**kwargs)"},{"line_number":4318,"context_line":"        if evacuate:"},{"line_number":4319,"context_line":"            # Keep task_state\u003dREBUILDING so that the instance is never"},{"line_number":4320,"context_line":"            # visible with task_state\u003dNone while host still points to"},{"line_number":4321,"context_line":"            # the dead source. rebuild_instance will clear task_state"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a012f5b_4c509d54","line":4318,"in_reply_to":"05be7351_2d2e2789","updated":"2026-10-06 09:28:03.000000000","message":"Done","commit_id":"6a0d7ee3595ef56ba0783ba1332700b68b33310f"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"ae01c4b6575e44283f3242bb0de550f23a92a3a9","unresolved":false,"context_lines":[{"line_number":4091,"context_line":"                    instance.progress \u003d 0"},{"line_number":4092,"context_line":"                    instance.save("},{"line_number":4093,"context_line":"                        expected_task_state\u003d[task_states.REBUILDING])"},{"line_number":4094,"context_line":"                    self.stop_instance(context, instance, False)"},{"line_number":4095,"context_line":"                else:"},{"line_number":4096,"context_line":"                    instance.task_state \u003d None"},{"line_number":4097,"context_line":"                    instance.save("},{"line_number":4098,"context_line":"                        expected_task_state\u003d[task_states.REBUILDING])"},{"line_number":4099,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"4a73c5f9_3dcd2517","line":4096,"range":{"start_line":4094,"start_character":0,"end_line":4096,"end_character":46},"updated":"2026-10-28 02:16:44.000000000","message":"This solve the task_state not be set as None pre-mature when evacuate is not actually finished but I was thinking if any error post finish_evacuation() can leave task_state hang to non-None? It seems not because both rebuild_isntance and stop_instance is guarded with reverts_task_state() which make sure to reset the task_state.","commit_id":"88a6bd6c2d9e048bcb9ef8b0004e1490a5098eaa"}],"nova/compute/resource_tracker.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4d4810b41c89d8b68c5e39c62deec0067c03e725","unresolved":true,"context_lines":[{"line_number":90,"context_line":"    has not yet completed (instance.host not updated to dest)."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    During an evacuation, after _update_instance_after_spawn clears"},{"line_number":93,"context_line":"    task_state but before finish_evacuation updates instance.host, the"},{"line_number":94,"context_line":"    instance falls through both _instance_in_resize_state and"},{"line_number":95,"context_line":"    _instance_is_live_migrating checks. This helper catches that window"},{"line_number":96,"context_line":"    so that the migration resources (including CPU pinning) are still"}],"source_content_type":"text/x-python","patch_set":2,"id":"e54de3d3_2b743da8","line":93,"updated":"2026-08-19 14:23:10.000000000","message":"that empty task state before the instance.host upgrade seems like a bigger problem as that allows other actions to run on the instance. I tempted to say try to close that gap and only remove the task state at the same transaction as used to set the instance.host to avoid the gap.","commit_id":"e30c5cbc999e2beaa06c5b55e96a605ef78a9f13"},{"author":{"_account_id":16207,"name":"ribaudr","display_name":"uggla","email":"rene.ribaud@gmail.com","username":"uggla","status":"Red Hat"},"change_message_id":"06625260a03e2ac49b6c112d62be0916b0951518","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    has not yet completed (instance.host not updated to dest)."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    During an evacuation, after _update_instance_after_spawn clears"},{"line_number":93,"context_line":"    task_state but before finish_evacuation updates instance.host, the"},{"line_number":94,"context_line":"    instance falls through both _instance_in_resize_state and"},{"line_number":95,"context_line":"    _instance_is_live_migrating checks. This helper catches that window"},{"line_number":96,"context_line":"    so that the migration resources (including CPU pinning) are still"}],"source_content_type":"text/x-python","patch_set":2,"id":"f7a887b5_bfc43dde","line":93,"in_reply_to":"e54de3d3_2b743da8","updated":"2026-09-04 13:16:25.000000000","message":"Task_state stays REBUILD_SPAWNING until finish_evacuation sets it to None together with the host update.","commit_id":"e30c5cbc999e2beaa06c5b55e96a605ef78a9f13"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4d4810b41c89d8b68c5e39c62deec0067c03e725","unresolved":true,"context_lines":[{"line_number":97,"context_line":"    tracked by _update_usage_from_migrations."},{"line_number":98,"context_line":"    \"\"\""},{"line_number":99,"context_line":"    return (migration.migration_type \u003d\u003d \u0027evacuation\u0027 and"},{"line_number":100,"context_line":"            instance.host !\u003d migration.dest_compute)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"class ResourceTracker(object):"}],"source_content_type":"text/x-python","patch_set":2,"id":"0ce75fbf_1229e1e7","line":100,"updated":"2026-08-19 14:23:10.000000000","message":"do we need to filter failed evacuates? or is it done elsewhere? See my comment below with details","commit_id":"e30c5cbc999e2beaa06c5b55e96a605ef78a9f13"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"23eb8aa603ea67b359a713869513ae03e82d4bc2","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    tracked by _update_usage_from_migrations."},{"line_number":98,"context_line":"    \"\"\""},{"line_number":99,"context_line":"    return (migration.migration_type \u003d\u003d \u0027evacuation\u0027 and"},{"line_number":100,"context_line":"            instance.host !\u003d migration.dest_compute)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"class ResourceTracker(object):"}],"source_content_type":"text/x-python","patch_set":2,"id":"581709ad_2e316646","line":100,"in_reply_to":"04097003_856f8fe4","updated":"2026-09-28 09:58:16.000000000","message":"Acknowledged","commit_id":"e30c5cbc999e2beaa06c5b55e96a605ef78a9f13"},{"author":{"_account_id":16207,"name":"ribaudr","display_name":"uggla","email":"rene.ribaud@gmail.com","username":"uggla","status":"Red Hat"},"change_message_id":"06625260a03e2ac49b6c112d62be0916b0951518","unresolved":true,"context_lines":[{"line_number":97,"context_line":"    tracked by _update_usage_from_migrations."},{"line_number":98,"context_line":"    \"\"\""},{"line_number":99,"context_line":"    return (migration.migration_type \u003d\u003d \u0027evacuation\u0027 and"},{"line_number":100,"context_line":"            instance.host !\u003d migration.dest_compute)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"class ResourceTracker(object):"}],"source_content_type":"text/x-python","patch_set":2,"id":"04097003_856f8fe4","line":100,"in_reply_to":"0ce75fbf_1229e1e7","updated":"2026-09-04 13:16:25.000000000","message":"If I\u0027m not wrong failed evacuations already have migration.status \u003d \u0027failed\u0027, which is excluded by get_in_progress_and_error (see db/main/api.py L3490-3497). So _instance_is_evacuating never sees them. Added a note in the docstring to clarify.","commit_id":"e30c5cbc999e2beaa06c5b55e96a605ef78a9f13"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4d4810b41c89d8b68c5e39c62deec0067c03e725","unresolved":true,"context_lines":[{"line_number":1607,"context_line":"            # Skip migration if instance is neither in a resize state,"},{"line_number":1608,"context_line":"            # live-migrating, nor being evacuated."},{"line_number":1609,"context_line":"            if (not _instance_in_resize_state(instances[uuid]) and not"},{"line_number":1610,"context_line":"                    _instance_is_live_migrating(instances[uuid]) and not"},{"line_number":1611,"context_line":"                    _instance_is_evacuating(instances[uuid], migration)):"},{"line_number":1612,"context_line":"                LOG.debug(\u0027Skipping migration as instance is neither \u0027"},{"line_number":1613,"context_line":"                          \u0027resizing, live-migrating, nor being evacuated.\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"540a22ec_3be27537","line":1610,"updated":"2026-08-19 14:23:10.000000000","message":"OK so this check filtered our evacuation migration record from the usage calculation and we do want that the usage calculation includes an in progress migration targeting this host as well. That seems OK. \n\nBut evacuation is a strange beast. The following can happen:\n* VM is on host A. Host dies.\n* VM evacuation called. Host B selected, migration record exists. but spawn fails. instance is back to a state where evacuation can be retried\n* VM evacuation called. Host C selected, migration record created to host C.\n\nNow the code below will filter the migration recprod to the newest but it runs on migrations where the dest host is this host. So on Host B this will select Host B migration record and will include it into the usage calcualtion. But the instance will never be placed to Host B any more as that evac failed.","commit_id":"e30c5cbc999e2beaa06c5b55e96a605ef78a9f13"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"23eb8aa603ea67b359a713869513ae03e82d4bc2","unresolved":false,"context_lines":[{"line_number":1607,"context_line":"            # Skip migration if instance is neither in a resize state,"},{"line_number":1608,"context_line":"            # live-migrating, nor being evacuated."},{"line_number":1609,"context_line":"            if (not _instance_in_resize_state(instances[uuid]) and not"},{"line_number":1610,"context_line":"                    _instance_is_live_migrating(instances[uuid]) and not"},{"line_number":1611,"context_line":"                    _instance_is_evacuating(instances[uuid], migration)):"},{"line_number":1612,"context_line":"                LOG.debug(\u0027Skipping migration as instance is neither \u0027"},{"line_number":1613,"context_line":"                          \u0027resizing, live-migrating, nor being evacuated.\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fc8d304c_7daf051c","line":1610,"in_reply_to":"50dff4f2_b992717b","updated":"2026-09-28 09:58:16.000000000","message":"OK cool then. \"failed\" is a proper end state to filter on. I hope we consistently set \"failed\" everywhere and not keeping migration in \"error\" for long. :)","commit_id":"e30c5cbc999e2beaa06c5b55e96a605ef78a9f13"},{"author":{"_account_id":16207,"name":"ribaudr","display_name":"uggla","email":"rene.ribaud@gmail.com","username":"uggla","status":"Red Hat"},"change_message_id":"06625260a03e2ac49b6c112d62be0916b0951518","unresolved":true,"context_lines":[{"line_number":1607,"context_line":"            # Skip migration if instance is neither in a resize state,"},{"line_number":1608,"context_line":"            # live-migrating, nor being evacuated."},{"line_number":1609,"context_line":"            if (not _instance_in_resize_state(instances[uuid]) and not"},{"line_number":1610,"context_line":"                    _instance_is_live_migrating(instances[uuid]) and not"},{"line_number":1611,"context_line":"                    _instance_is_evacuating(instances[uuid], migration)):"},{"line_number":1612,"context_line":"                LOG.debug(\u0027Skipping migration as instance is neither \u0027"},{"line_number":1613,"context_line":"                          \u0027resizing, live-migrating, nor being evacuated.\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"50dff4f2_b992717b","line":1610,"in_reply_to":"540a22ec_3be27537","updated":"2026-09-04 13:16:25.000000000","message":"I think, when the evac to host B fails, the migration status is set to \u0027failed\u0027 (manager.py L4031/4051/4054), and get_in_progress_and_error filters it out. Host B\u0027s periodic will not include that stale migration record in its usage calculation.","commit_id":"e30c5cbc999e2beaa06c5b55e96a605ef78a9f13"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"ae01c4b6575e44283f3242bb0de550f23a92a3a9","unresolved":true,"context_lines":[{"line_number":103,"context_line":"    Migrations in \u0027error\u0027 status are included by the DB query but"},{"line_number":104,"context_line":"    filtered out here since the evacuation is no longer in progress."},{"line_number":105,"context_line":"    \"\"\""},{"line_number":106,"context_line":"    return (migration.migration_type \u003d\u003d \u0027evacuation\u0027 and"},{"line_number":107,"context_line":"            migration.status !\u003d \u0027error\u0027 and"},{"line_number":108,"context_line":"            instance.host !\u003d migration.dest_compute)"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"2be6dc2d_7a3d6cf2","line":106,"range":{"start_line":106,"start_character":40,"end_line":106,"end_character":52},"updated":"2026-10-28 02:16:44.000000000","message":"instead of a string, it will be good to use fields.MigrationType.EVACUATION","commit_id":"88a6bd6c2d9e048bcb9ef8b0004e1490a5098eaa"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"ae01c4b6575e44283f3242bb0de550f23a92a3a9","unresolved":false,"context_lines":[{"line_number":103,"context_line":"    Migrations in \u0027error\u0027 status are included by the DB query but"},{"line_number":104,"context_line":"    filtered out here since the evacuation is no longer in progress."},{"line_number":105,"context_line":"    \"\"\""},{"line_number":106,"context_line":"    return (migration.migration_type \u003d\u003d \u0027evacuation\u0027 and"},{"line_number":107,"context_line":"            migration.status !\u003d \u0027error\u0027 and"},{"line_number":108,"context_line":"            instance.host !\u003d migration.dest_compute)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"class ResourceTracker(object):"}],"source_content_type":"text/x-python","patch_set":5,"id":"d4315765_a7b1599c","line":108,"range":{"start_line":106,"start_character":3,"end_line":108,"end_character":52},"updated":"2026-10-28 02:16:44.000000000","message":"at some point we can move these functional _instance_is_live_migrating, _instance_in_resize_state, and _instance_is_evacuating in utils or so which can be used in other place (for example when you will solve the duplicate evacuate operation at API level) but we can do that later when we need it.\n\njust a note, we can make these consistent either all these three method checking migration object fields or task_state or both. Currently live migration and resize make decision based on task_state and evacuate based on migration. Checking both might be good as evacuation needs to differentiate it from normal rebuild where task_state are same in both operation.\n\nanyways this is not something to change in this bug fix but i thought it will be good to make them consistent and have in somewhere central place.","commit_id":"88a6bd6c2d9e048bcb9ef8b0004e1490a5098eaa"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"ae01c4b6575e44283f3242bb0de550f23a92a3a9","unresolved":false,"context_lines":[{"line_number":1625,"context_line":"            inst \u003d instances[uuid]"},{"line_number":1626,"context_line":"            if not (_instance_in_resize_state(inst) or"},{"line_number":1627,"context_line":"                    _instance_is_live_migrating(inst) or"},{"line_number":1628,"context_line":"                    _instance_is_evacuating(inst, migration)):"},{"line_number":1629,"context_line":"                LOG.debug(\u0027Skipping migration as instance is neither \u0027"},{"line_number":1630,"context_line":"                          \u0027resizing, live-migrating, nor being evacuated.\u0027,"},{"line_number":1631,"context_line":"                          instance_uuid\u003duuid)"}],"source_content_type":"text/x-python","patch_set":5,"id":"b2b3812c_399b399d","line":1628,"range":{"start_line":1628,"start_character":11,"end_line":1628,"end_character":62},"updated":"2026-10-28 02:16:44.000000000","message":"++, this solve the key issue or resources claim race like CPU pinning case etc. Not sure why we did not consider evacuate as in-coming migration since starting?","commit_id":"88a6bd6c2d9e048bcb9ef8b0004e1490a5098eaa"}],"nova/tests/functional/regressions/test_bug_2162835.py":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"ae01c4b6575e44283f3242bb0de550f23a92a3a9","unresolved":false,"context_lines":[{"line_number":275,"context_line":"            server,"},{"line_number":276,"context_line":"            {"},{"line_number":277,"context_line":"                \"OS-EXT-SRV-ATTR:host\": \"dest\","},{"line_number":278,"context_line":"                \"OS-EXT-STS:task_state\": None,"},{"line_number":279,"context_line":"                \"status\": \"SHUTOFF\","},{"line_number":280,"context_line":"            })"},{"line_number":281,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"c6b857ac_71051bc6","line":278,"range":{"start_line":278,"start_character":40,"end_line":278,"end_character":46},"updated":"2026-10-28 02:16:44.000000000","message":"++ to check this as None","commit_id":"88a6bd6c2d9e048bcb9ef8b0004e1490a5098eaa"}]}
