)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b03c65c6604b234c8a7e5be24f144b0830a5fea2","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Compute RPC methods for live migration v2"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"FIXME: Move object change to patch before this"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"This adds the new live migration RPC calls that condutor will use to"},{"line_number":12,"context_line":"drive this process without any RPC communication between the two"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"cc5497e5_ad9648e6","line":9,"updated":"2026-10-05 18:01:17.000000000","message":"Note the objects changed here are just squashed for convenience, but obviously need to be moved out ahead of this.","commit_id":"fcbc7fc4954a71ad257a2730daabb2467ea42ed8"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"33ecd9efd2cefd11588020b982ec206dbe5dde7d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"3d08aceb_4e024cd3","updated":"2026-11-20 16:09:39.000000000","message":"rebase related changed (dropping old RPC compat on master) looks sane","commit_id":"a494e4eecda6393353e819774ec2465b86e395b1"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"8c1e16d6c3c53e0f83dd1625bdb45d099146d914","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"d510af7c_221390a8","updated":"2026-11-24 09:53:25.000000000","message":"some concerns here, I\u0027ll add a few testcases to verify.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e831a00866e9abbadd7d958cb963ee0d9c17d259","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"caddca27_09d666a2","updated":"2026-12-02 10:04:01.000000000","message":"I need to re-review the patch as a whole now.","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8c259549f6564991e96e48a4dde6368f3eb75963","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"9b1b1594_4254a73c","updated":"2026-11-25 22:39:40.000000000","message":"Okay, I pushed a ton of change in here, mostly about the resource cleanup stuff identified in the reviews. for most of those things I let the LLM write/update the tests to make sure the actual code worked, so potentially some suitable-for-humans regression in the test is expected. I did several cross- and same- cell migrations on my test systems and it all went well but ran out of time for the day (week). Hopefully this gets us a lot closer on all the review comments here and I\u0027ll try to rebuild my deployment with cinder next week and try to break some volume stuff.","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"2cf0c395b65611a1f6c29da8a0c61fd99d4ae6ab","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"86d862ac_a9ae00dc","updated":"2026-11-26 16:26:36.000000000","message":"that one gave me headaches, spent 3 hours looking at it and I\u0027m still not fully clear yet.","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"}],"nova/compute/manager.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b03c65c6604b234c8a7e5be24f144b0830a5fea2","unresolved":true,"context_lines":[{"line_number":9103,"context_line":"                                                           block_device_info)"},{"line_number":9104,"context_line":"        result \u003d self._source_can_numa_live_migrate(ctxt, dest_check_data,"},{"line_number":9105,"context_line":"                                                    result)"},{"line_number":9106,"context_line":"        if (\u0027block_migration\u0027 in result and result.block_migration):"},{"line_number":9107,"context_line":"            result.src_disk_info_json \u003d self.driver.get_instance_disk_info("},{"line_number":9108,"context_line":"                instance, block_device_info\u003dblock_device_info)"},{"line_number":9109,"context_line":"        LOG.debug(\u0027source check data is %s\u0027, result)"}],"source_content_type":"text/x-python","patch_set":1,"id":"c3577a63_d553ad57","line":9106,"updated":"2026-10-05 18:01:17.000000000","message":"Agents love to add this sort of thing because they don\u0027t understand o.vos very well and this makes things not break. I\u0027ve removed a bunch of this ambiguity when I see it but I\u0027ll have to make another pass. This is of course related to v2 not supporting this flag at all and the potential for it to be either in this shared check routine.","commit_id":"fcbc7fc4954a71ad257a2730daabb2467ea42ed8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"2cf0c395b65611a1f6c29da8a0c61fd99d4ae6ab","unresolved":true,"context_lines":[{"line_number":9103,"context_line":"                                                           block_device_info)"},{"line_number":9104,"context_line":"        result \u003d self._source_can_numa_live_migrate(ctxt, dest_check_data,"},{"line_number":9105,"context_line":"                                                    result)"},{"line_number":9106,"context_line":"        if (\u0027block_migration\u0027 in result and result.block_migration):"},{"line_number":9107,"context_line":"            result.src_disk_info_json \u003d self.driver.get_instance_disk_info("},{"line_number":9108,"context_line":"                instance, block_device_info\u003dblock_device_info)"},{"line_number":9109,"context_line":"        LOG.debug(\u0027source check data is %s\u0027, result)"}],"source_content_type":"text/x-python","patch_set":1,"id":"346de1fb_ec80fd8d","line":9106,"in_reply_to":"c3577a63_d553ad57","updated":"2026-11-26 16:26:36.000000000","message":"ack","commit_id":"fcbc7fc4954a71ad257a2730daabb2467ea42ed8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b03c65c6604b234c8a7e5be24f144b0830a5fea2","unresolved":true,"context_lines":[{"line_number":10886,"context_line":"        # call, here we wrap _setup_destination_for_live_migration"},{"line_number":10887,"context_line":"        # (which calls driver.pre_live_migration to plug VIFs) in"},{"line_number":10888,"context_line":"        # wait_for_instance_event so we deterministically receive the"},{"line_number":10889,"context_line":"        # events before returning to the conductor."},{"line_number":10890,"context_line":"        events \u003d self._get_neutron_events_for_live_migration(instance)"},{"line_number":10891,"context_line":"        try:"},{"line_number":10892,"context_line":"            timeout \u003d CONF.vif_plugging_timeout"}],"source_content_type":"text/x-python","patch_set":1,"id":"10b5350b_ac2ce426","line":10889,"updated":"2026-10-05 18:01:17.000000000","message":"Major v2 refactor here worth noting. Nothing to do wth cross-cell migration at all. Previously the events for the destination setup were generated by destination-side actions, but events are sent to the source. So the source sets up to wait, calls the destination to do the work, which generates the events, which the source validates. This doesn\u0027t really make any sense and is quite complicated, but just exists that way because neutron events were designed after live migration (v1) was established in the code and so the hokey source-\u003edestination-\u003eneutron-\u003esource-\u003edestination linkage was born.","commit_id":"fcbc7fc4954a71ad257a2730daabb2467ea42ed8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b03c65c6604b234c8a7e5be24f144b0830a5fea2","unresolved":true,"context_lines":[{"line_number":10941,"context_line":"        # Start the destination monitor thread. It watches Placement"},{"line_number":10942,"context_line":"        # for migration completion/failure and triggers post/rollback"},{"line_number":10943,"context_line":"        # on this host independently of the source."},{"line_number":10944,"context_line":"        self._start_recorded_task("},{"line_number":10945,"context_line":"            thread_pool_factory.ExecutorType.LIVE_MIGRATION,"},{"line_number":10946,"context_line":"            \u0027live_migration_v2_monitor\u0027, instance, ctxt,"},{"line_number":10947,"context_line":"            self._live_migration_v2_monitor,"}],"source_content_type":"text/x-python","patch_set":1,"id":"a03109f4_3728007e","line":10944,"updated":"2026-10-05 18:01:17.000000000","message":"Today, this records a task to block our live migration and then exits. That task never gets cleaned up until/unless the source calls to us to tell us it is finished (success or failure). Tha leads to this bug:\n\nhttps://bugs.launchpad.net/nova/+bug/2166009\n\nNote the change here that we\u0027re doing the same thing (of blocking graceful shutdown), but starting an actual destination-side monitoring thread which will end eventually based on the outcome of the migration as determined by how the source ultimately reconfigures the allocations in placement.","commit_id":"fcbc7fc4954a71ad257a2730daabb2467ea42ed8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b03c65c6604b234c8a7e5be24f144b0830a5fea2","unresolved":true,"context_lines":[{"line_number":10965,"context_line":"        while True:"},{"line_number":10966,"context_line":"            migration_allocs \u003d ("},{"line_number":10967,"context_line":"                self.reportclient.get_allocations_for_consumer("},{"line_number":10968,"context_line":"                    ctxt, migration.uuid))"},{"line_number":10969,"context_line":"            if not migration_allocs:"},{"line_number":10970,"context_line":"                # Migration consumer allocations are gone — the source"},{"line_number":10971,"context_line":"                # has either completed or reverted."}],"source_content_type":"text/x-python","patch_set":1,"id":"6a91c9ad_de43d528","line":10968,"updated":"2026-10-05 18:01:17.000000000","message":"Note that we have more opportunity here than before to make a good decision and/or warn about potential situations that are bad. In v1 we have certain failure paths where the source and destination don\u0027t agree on where the instance ended up, which mostly stems from a loose definition of the cleanup responsibility I think.\n\nFor example, if the destination finds the instance in local libvirt, but the allocations never get convered by the source, we could log and do something. If the source claims the instance was reverted but a local VM remains here, we could do something smart like potentially pause it and log the error so that it\u0027s recoverable instead of leaving the state completely corrupted, etc.\n\nRight now, this only looks at allocations, but I think we have the opportunity to do more, at least forensically. It also gives us a place for the destination to do things after a migration (failed or not) where in v1 we can only do that *if* we\u0027re called by the source.","commit_id":"fcbc7fc4954a71ad257a2730daabb2467ea42ed8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b03c65c6604b234c8a7e5be24f144b0830a5fea2","unresolved":true,"context_lines":[{"line_number":10976,"context_line":"                    LOG.info(\u0027Destination monitor detected successful \u0027"},{"line_number":10977,"context_line":"                             \u0027live migration for instance %s\u0027,"},{"line_number":10978,"context_line":"                             instance.uuid)"},{"line_number":10979,"context_line":"                    if migration.cross_cell_move:"},{"line_number":10980,"context_line":"                        # For cross-cell, the dest monitor owns the"},{"line_number":10981,"context_line":"                        # migration record in the target cell."},{"line_number":10982,"context_line":"                        migration.status \u003d \u0027completed\u0027"},{"line_number":10983,"context_line":"                        migration.save()"},{"line_number":10984,"context_line":"                        # The instance was cloned hidden\u003dTrue by"},{"line_number":10985,"context_line":"                        # conductor. Unhide it now that migration"},{"line_number":10986,"context_line":"                        # succeeded so it appears in listings."},{"line_number":10987,"context_line":"                        instance.hidden \u003d False"},{"line_number":10988,"context_line":"                    self._do_post_live_migration_at_destination("},{"line_number":10989,"context_line":"                        ctxt, instance, False)"},{"line_number":10990,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"620b83e7_135c3531","line":10987,"range":{"start_line":10979,"start_character":0,"end_line":10987,"end_character":47},"updated":"2026-10-05 18:01:17.000000000","message":"For the success case, this is basically the delta between \"intra-cell\" and \"cross-cell\" migrations.\n\nI point this out because if we were to retain all of the v1 plumbing and just make it work for cross-cell, we have to sprinkle stuff like this all over the varied cleanup paths. By changing how all that process happens, it becomes far cleaner.","commit_id":"fcbc7fc4954a71ad257a2730daabb2467ea42ed8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b03c65c6604b234c8a7e5be24f144b0830a5fea2","unresolved":true,"context_lines":[{"line_number":11047,"context_line":""},{"line_number":11048,"context_line":"        if not migration.cross_cell_move:"},{"line_number":11049,"context_line":"            return"},{"line_number":11050,"context_line":"        try:"},{"line_number":11051,"context_line":"            instance.destroy(hard_delete\u003dTrue)"},{"line_number":11052,"context_line":"        except Exception:"},{"line_number":11053,"context_line":"            LOG.exception(\u0027Failed to delete destination instance during live \u0027"},{"line_number":11054,"context_line":"                          \u0027migration rollback.\u0027, instance\u003dinstance)"},{"line_number":11055,"context_line":""},{"line_number":11056,"context_line":"    def _require_nw_info_update(self, context, instance):"},{"line_number":11057,"context_line":"        \"\"\"Detect whether there is a mismatch in binding:host_id, or"}],"source_content_type":"text/x-python","patch_set":1,"id":"8e52bfa4_83c15522","line":11054,"range":{"start_line":11050,"start_character":0,"end_line":11054,"end_character":67},"updated":"2026-10-05 18:01:17.000000000","message":"For failed migrations, this is basically the cross/intra cell delta.","commit_id":"fcbc7fc4954a71ad257a2730daabb2467ea42ed8"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"225a4587c643274bf73fcb9517e853a9f1800321","unresolved":true,"context_lines":[{"line_number":8829,"context_line":"        # earlier. Also, it should be safe to explode here, error becomes"},{"line_number":8830,"context_line":"        # NoValidHost and instance status remains ACTIVE."},{"line_number":8831,"context_line":"        try:"},{"line_number":8832,"context_line":"            self._validate_instance_group_policy(ctxt, instance)"},{"line_number":8833,"context_line":"        except exception.RescheduledException as e:"},{"line_number":8834,"context_line":"            msg \u003d (\"Failed to validate instance group policy \""},{"line_number":8835,"context_line":"                   \"due to: {}\".format(e))"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f642fe7_0d7cbd37","line":8832,"updated":"2026-11-11 15:49:41.000000000","message":"This triggers an upcall to get the InstanceGroup object from the API DB to validate the affinity policy regardless if the instance has group membership or not as it does not get the scheduler_hints from the request_spec as that is not sent via the old RPC. (During boot request_spec is sent and therefore the upcall only happens for instances with group membership, the minority). \nYou are touching up this RPC API as far as I can see, so maybe we can add the request_spec as well to this RPC in the same step. That would help not triggering an unnecessary upcall for non grouped VMs.","commit_id":"b7ca8636ece1901af1cca40fe09c2b433fbe27a0"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f13bec8a1fba82d1fb87d7ab0f1e8893c1898a7c","unresolved":true,"context_lines":[{"line_number":8829,"context_line":"        # earlier. Also, it should be safe to explode here, error becomes"},{"line_number":8830,"context_line":"        # NoValidHost and instance status remains ACTIVE."},{"line_number":8831,"context_line":"        try:"},{"line_number":8832,"context_line":"            self._validate_instance_group_policy(ctxt, instance)"},{"line_number":8833,"context_line":"        except exception.RescheduledException as e:"},{"line_number":8834,"context_line":"            msg \u003d (\"Failed to validate instance group policy \""},{"line_number":8835,"context_line":"                   \"due to: {}\".format(e))"}],"source_content_type":"text/x-python","patch_set":2,"id":"dec67ef9_48fe3d55","line":8832,"in_reply_to":"1f642fe7_0d7cbd37","updated":"2026-11-11 16:02:43.000000000","message":"In the legacy RPC path we probably need to change both chain:\n* conductor - check_can_live_migrate_destinatior - destination\n* conductor - live_migration - source - pre_live_migration - destination\n\nBut I guess it is different for the new v2 calls as there is no source - dest messaging.","commit_id":"b7ca8636ece1901af1cca40fe09c2b433fbe27a0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"53dc0be08aa09ace0d813df5e646d6d7f1201682","unresolved":true,"context_lines":[{"line_number":8829,"context_line":"        # earlier. Also, it should be safe to explode here, error becomes"},{"line_number":8830,"context_line":"        # NoValidHost and instance status remains ACTIVE."},{"line_number":8831,"context_line":"        try:"},{"line_number":8832,"context_line":"            self._validate_instance_group_policy(ctxt, instance)"},{"line_number":8833,"context_line":"        except exception.RescheduledException as e:"},{"line_number":8834,"context_line":"            msg \u003d (\"Failed to validate instance group policy \""},{"line_number":8835,"context_line":"                   \"due to: {}\".format(e))"}],"source_content_type":"text/x-python","patch_set":2,"id":"afd173e5_ca7a8772","line":8832,"in_reply_to":"1f642fe7_0d7cbd37","updated":"2026-11-11 15:52:39.000000000","message":"Yeah, you mean fix it for the v2 path and leave it as is for the legacy one right? I added a note below to the actual RPC.\n\nBut yep, makes sense to fix this for v2...","commit_id":"b7ca8636ece1901af1cca40fe09c2b433fbe27a0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c248b214b6a96ff4a59d89da5f6fed82c0630c50","unresolved":true,"context_lines":[{"line_number":8829,"context_line":"        # earlier. Also, it should be safe to explode here, error becomes"},{"line_number":8830,"context_line":"        # NoValidHost and instance status remains ACTIVE."},{"line_number":8831,"context_line":"        try:"},{"line_number":8832,"context_line":"            self._validate_instance_group_policy(ctxt, instance)"},{"line_number":8833,"context_line":"        except exception.RescheduledException as e:"},{"line_number":8834,"context_line":"            msg \u003d (\"Failed to validate instance group policy \""},{"line_number":8835,"context_line":"                   \"due to: {}\".format(e))"}],"source_content_type":"text/x-python","patch_set":2,"id":"62f2c4c4_94119774","line":8832,"in_reply_to":"58c13a00_1f35413e","updated":"2026-11-24 18:39:57.000000000","message":"So, `RequestSpec` can be pretty big to pass down for the very few cases where it will matter (and for what is disable-able by config). I wonder if we could just pass a hint (pun intended) instead of the whole thing? AFAICT, passing the reqspec will only tell us if we\u0027re in a group so that we can look it up. Could we just pass `reqspec.scheduler_hints` so we can make the param here non-null or maybe even just pass a boolean of `is_grouped`? I kinda hate to pass the actual hints since they\u0027re a dict of strings and not very well structured, so even though it seems very specific, I think the boolean seems best.\n\nThoughts?","commit_id":"b7ca8636ece1901af1cca40fe09c2b433fbe27a0"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e831a00866e9abbadd7d958cb963ee0d9c17d259","unresolved":true,"context_lines":[{"line_number":8829,"context_line":"        # earlier. Also, it should be safe to explode here, error becomes"},{"line_number":8830,"context_line":"        # NoValidHost and instance status remains ACTIVE."},{"line_number":8831,"context_line":"        try:"},{"line_number":8832,"context_line":"            self._validate_instance_group_policy(ctxt, instance)"},{"line_number":8833,"context_line":"        except exception.RescheduledException as e:"},{"line_number":8834,"context_line":"            msg \u003d (\"Failed to validate instance group policy \""},{"line_number":8835,"context_line":"                   \"due to: {}\".format(e))"}],"source_content_type":"text/x-python","patch_set":2,"id":"b6d37854_b96e73c2","line":8832,"in_reply_to":"5e967e31_7211586a","updated":"2026-12-02 10:04:01.000000000","message":"OK. lets do this in a later revision for reviewability","commit_id":"b7ca8636ece1901af1cca40fe09c2b433fbe27a0"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":true,"context_lines":[{"line_number":8829,"context_line":"        # earlier. Also, it should be safe to explode here, error becomes"},{"line_number":8830,"context_line":"        # NoValidHost and instance status remains ACTIVE."},{"line_number":8831,"context_line":"        try:"},{"line_number":8832,"context_line":"            self._validate_instance_group_policy(ctxt, instance)"},{"line_number":8833,"context_line":"        except exception.RescheduledException as e:"},{"line_number":8834,"context_line":"            msg \u003d (\"Failed to validate instance group policy \""},{"line_number":8835,"context_line":"                   \"due to: {}\".format(e))"}],"source_content_type":"text/x-python","patch_set":2,"id":"d6c178b6_bf47397b","line":8832,"in_reply_to":"62f2c4c4_94119774","updated":"2026-11-25 14:21:43.000000000","message":"I got your concerns.\n\nDo we have size limits somewhere in our RPC to worry about? Other than the obvious network bandwidth limits which I\u0027m not really afraid of here, given we are not sending a continuous stream of data here to keep things \"alive\". If there is a burst of live migration requests then the bandwidth limit might delay some messages to be transferred for couple of seconds, but the real live migration throughput is a lot more depends on the, one migration per compute default limit, the live migration network bandwidth, and the guest behavior. I think the RPC delay does not effect this significantly.\n\nThe alternatives can be looked at from architectural perspective. How do we structure our RPC interface. I think OVOs was added so that we can hide / encapsulate the back-leveling logic in a rolling upgrade scenario. So adding an OVO as a parameter could help our PRC handling in the future if more data is needed.\n\nAnother question is how likely we need more data in the live migration codepath form the RequestSpec object in the future. The RequestSpec is already sent in most of our heavy lifecycle actions (build, evac, unshelve, resize) to the compute. In a future scheduling related feature it will be probably temping to depend on RequestSpec as the data carrier given that it is available to most of our scheduling related lifecycle actions on the compute side too. Except live migration. So this will probably force us to handle the live migration codepath differently. That is not really appealing to me.\n\nI only suggested to work with the upcall problem now because we anyhow need to touch our RPC interface. So it is \"cheap\" to improve on the upcall logic. But overall I don\u0027t care much about the upcall. So if this becomes a distraction from the main goal, then I suggest to just ignore this problem for now.","commit_id":"b7ca8636ece1901af1cca40fe09c2b433fbe27a0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"249fb689e346cc38551ab33cdef5f90e181bd586","unresolved":true,"context_lines":[{"line_number":8829,"context_line":"        # earlier. Also, it should be safe to explode here, error becomes"},{"line_number":8830,"context_line":"        # NoValidHost and instance status remains ACTIVE."},{"line_number":8831,"context_line":"        try:"},{"line_number":8832,"context_line":"            self._validate_instance_group_policy(ctxt, instance)"},{"line_number":8833,"context_line":"        except exception.RescheduledException as e:"},{"line_number":8834,"context_line":"            msg \u003d (\"Failed to validate instance group policy \""},{"line_number":8835,"context_line":"                   \"due to: {}\".format(e))"}],"source_content_type":"text/x-python","patch_set":2,"id":"5e967e31_7211586a","line":8832,"in_reply_to":"d6c178b6_bf47397b","updated":"2026-11-25 19:35:27.000000000","message":"We certainly had problems with it in the past, although some of the ones I can think of were pathologically large. Total load from passing lots of stuff over RPC was definitely a thing causing high rabbit CPU usage at one point, and was part of the reason we did cellsv2 in the first place. Granted, computers are faster now and we have the sharding so maybe not as much of a concern anymore. Either way, just tossing objects into an RPC request because we need one field which we actually only care (currently) about truthiness is still worth critical consideration I think.\n\nI didn\u0027t realize we already pass ReqSpec down in so many other places though and if that\u0027s the case (I haven\u0027t gone looking to confirm) then I agree: just another log on the fire.\n\nI\u0027ve made a ton of change to this patch from the reviewed revision so let me hold off on addressing this since it\u0027s not strictly critical but let\u0027s circle back before we merge.","commit_id":"b7ca8636ece1901af1cca40fe09c2b433fbe27a0"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e43c560f79b45bb6e229418c6bd9c5914d529d2e","unresolved":true,"context_lines":[{"line_number":8829,"context_line":"        # earlier. Also, it should be safe to explode here, error becomes"},{"line_number":8830,"context_line":"        # NoValidHost and instance status remains ACTIVE."},{"line_number":8831,"context_line":"        try:"},{"line_number":8832,"context_line":"            self._validate_instance_group_policy(ctxt, instance)"},{"line_number":8833,"context_line":"        except exception.RescheduledException as e:"},{"line_number":8834,"context_line":"            msg \u003d (\"Failed to validate instance group policy \""},{"line_number":8835,"context_line":"                   \"due to: {}\".format(e))"}],"source_content_type":"text/x-python","patch_set":2,"id":"58c13a00_1f35413e","line":8832,"in_reply_to":"dec67ef9_48fe3d55","updated":"2026-11-11 16:11:25.000000000","message":"We commented in parallel. Yes, only fix it in v2.\nJust for reference https://review.opendev.org/c/openstack/nova/+/1015169 this is how it would look like for v1. But we don\u0027t want to spend time on v1.","commit_id":"b7ca8636ece1901af1cca40fe09c2b433fbe27a0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7ccee5af07ee0e53806e6177b01c1af59a347dc4","unresolved":true,"context_lines":[{"line_number":8829,"context_line":"        # earlier. Also, it should be safe to explode here, error becomes"},{"line_number":8830,"context_line":"        # NoValidHost and instance status remains ACTIVE."},{"line_number":8831,"context_line":"        try:"},{"line_number":8832,"context_line":"            self._validate_instance_group_policy(ctxt, instance)"},{"line_number":8833,"context_line":"        except exception.RescheduledException as e:"},{"line_number":8834,"context_line":"            msg \u003d (\"Failed to validate instance group policy \""},{"line_number":8835,"context_line":"                   \"due to: {}\".format(e))"}],"source_content_type":"text/x-python","patch_set":2,"id":"e978ce8b_ba158365","line":8832,"in_reply_to":"dec67ef9_48fe3d55","updated":"2026-11-11 16:06:08.000000000","message":"Yeah, for legacy it\u0027s a lot more involved because of the long RPC chains we have. It\u0027s much more straightforward for v2.\n\nIt\u0027s a long-standing issue with legacy so I see no reason to fix it at this point and cause the churn, and if we do, I\u0027d suggest we make it separate from this already pretty large patch. Are you really suggesting we fix legacy in this patch as well?","commit_id":"b7ca8636ece1901af1cca40fe09c2b433fbe27a0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"53dc0be08aa09ace0d813df5e646d6d7f1201682","unresolved":true,"context_lines":[{"line_number":10800,"context_line":"    def check_can_live_migrate_v2_destination(self, ctxt, instance,"},{"line_number":10801,"context_line":"                                              block_migration,"},{"line_number":10802,"context_line":"                                              disk_over_commit, migration,"},{"line_number":10803,"context_line":"                                              src_compute_info\u003dNone):"},{"line_number":10804,"context_line":"        \"\"\"Destination-side feasibility checks for v2 live migration."},{"line_number":10805,"context_line":""},{"line_number":10806,"context_line":"        Unlike check_can_live_migrate_destination, this does NOT call"}],"source_content_type":"text/x-python","patch_set":2,"id":"9232e41e_0925f938","line":10803,"updated":"2026-11-11 15:52:39.000000000","message":"Here.","commit_id":"b7ca8636ece1901af1cca40fe09c2b433fbe27a0"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":true,"context_lines":[{"line_number":9050,"context_line":"            raise exception.MigrationPreCheckError("},{"line_number":9051,"context_line":"                reason\u003de.format_message())"},{"line_number":9052,"context_line":"        if claim.claimed_numa_topology is None:"},{"line_number":9053,"context_line":"            return migrate_data"},{"line_number":9054,"context_line":"        return self.driver.post_claim_migrate_data(ctxt, instance,"},{"line_number":9055,"context_line":"                                                   migrate_data, claim)"},{"line_number":9056,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"21083493_aaaa3d39","line":9053,"updated":"2026-11-25 14:21:43.000000000","message":"This functionally looks correct. The post_claim_migrate_data() only cares about NUMA topology today. So if the VM does not have it the driver call is a no-op anyway. \n\nHowever the driver call is generically named to suggest any kind of post_claim migrate data gathering can happen there in the future. So I would feel more safe to move this bale out code to the libvirt driver side (only the libvirt driver implements this driver call today).","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e831a00866e9abbadd7d958cb963ee0d9c17d259","unresolved":false,"context_lines":[{"line_number":9050,"context_line":"            raise exception.MigrationPreCheckError("},{"line_number":9051,"context_line":"                reason\u003de.format_message())"},{"line_number":9052,"context_line":"        if claim.claimed_numa_topology is None:"},{"line_number":9053,"context_line":"            return migrate_data"},{"line_number":9054,"context_line":"        return self.driver.post_claim_migrate_data(ctxt, instance,"},{"line_number":9055,"context_line":"                                                   migrate_data, claim)"},{"line_number":9056,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"59603f0f_d56a67eb","line":9053,"in_reply_to":"21083493_aaaa3d39","updated":"2026-12-02 10:04:01.000000000","message":"Done in https://review.opendev.org/c/openstack/nova/+/1017485","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"8c1e16d6c3c53e0f83dd1625bdb45d099146d914","unresolved":false,"context_lines":[{"line_number":10483,"context_line":"    # conductor-orchestrated live migration flow (os-migrateLiveV2)."},{"line_number":10484,"context_line":"    # Conductor calls check_can_live_migrate_v2_source and live_migration_v2"},{"line_number":10485,"context_line":"    # via RPC. The post/rollback methods are invoked locally by the"},{"line_number":10486,"context_line":"    # driver\u0027s live_migration callbacks."},{"line_number":10487,"context_line":""},{"line_number":10488,"context_line":"    def check_can_live_migrate_v2_source(self, ctxt, instance,"},{"line_number":10489,"context_line":"                                         dest_check_data):"}],"source_content_type":"text/x-python","patch_set":6,"id":"33b19621_b8bf483f","line":10486,"updated":"2026-11-24 09:53:25.000000000","message":"I like this big fat comment even if it looks LLM-ish that said 😉","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":false,"context_lines":[{"line_number":10520,"context_line":"        :param migration: Migration object"},{"line_number":10521,"context_line":"        :param migrate_data: LiveMigrateData object"},{"line_number":10522,"context_line":"        \"\"\""},{"line_number":10523,"context_line":"        self._set_migration_status(migration, \u0027queued\u0027)"},{"line_number":10524,"context_line":"        self._waiting_live_migrations[instance.uuid] \u003d (None, None)"},{"line_number":10525,"context_line":"        try:"},{"line_number":10526,"context_line":"            future \u003d self._start_recorded_task("}],"source_content_type":"text/x-python","patch_set":6,"id":"44e99c96_d083ce31","line":10523,"updated":"2026-11-25 14:21:43.000000000","message":"OK this is the source Migration object and we are returning that form the API until while the migration is in progress..","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":true,"context_lines":[{"line_number":10521,"context_line":"        :param migrate_data: LiveMigrateData object"},{"line_number":10522,"context_line":"        \"\"\""},{"line_number":10523,"context_line":"        self._set_migration_status(migration, \u0027queued\u0027)"},{"line_number":10524,"context_line":"        self._waiting_live_migrations[instance.uuid] \u003d (None, None)"},{"line_number":10525,"context_line":"        try:"},{"line_number":10526,"context_line":"            future \u003d self._start_recorded_task("},{"line_number":10527,"context_line":"                thread_pool_factory.ExecutorType.LIVE_MIGRATION,"}],"source_content_type":"text/x-python","patch_set":6,"id":"a952119b_a02ca74e","line":10524,"updated":"2026-11-25 14:21:43.000000000","message":"Probably this is just lifted from the legacy path but it is strange that we set (None, None) We could set (migration, None). So if an abort arrives between L10524 and L10538 then it can properly update the migration object as well.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e831a00866e9abbadd7d958cb963ee0d9c17d259","unresolved":true,"context_lines":[{"line_number":10521,"context_line":"        :param migrate_data: LiveMigrateData object"},{"line_number":10522,"context_line":"        \"\"\""},{"line_number":10523,"context_line":"        self._set_migration_status(migration, \u0027queued\u0027)"},{"line_number":10524,"context_line":"        self._waiting_live_migrations[instance.uuid] \u003d (None, None)"},{"line_number":10525,"context_line":"        try:"},{"line_number":10526,"context_line":"            future \u003d self._start_recorded_task("},{"line_number":10527,"context_line":"                thread_pool_factory.ExecutorType.LIVE_MIGRATION,"}],"source_content_type":"text/x-python","patch_set":6,"id":"28c33959_80ffb8b9","line":10524,"in_reply_to":"04abafb0_0c27d531","updated":"2026-12-02 10:04:01.000000000","message":"Sure this is not critical. It think this is just as bad as v1 :). Lets take it separately. (I will keep the comment open to to track this for now)","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"249fb689e346cc38551ab33cdef5f90e181bd586","unresolved":true,"context_lines":[{"line_number":10521,"context_line":"        :param migrate_data: LiveMigrateData object"},{"line_number":10522,"context_line":"        \"\"\""},{"line_number":10523,"context_line":"        self._set_migration_status(migration, \u0027queued\u0027)"},{"line_number":10524,"context_line":"        self._waiting_live_migrations[instance.uuid] \u003d (None, None)"},{"line_number":10525,"context_line":"        try:"},{"line_number":10526,"context_line":"            future \u003d self._start_recorded_task("},{"line_number":10527,"context_line":"                thread_pool_factory.ExecutorType.LIVE_MIGRATION,"}],"source_content_type":"text/x-python","patch_set":6,"id":"04abafb0_0c27d531","line":10524,"in_reply_to":"a952119b_a02ca74e","updated":"2026-11-25 19:35:27.000000000","message":"It is mirrored from v1. I went down the path of changing this and ended up in somewhat of a rabbit hole that affected v1 more than I wanted. I think we can still clean this up and do better, but the abort path refreshing the migration object if things have already started is worth the expense I think. Can we punt this to potential improvement after we get the bulk of this into a good state?","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":false,"context_lines":[{"line_number":10556,"context_line":""},{"line_number":10557,"context_line":"        # Check if the migration was aborted while queued"},{"line_number":10558,"context_line":"        try:"},{"line_number":10559,"context_line":"            self._waiting_live_migrations.pop(instance.uuid)"},{"line_number":10560,"context_line":"        except KeyError:"},{"line_number":10561,"context_line":"            LOG.debug(\u0027Migration %s aborted by another process, rollback.\u0027,"},{"line_number":10562,"context_line":"                      migration.uuid, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":6,"id":"cf5bc55a_be4e2963","line":10559,"updated":"2026-11-25 14:21:43.000000000","message":"bah we are communicating / syncronizing between threads via a non atomic dict.pop() call. \n\n// later \n\nI learned today that dict.pop() is thread safe even in free-threaded mode. So move on, nothing to see here :D","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":true,"context_lines":[{"line_number":10581,"context_line":"            self.driver.live_migration(context, instance, dest,"},{"line_number":10582,"context_line":"                                       post_live_migration,"},{"line_number":10583,"context_line":"                                       rollback_live_migration,"},{"line_number":10584,"context_line":"                                       None, migrate_data)"},{"line_number":10585,"context_line":"        except Exception:"},{"line_number":10586,"context_line":"            LOG.exception(\u0027Live migration failed.\u0027, instance\u003dinstance)"},{"line_number":10587,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":6,"id":"d660c706_253c4f93","line":10584,"updated":"2026-11-25 14:21:43.000000000","message":"The driver interface could use a bit of cleaning. But just to be clear the block_migration flag passed here (as None) is unused really by the libvirt driver. The block migration decision is made based on the migrate_data.block_migration flag. \n\nThis might make sense to note in a comment.\n\nhttps://github.com/openstack/nova/blob/d471daf86930a5d9f046e7d128a7ac3f745d8407/nova/virt/libvirt/driver.py#L11337-L11361","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e831a00866e9abbadd7d958cb963ee0d9c17d259","unresolved":false,"context_lines":[{"line_number":10581,"context_line":"            self.driver.live_migration(context, instance, dest,"},{"line_number":10582,"context_line":"                                       post_live_migration,"},{"line_number":10583,"context_line":"                                       rollback_live_migration,"},{"line_number":10584,"context_line":"                                       None, migrate_data)"},{"line_number":10585,"context_line":"        except Exception:"},{"line_number":10586,"context_line":"            LOG.exception(\u0027Live migration failed.\u0027, instance\u003dinstance)"},{"line_number":10587,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":6,"id":"962ed6cf_b1cb7b93","line":10584,"in_reply_to":"d660c706_253c4f93","updated":"2026-12-02 10:04:01.000000000","message":"Done","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":true,"context_lines":[{"line_number":10594,"context_line":"    @wrap_exception()"},{"line_number":10595,"context_line":"    @wrap_instance_fault"},{"line_number":10596,"context_line":"    def _live_migration_v2_post_at_source(self, ctxt, instance, dest,"},{"line_number":10597,"context_line":"                                          block_migration\u003dFalse,"},{"line_number":10598,"context_line":"                                          migrate_data\u003dNone,"},{"line_number":10599,"context_line":"                                          source_bdms\u003dNone):"},{"line_number":10600,"context_line":"        \"\"\"Source-side cleanup after successful v2 live migration."}],"source_content_type":"text/x-python","patch_set":6,"id":"31decdc5_ebfa35aa","line":10597,"updated":"2026-11-25 14:21:43.000000000","message":"is this ever passed explicitly?","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":false,"context_lines":[{"line_number":10597,"context_line":"                                          block_migration\u003dFalse,"},{"line_number":10598,"context_line":"                                          migrate_data\u003dNone,"},{"line_number":10599,"context_line":"                                          source_bdms\u003dNone):"},{"line_number":10600,"context_line":"        \"\"\"Source-side cleanup after successful v2 live migration."},{"line_number":10601,"context_line":""},{"line_number":10602,"context_line":"        Activates destination port bindings, disconnects source volumes,"},{"line_number":10603,"context_line":"        unplugs source VIFs, frees PCI devices, and cleans up placement"}],"source_content_type":"text/x-python","patch_set":6,"id":"5d2561c6_aff111e9","line":10600,"updated":"2026-11-25 14:21:43.000000000","message":"We keep the same decision logic on the source about success: The live migration monitor will tell us based on the state of libvirt.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":true,"context_lines":[{"line_number":10604,"context_line":"        allocations. Unlike the old flow, does NOT RPC to the destination"},{"line_number":10605,"context_line":"        — the destination monitor thread handles finalization independently."},{"line_number":10606,"context_line":"        \"\"\""},{"line_number":10607,"context_line":"        LOG.info(\u0027_live_migration_v2_post_at_source() is started..\u0027,"},{"line_number":10608,"context_line":"                 instance\u003dinstance)"},{"line_number":10609,"context_line":""},{"line_number":10610,"context_line":"        # NOTE(artom) Port binding activation is time-critical to minimize"}],"source_content_type":"text/x-python","patch_set":6,"id":"f5e30027_c5141dbf","line":10607,"updated":"2026-11-25 14:21:43.000000000","message":"why the two dots at the end? Is this as em-dot? ;)\n\nDo we have a good log at the driver level about the decision that the migration succeeded from source perspective? If not then this would be a good place to log that decision. I.e. this is the place where there is no way back. \n\nBtw, I\u0027m wondering if at this point an abort arrives, what makes the abort rejected?","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e831a00866e9abbadd7d958cb963ee0d9c17d259","unresolved":false,"context_lines":[{"line_number":10604,"context_line":"        allocations. Unlike the old flow, does NOT RPC to the destination"},{"line_number":10605,"context_line":"        — the destination monitor thread handles finalization independently."},{"line_number":10606,"context_line":"        \"\"\""},{"line_number":10607,"context_line":"        LOG.info(\u0027_live_migration_v2_post_at_source() is started..\u0027,"},{"line_number":10608,"context_line":"                 instance\u003dinstance)"},{"line_number":10609,"context_line":""},{"line_number":10610,"context_line":"        # NOTE(artom) Port binding activation is time-critical to minimize"}],"source_content_type":"text/x-python","patch_set":6,"id":"923b4bf6_98dc0e1f","line":10607,"in_reply_to":"6f2b9954_30088099","updated":"2026-12-02 10:04:01.000000000","message":"thanks for the explanation, that clears it up for me. So at this point abort is no-op as the libvirt migration already finished so nothing to abort. good.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"249fb689e346cc38551ab33cdef5f90e181bd586","unresolved":true,"context_lines":[{"line_number":10604,"context_line":"        allocations. Unlike the old flow, does NOT RPC to the destination"},{"line_number":10605,"context_line":"        — the destination monitor thread handles finalization independently."},{"line_number":10606,"context_line":"        \"\"\""},{"line_number":10607,"context_line":"        LOG.info(\u0027_live_migration_v2_post_at_source() is started..\u0027,"},{"line_number":10608,"context_line":"                 instance\u003dinstance)"},{"line_number":10609,"context_line":""},{"line_number":10610,"context_line":"        # NOTE(artom) Port binding activation is time-critical to minimize"}],"source_content_type":"text/x-python","patch_set":6,"id":"6f2b9954_30088099","line":10607,"in_reply_to":"f5e30027_c5141dbf","updated":"2026-11-25 19:35:27.000000000","message":"It\u0027s a dan-dot.. used for me to string together streams of consciousness. But I think this converted from from some early debug logging by me into an info level useful log message without making it less DEBUGy.\n\n\u003e Btw, I\u0027m wondering if at this point an abort arrives, what makes the abort rejected?\n\nIt\u0027s a cast so it\u0027s not rejected as far as the API consumer is concerned. Do you mean what prevents it from interrupting us here? AFAIK, the abort just calls `driver.live_migration_abort()` which will not do anything if we\u0027re already here since there will be no libvirt job to abort. Canceling the future is only for aborting before start and won\u0027t have any effect on us here. Am I missing more context to the question?","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":true,"context_lines":[{"line_number":10642,"context_line":"                ctxt, instance, source_bdms)"},{"line_number":10643,"context_line":""},{"line_number":10644,"context_line":"        unplug_nw_info, destroy_vifs \u003d self._unplug_vifs_at_source("},{"line_number":10645,"context_line":"            ctxt, instance, network_info, migrate_data)"},{"line_number":10646,"context_line":""},{"line_number":10647,"context_line":"        # Free instance allocations on source before claims are allocated on"},{"line_number":10648,"context_line":"        # destination node"}],"source_content_type":"text/x-python","patch_set":6,"id":"151f6479_807940ff","line":10645,"updated":"2026-11-25 14:21:43.000000000","message":"here and below in this function. We don\u0027t have much error handling here. If some of these steps failing I guess we are leaking resources as there is no retry and the code don\u0027t even continue the cleanup logic below. This is something we need to improve on in a later cycle of the CCLM work. How should we track these TODOs?","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"249fb689e346cc38551ab33cdef5f90e181bd586","unresolved":true,"context_lines":[{"line_number":10642,"context_line":"                ctxt, instance, source_bdms)"},{"line_number":10643,"context_line":""},{"line_number":10644,"context_line":"        unplug_nw_info, destroy_vifs \u003d self._unplug_vifs_at_source("},{"line_number":10645,"context_line":"            ctxt, instance, network_info, migrate_data)"},{"line_number":10646,"context_line":""},{"line_number":10647,"context_line":"        # Free instance allocations on source before claims are allocated on"},{"line_number":10648,"context_line":"        # destination node"}],"source_content_type":"text/x-python","patch_set":6,"id":"965b57df_ab3986c9","line":10645,"in_reply_to":"151f6479_807940ff","updated":"2026-11-25 19:35:27.000000000","message":"I\u0027m pulling the non-critical (assuming a leak is non-critical) cleanup work into a separate function we can run with a diaper exception handler to prevent us from failing if any of it fails. I\u0027ll add a FIXME there saying we should try to do all the cleanup we can and not let one cleanup step prevent us from doing the rest. Sound okay?","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e831a00866e9abbadd7d958cb963ee0d9c17d259","unresolved":false,"context_lines":[{"line_number":10642,"context_line":"                ctxt, instance, source_bdms)"},{"line_number":10643,"context_line":""},{"line_number":10644,"context_line":"        unplug_nw_info, destroy_vifs \u003d self._unplug_vifs_at_source("},{"line_number":10645,"context_line":"            ctxt, instance, network_info, migrate_data)"},{"line_number":10646,"context_line":""},{"line_number":10647,"context_line":"        # Free instance allocations on source before claims are allocated on"},{"line_number":10648,"context_line":"        # destination node"}],"source_content_type":"text/x-python","patch_set":6,"id":"6ef25b2b_85241865","line":10645,"in_reply_to":"965b57df_ab3986c9","updated":"2026-12-02 10:04:01.000000000","message":"More than OK.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":true,"context_lines":[{"line_number":10644,"context_line":"        unplug_nw_info, destroy_vifs \u003d self._unplug_vifs_at_source("},{"line_number":10645,"context_line":"            ctxt, instance, network_info, migrate_data)"},{"line_number":10646,"context_line":""},{"line_number":10647,"context_line":"        # Free instance allocations on source before claims are allocated on"},{"line_number":10648,"context_line":"        # destination node"},{"line_number":10649,"context_line":"        self.rt.free_pci_device_allocations_for_instance(ctxt, instance)"},{"line_number":10650,"context_line":""},{"line_number":10651,"context_line":"        do_cleanup, destroy_disks \u003d self._live_migration_cleanup_flags("}],"source_content_type":"text/x-python","patch_set":6,"id":"c21a7e76_bd2887e3","line":10648,"range":{"start_line":10647,"start_character":46,"end_line":10648,"end_character":26},"updated":"2026-11-25 14:21:43.000000000","message":"This is not true any more, there is no time-ordering in v2 between source and dest at this stage. So:\n1. we need to amend the comment not to suggest such a thing\n2. we need to see that by removing that ordering we cause any trouble.\n\n//later \n\nFor the #2. I think it only affects the resource tracker and via that the pci_devices and the pools DB. The former is compute local data, but the latter is used for scheduling. But still at this point the source decide that the VM is gone. There is no way back, so the freed source PCI device is OK to be scheduled on.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e831a00866e9abbadd7d958cb963ee0d9c17d259","unresolved":false,"context_lines":[{"line_number":10644,"context_line":"        unplug_nw_info, destroy_vifs \u003d self._unplug_vifs_at_source("},{"line_number":10645,"context_line":"            ctxt, instance, network_info, migrate_data)"},{"line_number":10646,"context_line":""},{"line_number":10647,"context_line":"        # Free instance allocations on source before claims are allocated on"},{"line_number":10648,"context_line":"        # destination node"},{"line_number":10649,"context_line":"        self.rt.free_pci_device_allocations_for_instance(ctxt, instance)"},{"line_number":10650,"context_line":""},{"line_number":10651,"context_line":"        do_cleanup, destroy_disks \u003d self._live_migration_cleanup_flags("}],"source_content_type":"text/x-python","patch_set":6,"id":"5038b918_8bae8216","line":10648,"range":{"start_line":10647,"start_character":46,"end_line":10648,"end_character":26},"in_reply_to":"c21a7e76_bd2887e3","updated":"2026-12-02 10:04:01.000000000","message":"Done","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":true,"context_lines":[{"line_number":10649,"context_line":"        self.rt.free_pci_device_allocations_for_instance(ctxt, instance)"},{"line_number":10650,"context_line":""},{"line_number":10651,"context_line":"        do_cleanup, destroy_disks \u003d self._live_migration_cleanup_flags("},{"line_number":10652,"context_line":"            migrate_data, migr_ctxt\u003dinstance.migration_context)"},{"line_number":10653,"context_line":""},{"line_number":10654,"context_line":"        if do_cleanup:"},{"line_number":10655,"context_line":"            LOG.debug(\u0027Calling driver.cleanup from \u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"5b7a2f89_ae1151bd","line":10652,"updated":"2026-11-25 14:21:43.000000000","message":"This was a source of trouble in the past. Also this is architecturally unsound as the compute manager code looks into driver specific data objects. The compute manage should really always call down to the driver.cleanup and let the driver decide if anything needs to be cleaned or not.\n\nI\u0027m torn as this v2 work is a good opportunity to clean this up eventually. But don\u0027t want to block the first iteration of this work on this cleanup. Can we add  TODO here for a later cycle of the CCLM work to re-open this issue?","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e831a00866e9abbadd7d958cb963ee0d9c17d259","unresolved":false,"context_lines":[{"line_number":10649,"context_line":"        self.rt.free_pci_device_allocations_for_instance(ctxt, instance)"},{"line_number":10650,"context_line":""},{"line_number":10651,"context_line":"        do_cleanup, destroy_disks \u003d self._live_migration_cleanup_flags("},{"line_number":10652,"context_line":"            migrate_data, migr_ctxt\u003dinstance.migration_context)"},{"line_number":10653,"context_line":""},{"line_number":10654,"context_line":"        if do_cleanup:"},{"line_number":10655,"context_line":"            LOG.debug(\u0027Calling driver.cleanup from \u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"68fb94b3_b2c8b47c","line":10652,"in_reply_to":"3d1062c5_03da606a","updated":"2026-12-02 10:04:01.000000000","message":"Acknowledged","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"249fb689e346cc38551ab33cdef5f90e181bd586","unresolved":true,"context_lines":[{"line_number":10649,"context_line":"        self.rt.free_pci_device_allocations_for_instance(ctxt, instance)"},{"line_number":10650,"context_line":""},{"line_number":10651,"context_line":"        do_cleanup, destroy_disks \u003d self._live_migration_cleanup_flags("},{"line_number":10652,"context_line":"            migrate_data, migr_ctxt\u003dinstance.migration_context)"},{"line_number":10653,"context_line":""},{"line_number":10654,"context_line":"        if do_cleanup:"},{"line_number":10655,"context_line":"            LOG.debug(\u0027Calling driver.cleanup from \u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"3d1062c5_03da606a","line":10652,"in_reply_to":"5b7a2f89_ae1151bd","updated":"2026-11-25 19:35:27.000000000","message":"Ack, will add the TODO. It\u0027s hard to not try to fix all these warts in v2 but finding a balance is necessary I think. Part of proving this is doing the right thing is pointing to parity with v1. However, v1 is very warty :/","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":true,"context_lines":[{"line_number":10685,"context_line":"            # dest monitor updates the target cell\u0027s copy."},{"line_number":10686,"context_line":"            migrate_data.migration.status \u003d \u0027completed\u0027"},{"line_number":10687,"context_line":"            migrate_data.migration.save()"},{"line_number":10688,"context_line":"            self._delete_allocation_after_move(ctxt,"},{"line_number":10689,"context_line":"                                               instance,"},{"line_number":10690,"context_line":"                                               migrate_data.migration)"},{"line_number":10691,"context_line":"            if migrate_data.migration.cross_cell_move:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3866a116_356beb46","line":10688,"updated":"2026-11-25 14:21:43.000000000","message":"This is the point where we signal in placement that the source decided that the migration succeeded. This is fairly late in the cleanup process. There is a period when the the driver and then the compute manager already decided that the migration succeeded and stars actively destroying things, and the point here where we signal that to the outside world. This makes me uneasy at least a bit. \n\nThe dest monitors this allocation to decide about success or failure. If anything happens between the success decision on the source and this point of notifying placement about it then the dest will never declare success even if the source already made the decision, deleted stuff, but failed to notify placement.\n\nI think we need to move our placement update to as early to the decision making point as possible to reduce this race window.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"249fb689e346cc38551ab33cdef5f90e181bd586","unresolved":true,"context_lines":[{"line_number":10685,"context_line":"            # dest monitor updates the target cell\u0027s copy."},{"line_number":10686,"context_line":"            migrate_data.migration.status \u003d \u0027completed\u0027"},{"line_number":10687,"context_line":"            migrate_data.migration.save()"},{"line_number":10688,"context_line":"            self._delete_allocation_after_move(ctxt,"},{"line_number":10689,"context_line":"                                               instance,"},{"line_number":10690,"context_line":"                                               migrate_data.migration)"},{"line_number":10691,"context_line":"            if migrate_data.migration.cross_cell_move:"}],"source_content_type":"text/x-python","patch_set":6,"id":"99c32b8f_dc181c99","line":10688,"in_reply_to":"3866a116_356beb46","updated":"2026-11-25 19:35:27.000000000","message":"Yep, good call. I think the most important thing is that we activate the destination port bindings first as that has network outage latency impacts on the instance. But right after that, we should signal success. I also think that even if we fail to do that, we should signal success as (AIUI) in the OVN case we\u0027re actually splitting the network to both so what we really want is to have the destination keep the instance even if we were unable to finish the port binding cleanup.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e831a00866e9abbadd7d958cb963ee0d9c17d259","unresolved":false,"context_lines":[{"line_number":10685,"context_line":"            # dest monitor updates the target cell\u0027s copy."},{"line_number":10686,"context_line":"            migrate_data.migration.status \u003d \u0027completed\u0027"},{"line_number":10687,"context_line":"            migrate_data.migration.save()"},{"line_number":10688,"context_line":"            self._delete_allocation_after_move(ctxt,"},{"line_number":10689,"context_line":"                                               instance,"},{"line_number":10690,"context_line":"                                               migrate_data.migration)"},{"line_number":10691,"context_line":"            if migrate_data.migration.cross_cell_move:"}],"source_content_type":"text/x-python","patch_set":6,"id":"cadb8c37_a309b439","line":10688,"in_reply_to":"99c32b8f_dc181c99","updated":"2026-12-02 10:04:01.000000000","message":"make sense.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":true,"context_lines":[{"line_number":10699,"context_line":""},{"line_number":10700,"context_line":"    def _live_migration_v2_rollback_at_source(self, context, instance,"},{"line_number":10701,"context_line":"                                              dest, migrate_data\u003dNone,"},{"line_number":10702,"context_line":"                                              migration_status\u003d\u0027failed\u0027,"},{"line_number":10703,"context_line":"                                              source_bdms\u003dNone,"},{"line_number":10704,"context_line":"                                              pre_live_migration\u003dFalse):"},{"line_number":10705,"context_line":"        \"\"\"Source-side rollback for v2 live migration."}],"source_content_type":"text/x-python","patch_set":6,"id":"825b08ac_47c1ab34","line":10702,"updated":"2026-11-25 14:21:43.000000000","message":"is this ever passed explictily? ... hm maybe the libvirt driver passes it...","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":true,"context_lines":[{"line_number":10701,"context_line":"                                              dest, migrate_data\u003dNone,"},{"line_number":10702,"context_line":"                                              migration_status\u003d\u0027failed\u0027,"},{"line_number":10703,"context_line":"                                              source_bdms\u003dNone,"},{"line_number":10704,"context_line":"                                              pre_live_migration\u003dFalse):"},{"line_number":10705,"context_line":"        \"\"\"Source-side rollback for v2 live migration."},{"line_number":10706,"context_line":""},{"line_number":10707,"context_line":"        Same structure as _rollback_live_migration but does NOT RPC to the"}],"source_content_type":"text/x-python","patch_set":6,"id":"1d5fb12e_876927eb","line":10704,"updated":"2026-11-25 14:21:43.000000000","message":"Is this param ever passed? I think it isn\u0027t so we should be able to remove it. Or does it mean we have a missing case when we should call this with pre_live_migration\u003dTrue?","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"249fb689e346cc38551ab33cdef5f90e181bd586","unresolved":true,"context_lines":[{"line_number":10701,"context_line":"                                              dest, migrate_data\u003dNone,"},{"line_number":10702,"context_line":"                                              migration_status\u003d\u0027failed\u0027,"},{"line_number":10703,"context_line":"                                              source_bdms\u003dNone,"},{"line_number":10704,"context_line":"                                              pre_live_migration\u003dFalse):"},{"line_number":10705,"context_line":"        \"\"\"Source-side rollback for v2 live migration."},{"line_number":10706,"context_line":""},{"line_number":10707,"context_line":"        Same structure as _rollback_live_migration but does NOT RPC to the"}],"source_content_type":"text/x-python","patch_set":6,"id":"a1392418_e5af8d72","line":10704,"in_reply_to":"1d5fb12e_876927eb","updated":"2026-11-25 19:35:27.000000000","message":"No it means it is entirely uncooked copy-pasta :)","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e831a00866e9abbadd7d958cb963ee0d9c17d259","unresolved":false,"context_lines":[{"line_number":10701,"context_line":"                                              dest, migrate_data\u003dNone,"},{"line_number":10702,"context_line":"                                              migration_status\u003d\u0027failed\u0027,"},{"line_number":10703,"context_line":"                                              source_bdms\u003dNone,"},{"line_number":10704,"context_line":"                                              pre_live_migration\u003dFalse):"},{"line_number":10705,"context_line":"        \"\"\"Source-side rollback for v2 live migration."},{"line_number":10706,"context_line":""},{"line_number":10707,"context_line":"        Same structure as _rollback_live_migration but does NOT RPC to the"}],"source_content_type":"text/x-python","patch_set":6,"id":"7e5f179d_62382a79","line":10704,"in_reply_to":"a1392418_e5af8d72","updated":"2026-12-02 10:04:01.000000000","message":"Done","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":false,"context_lines":[{"line_number":10722,"context_line":""},{"line_number":10723,"context_line":"        if migration:"},{"line_number":10724,"context_line":"            # Remove allocations created in Placement for the dest node."},{"line_number":10725,"context_line":"            self._revert_allocation(context, instance, migration)"},{"line_number":10726,"context_line":"        else:"},{"line_number":10727,"context_line":"            LOG.error(\u0027Unable to revert allocations during live migration \u0027"},{"line_number":10728,"context_line":"                      \u0027rollback; compute driver did not provide migrate_data\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"e1cc421b_7a5af006","line":10725,"updated":"2026-11-25 14:21:43.000000000","message":"OK, this is at least pretty close to the decision making point of the  rollback.\n\nAlso this shows (with the above success handler) that the allocation management is owned by the source compute. That is good that we do not try to spread it. So the dest handlers should only read the placement allocation to help deciding what to do and never write it.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":true,"context_lines":[{"line_number":10714,"context_line":"            objects.InstancePCIRequests.get_by_instance_uuid("},{"line_number":10715,"context_line":"                context, instance.uuid)"},{"line_number":10716,"context_line":""},{"line_number":10717,"context_line":"        if (isinstance(migrate_data, migrate_data_obj.LiveMigrateData) and"},{"line_number":10718,"context_line":"              migrate_data.obj_attr_is_set(\u0027migration\u0027)):"},{"line_number":10719,"context_line":"            migration \u003d migrate_data.migration"},{"line_number":10720,"context_line":"        else:"},{"line_number":10721,"context_line":"            migration \u003d None"},{"line_number":10722,"context_line":""},{"line_number":10723,"context_line":"        if migration:"},{"line_number":10724,"context_line":"            # Remove allocations created in Placement for the dest node."},{"line_number":10725,"context_line":"            self._revert_allocation(context, instance, migration)"},{"line_number":10726,"context_line":"        else:"},{"line_number":10727,"context_line":"            LOG.error(\u0027Unable to revert allocations during live migration \u0027"},{"line_number":10728,"context_line":"                      \u0027rollback; compute driver did not provide migrate_data\u0027,"},{"line_number":10729,"context_line":"                      instance\u003dinstance)"},{"line_number":10730,"context_line":""},{"line_number":10731,"context_line":"        # NOTE(tr3buchet): setup networks on source host (re-setup)"},{"line_number":10732,"context_line":"        # NOTE(mriedem): This is a no-op for neutron."}],"source_content_type":"text/x-python","patch_set":6,"id":"c5b8d3a9_b2f0db56","line":10729,"range":{"start_line":10717,"start_character":0,"end_line":10729,"end_character":40},"updated":"2026-11-25 14:21:43.000000000","message":"I think we can avoid all this edge case handling by simply passing the migration object to _live_migration_v2_rollback_at_source","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"249fb689e346cc38551ab33cdef5f90e181bd586","unresolved":false,"context_lines":[{"line_number":10714,"context_line":"            objects.InstancePCIRequests.get_by_instance_uuid("},{"line_number":10715,"context_line":"                context, instance.uuid)"},{"line_number":10716,"context_line":""},{"line_number":10717,"context_line":"        if (isinstance(migrate_data, migrate_data_obj.LiveMigrateData) and"},{"line_number":10718,"context_line":"              migrate_data.obj_attr_is_set(\u0027migration\u0027)):"},{"line_number":10719,"context_line":"            migration \u003d migrate_data.migration"},{"line_number":10720,"context_line":"        else:"},{"line_number":10721,"context_line":"            migration \u003d None"},{"line_number":10722,"context_line":""},{"line_number":10723,"context_line":"        if migration:"},{"line_number":10724,"context_line":"            # Remove allocations created in Placement for the dest node."},{"line_number":10725,"context_line":"            self._revert_allocation(context, instance, migration)"},{"line_number":10726,"context_line":"        else:"},{"line_number":10727,"context_line":"            LOG.error(\u0027Unable to revert allocations during live migration \u0027"},{"line_number":10728,"context_line":"                      \u0027rollback; compute driver did not provide migrate_data\u0027,"},{"line_number":10729,"context_line":"                      instance\u003dinstance)"},{"line_number":10730,"context_line":""},{"line_number":10731,"context_line":"        # NOTE(tr3buchet): setup networks on source host (re-setup)"},{"line_number":10732,"context_line":"        # NOTE(mriedem): This is a no-op for neutron."}],"source_content_type":"text/x-python","patch_set":6,"id":"d1ec9914_19d6d6de","line":10729,"range":{"start_line":10717,"start_character":0,"end_line":10729,"end_character":40},"in_reply_to":"c5b8d3a9_b2f0db56","updated":"2026-11-25 19:35:27.000000000","message":"Acknowledged","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":true,"context_lines":[{"line_number":10729,"context_line":"                      instance\u003dinstance)"},{"line_number":10730,"context_line":""},{"line_number":10731,"context_line":"        # NOTE(tr3buchet): setup networks on source host (re-setup)"},{"line_number":10732,"context_line":"        # NOTE(mriedem): This is a no-op for neutron."},{"line_number":10733,"context_line":"        self.network_api.setup_networks_on_host(context, instance, self.host)"},{"line_number":10734,"context_line":""},{"line_number":10735,"context_line":"        # NOTE(erlon): Skip rollback_live_migration_at_src during"}],"source_content_type":"text/x-python","patch_set":6,"id":"79c36140_86697072","line":10732,"updated":"2026-11-25 14:21:43.000000000","message":"supernit: if this is no-op for neutron and we know that there is no other things today that neutron then maybe it is an easy cleanup to do. (Fine to do it separately)","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"249fb689e346cc38551ab33cdef5f90e181bd586","unresolved":true,"context_lines":[{"line_number":10729,"context_line":"                      instance\u003dinstance)"},{"line_number":10730,"context_line":""},{"line_number":10731,"context_line":"        # NOTE(tr3buchet): setup networks on source host (re-setup)"},{"line_number":10732,"context_line":"        # NOTE(mriedem): This is a no-op for neutron."},{"line_number":10733,"context_line":"        self.network_api.setup_networks_on_host(context, instance, self.host)"},{"line_number":10734,"context_line":""},{"line_number":10735,"context_line":"        # NOTE(erlon): Skip rollback_live_migration_at_src during"}],"source_content_type":"text/x-python","patch_set":6,"id":"8b69f399_8e3ff23a","line":10732,"in_reply_to":"79c36140_86697072","updated":"2026-11-25 19:35:27.000000000","message":"Ack, I don\u0027t know anything about it being a no-op for neutron other than the comment here so I\u0027m hesitant to remove it. I\u0027ll note that I suspect the earlier comment is from nova-network days and maybe the second one from matt is from transition days, so I\u0027d believe it\u0027s not necessary. Maybe we could follow up and remove it from both paths without any drama.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e831a00866e9abbadd7d958cb963ee0d9c17d259","unresolved":true,"context_lines":[{"line_number":10729,"context_line":"                      instance\u003dinstance)"},{"line_number":10730,"context_line":""},{"line_number":10731,"context_line":"        # NOTE(tr3buchet): setup networks on source host (re-setup)"},{"line_number":10732,"context_line":"        # NOTE(mriedem): This is a no-op for neutron."},{"line_number":10733,"context_line":"        self.network_api.setup_networks_on_host(context, instance, self.host)"},{"line_number":10734,"context_line":""},{"line_number":10735,"context_line":"        # NOTE(erlon): Skip rollback_live_migration_at_src during"}],"source_content_type":"text/x-python","patch_set":6,"id":"ff6dfd7c_6140e504","line":10732,"in_reply_to":"8b69f399_8e3ff23a","updated":"2026-12-02 10:04:01.000000000","message":"yepp lets have this as a followup. (keeping the comment open for tracking)","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":true,"context_lines":[{"line_number":10734,"context_line":""},{"line_number":10735,"context_line":"        # NOTE(erlon): Skip rollback_live_migration_at_src during"},{"line_number":10736,"context_line":"        # pre_live_migration rollback as interfaces were not detached yet."},{"line_number":10737,"context_line":"        if not pre_live_migration:"},{"line_number":10738,"context_line":"            self.driver.rollback_live_migration_at_source(context, instance,"},{"line_number":10739,"context_line":"                                                          migrate_data)"},{"line_number":10740,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"b5c6bcb4_4b31429b","line":10737,"updated":"2026-11-25 14:21:43.000000000","message":"I think pre_live_migration is never True in the current patch","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"249fb689e346cc38551ab33cdef5f90e181bd586","unresolved":false,"context_lines":[{"line_number":10734,"context_line":""},{"line_number":10735,"context_line":"        # NOTE(erlon): Skip rollback_live_migration_at_src during"},{"line_number":10736,"context_line":"        # pre_live_migration rollback as interfaces were not detached yet."},{"line_number":10737,"context_line":"        if not pre_live_migration:"},{"line_number":10738,"context_line":"            self.driver.rollback_live_migration_at_source(context, instance,"},{"line_number":10739,"context_line":"                                                          migrate_data)"},{"line_number":10740,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"af1466f6_e13c4b67","line":10737,"in_reply_to":"b5c6bcb4_4b31429b","updated":"2026-11-25 19:35:27.000000000","message":"Acknowledged","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":true,"context_lines":[{"line_number":10746,"context_line":"                context, instance.uuid)"},{"line_number":10747,"context_line":"        vol_bdms \u003d [bdm for bdm in bdms if bdm.is_volume]"},{"line_number":10748,"context_line":""},{"line_number":10749,"context_line":"        if not pre_live_migration:"},{"line_number":10750,"context_line":"            self._remove_remote_volume_connections("},{"line_number":10751,"context_line":"                context, dest, vol_bdms, instance)"},{"line_number":10752,"context_line":"        self._rollback_volume_bdms(context, vol_bdms, source_bdms, instance)"}],"source_content_type":"text/x-python","patch_set":6,"id":"f3890ca4_3b0fb696","line":10749,"updated":"2026-11-25 14:21:43.000000000","message":"ditto","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"249fb689e346cc38551ab33cdef5f90e181bd586","unresolved":false,"context_lines":[{"line_number":10746,"context_line":"                context, instance.uuid)"},{"line_number":10747,"context_line":"        vol_bdms \u003d [bdm for bdm in bdms if bdm.is_volume]"},{"line_number":10748,"context_line":""},{"line_number":10749,"context_line":"        if not pre_live_migration:"},{"line_number":10750,"context_line":"            self._remove_remote_volume_connections("},{"line_number":10751,"context_line":"                context, dest, vol_bdms, instance)"},{"line_number":10752,"context_line":"        self._rollback_volume_bdms(context, vol_bdms, source_bdms, instance)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ad4ef816_87c99458","line":10749,"in_reply_to":"f3890ca4_3b0fb696","updated":"2026-11-25 19:35:27.000000000","message":"Acknowledged","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"798266850f3b07ab1611c2f3005c5c70fb3e7f34","unresolved":true,"context_lines":[{"line_number":10747,"context_line":"        vol_bdms \u003d [bdm for bdm in bdms if bdm.is_volume]"},{"line_number":10748,"context_line":""},{"line_number":10749,"context_line":"        if not pre_live_migration:"},{"line_number":10750,"context_line":"            self._remove_remote_volume_connections("},{"line_number":10751,"context_line":"                context, dest, vol_bdms, instance)"},{"line_number":10752,"context_line":"        self._rollback_volume_bdms(context, vol_bdms, source_bdms, instance)"},{"line_number":10753,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"773fcffc_4c650371","line":10750,"updated":"2026-11-25 14:09:39.000000000","message":"Note that much of this is copy-pasta from v1 and not tested because I haven\u0027t tried failed migrations with volumes of course. While going down the rabbit hole of cleaning up local resource allocations I realized this. So just FYI to not worry about this part just yet.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":false,"context_lines":[{"line_number":10764,"context_line":"        instance.task_state \u003d None"},{"line_number":10765,"context_line":"        instance.progress \u003d 0"},{"line_number":10766,"context_line":"        instance.drop_migration_context()"},{"line_number":10767,"context_line":"        instance.save(expected_task_state\u003d[task_states.MIGRATING])"},{"line_number":10768,"context_line":""},{"line_number":10769,"context_line":"        self._notify_about_instance_usage(context, instance,"},{"line_number":10770,"context_line":"                                          \"live_migration._rollback.end\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"4fbc5f30_84eeb84d","line":10767,"updated":"2026-11-25 14:21:43.000000000","message":"* so at rollback the source instance object remains valid so we need this update on the source object here.\n* in the success case above we just hard deleted the source object triggering nova to use the dest object. So the dest success handled expected to update the dest object state a similar way.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":true,"context_lines":[{"line_number":10796,"context_line":"        :returns: dest_check_data from the virt driver"},{"line_number":10797,"context_line":"        \"\"\""},{"line_number":10798,"context_line":"        return self._check_can_live_migrate_at_dest("},{"line_number":10799,"context_line":"            ctxt, instance, None, False,"},{"line_number":10800,"context_line":"            src_compute_info\u003dsrc_compute_info)"},{"line_number":10801,"context_line":""},{"line_number":10802,"context_line":"    @wrap_exception()"}],"source_content_type":"text/x-python","patch_set":6,"id":"0e65a37a_c6a53952","line":10799,"updated":"2026-11-25 14:21:43.000000000","message":"probably a similar comment than requested for _do_live_migration_v2() make sense here too. With the addition that None here means auto detection.\n\nSee https://github.com/openstack/nova/blob/d471daf86930a5d9f046e7d128a7ac3f745d8407/nova/compute/manager.py#L8820-L8823\n\nBtw, should we set None to disk_over_commit too? I think that is how the new microversion in the legacy API action fills it\n\nhttps://github.com/openstack/nova/blob/d471daf86930a5d9f046e7d128a7ac3f745d8407/nova/api/openstack/compute/migrate_server.py#L125-L131","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"249fb689e346cc38551ab33cdef5f90e181bd586","unresolved":true,"context_lines":[{"line_number":10796,"context_line":"        :returns: dest_check_data from the virt driver"},{"line_number":10797,"context_line":"        \"\"\""},{"line_number":10798,"context_line":"        return self._check_can_live_migrate_at_dest("},{"line_number":10799,"context_line":"            ctxt, instance, None, False,"},{"line_number":10800,"context_line":"            src_compute_info\u003dsrc_compute_info)"},{"line_number":10801,"context_line":""},{"line_number":10802,"context_line":"    @wrap_exception()"}],"source_content_type":"text/x-python","patch_set":6,"id":"21382d7d_39a574c2","line":10799,"in_reply_to":"0e65a37a_c6a53952","updated":"2026-11-25 19:35:27.000000000","message":"Yes, None. I think I picked the wrong thing (with my stupid meat-based brain and hands) when I flattened this out of the RPC interface.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e831a00866e9abbadd7d958cb963ee0d9c17d259","unresolved":false,"context_lines":[{"line_number":10796,"context_line":"        :returns: dest_check_data from the virt driver"},{"line_number":10797,"context_line":"        \"\"\""},{"line_number":10798,"context_line":"        return self._check_can_live_migrate_at_dest("},{"line_number":10799,"context_line":"            ctxt, instance, None, False,"},{"line_number":10800,"context_line":"            src_compute_info\u003dsrc_compute_info)"},{"line_number":10801,"context_line":""},{"line_number":10802,"context_line":"    @wrap_exception()"}],"source_content_type":"text/x-python","patch_set":6,"id":"2f4a2882_e9cc8a03","line":10799,"in_reply_to":"21382d7d_39a574c2","updated":"2026-12-02 10:04:01.000000000","message":"Done","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"8c1e16d6c3c53e0f83dd1625bdb45d099146d914","unresolved":true,"context_lines":[{"line_number":10802,"context_line":"    @wrap_exception()"},{"line_number":10803,"context_line":"    @wrap_instance_event(prefix\u003d\u0027compute\u0027)"},{"line_number":10804,"context_line":"    @wrap_instance_fault"},{"line_number":10805,"context_line":"    @manager.skip_automatic_rpc_tracking"},{"line_number":10806,"context_line":"    def setup_live_migration_v2_at_dest(self, ctxt, instance, migrate_data,"},{"line_number":10807,"context_line":"                                        migration, limits, dest_check_data):"},{"line_number":10808,"context_line":"        \"\"\"Prepare the destination for v2 live migration."}],"source_content_type":"text/x-python","patch_set":6,"id":"61ce3e1f_c4d1193d","line":10805,"updated":"2026-11-24 09:53:25.000000000","message":"should we keep automatic RPC tracking here? Destination preparation runs synchronously, but the monitor is only recorded at the end. With this decorator, a graceful shutdown during volume/driver setup or the VIF wait can let manager cleanup begin while preparation is still running. Do you really want to abort the live-migration on the destination side during that phase ?","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b15d9a0dd49dca1487fa3139649238261ebc4261","unresolved":true,"context_lines":[{"line_number":10802,"context_line":"    @wrap_exception()"},{"line_number":10803,"context_line":"    @wrap_instance_event(prefix\u003d\u0027compute\u0027)"},{"line_number":10804,"context_line":"    @wrap_instance_fault"},{"line_number":10805,"context_line":"    @manager.skip_automatic_rpc_tracking"},{"line_number":10806,"context_line":"    def setup_live_migration_v2_at_dest(self, ctxt, instance, migrate_data,"},{"line_number":10807,"context_line":"                                        migration, limits, dest_check_data):"},{"line_number":10808,"context_line":"        \"\"\"Prepare the destination for v2 live migration."}],"source_content_type":"text/x-python","patch_set":6,"id":"fcc9abca_45e94f56","line":10805,"in_reply_to":"61ce3e1f_c4d1193d","updated":"2026-11-24 18:24:12.000000000","message":"I\u0027ll punt to @gmaan.os14@gmail.com first before trying to grok the whole scenario. I think we do probably wan to skip it because we\u0027re starting the task explicitly below to continue past when this RPC call is finished (while the dest waits for some outcome).","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"6d2f7fb10dad90df1fd1f41ea92187e16dd67bb4","unresolved":true,"context_lines":[{"line_number":10802,"context_line":"    @wrap_exception()"},{"line_number":10803,"context_line":"    @wrap_instance_event(prefix\u003d\u0027compute\u0027)"},{"line_number":10804,"context_line":"    @wrap_instance_fault"},{"line_number":10805,"context_line":"    @manager.skip_automatic_rpc_tracking"},{"line_number":10806,"context_line":"    def setup_live_migration_v2_at_dest(self, ctxt, instance, migrate_data,"},{"line_number":10807,"context_line":"                                        migration, limits, dest_check_data):"},{"line_number":10808,"context_line":"        \"\"\"Prepare the destination for v2 live migration."}],"source_content_type":"text/x-python","patch_set":6,"id":"0d673456_9a34fcf3","line":10805,"in_reply_to":"fc10fe3e_fee3ccaf","updated":"2026-11-30 18:20:07.000000000","message":"Yeah, skipping RPC tracking and not starting the live migration task at the start here leaving the task untracked. The setup work should be tracked as part of a single task \u0027live_migration_v2_at_dest\u0027 at dest which can include the monitoring of live migration. As this code is refactored in latest PS, I am commenting there.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"eddba413d9dee4923627811636e4c8f6878d04c1","unresolved":true,"context_lines":[{"line_number":10802,"context_line":"    @wrap_exception()"},{"line_number":10803,"context_line":"    @wrap_instance_event(prefix\u003d\u0027compute\u0027)"},{"line_number":10804,"context_line":"    @wrap_instance_fault"},{"line_number":10805,"context_line":"    @manager.skip_automatic_rpc_tracking"},{"line_number":10806,"context_line":"    def setup_live_migration_v2_at_dest(self, ctxt, instance, migrate_data,"},{"line_number":10807,"context_line":"                                        migration, limits, dest_check_data):"},{"line_number":10808,"context_line":"        \"\"\"Prepare the destination for v2 live migration."}],"source_content_type":"text/x-python","patch_set":6,"id":"fc10fe3e_fee3ccaf","line":10805,"in_reply_to":"fcc9abca_45e94f56","updated":"2026-11-25 08:38:05.000000000","message":"agreed that the monitor needs its own record after the RPC call returns. My concern is the earlier time: setup runs before that record exists. Keeping automatic RPC tracking would cover setup, then the monitor’s explicit record would take over before the RPC call ends.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":true,"context_lines":[{"line_number":10834,"context_line":"                ctxt, instance, migrate_data, dest_check_data,"},{"line_number":10835,"context_line":"                migration, limits, allocs, force_claim\u003dTrue)"},{"line_number":10836,"context_line":"        finally:"},{"line_number":10837,"context_line":"            if dest_check_data:"},{"line_number":10838,"context_line":"                self.driver.cleanup_live_migration_destination_check("},{"line_number":10839,"context_line":"                    ctxt, dest_check_data)"},{"line_number":10840,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"8bfc4980_336ef7d9","line":10837,"updated":"2026-11-25 14:21:43.000000000","message":"how can be this empty for v2? Can we make is always non-empty and remove the conditional?","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b7df960f24e7379c59d29e2dfecfd380f200d327","unresolved":false,"context_lines":[{"line_number":10834,"context_line":"                ctxt, instance, migrate_data, dest_check_data,"},{"line_number":10835,"context_line":"                migration, limits, allocs, force_claim\u003dTrue)"},{"line_number":10836,"context_line":"        finally:"},{"line_number":10837,"context_line":"            if dest_check_data:"},{"line_number":10838,"context_line":"                self.driver.cleanup_live_migration_destination_check("},{"line_number":10839,"context_line":"                    ctxt, dest_check_data)"},{"line_number":10840,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"39e33e26_2391c7af","line":10837,"in_reply_to":"08b91e76_b0bea6c9","updated":"2026-12-02 15:38:58.000000000","message":"Done","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"249fb689e346cc38551ab33cdef5f90e181bd586","unresolved":true,"context_lines":[{"line_number":10834,"context_line":"                ctxt, instance, migrate_data, dest_check_data,"},{"line_number":10835,"context_line":"                migration, limits, allocs, force_claim\u003dTrue)"},{"line_number":10836,"context_line":"        finally:"},{"line_number":10837,"context_line":"            if dest_check_data:"},{"line_number":10838,"context_line":"                self.driver.cleanup_live_migration_destination_check("},{"line_number":10839,"context_line":"                    ctxt, dest_check_data)"},{"line_number":10840,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"08b91e76_b0bea6c9","line":10837,"in_reply_to":"8bfc4980_336ef7d9","updated":"2026-11-25 19:35:27.000000000","message":"Yup.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"8c1e16d6c3c53e0f83dd1625bdb45d099146d914","unresolved":true,"context_lines":[{"line_number":10870,"context_line":"                    instance, events, timeout\u003dtimeout,"},{"line_number":10871,"context_line":"                    error_callback\u003derror_cb):"},{"line_number":10872,"context_line":"                migrate_data \u003d self._setup_destination_for_live_migration("},{"line_number":10873,"context_line":"                    ctxt, instance, disk, migrate_data, bdms, network_info)"},{"line_number":10874,"context_line":"                wait_for_vif_plugged \u003d ("},{"line_number":10875,"context_line":"                    \u0027wait_for_vif_plugged\u0027 in migrate_data and"},{"line_number":10876,"context_line":"                    migrate_data.wait_for_vif_plugged)"}],"source_content_type":"text/x-python","patch_set":6,"id":"c8ca4efd_12f82cf8","line":10873,"updated":"2026-11-24 09:53:25.000000000","message":"in case of a VIF wait failing, I don\u0027t see where we cleanup the resources here ?","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c8a83128a8aed4b16ed2867141ed62983e6cd605","unresolved":true,"context_lines":[{"line_number":10870,"context_line":"                    instance, events, timeout\u003dtimeout,"},{"line_number":10871,"context_line":"                    error_callback\u003derror_cb):"},{"line_number":10872,"context_line":"                migrate_data \u003d self._setup_destination_for_live_migration("},{"line_number":10873,"context_line":"                    ctxt, instance, disk, migrate_data, bdms, network_info)"},{"line_number":10874,"context_line":"                wait_for_vif_plugged \u003d ("},{"line_number":10875,"context_line":"                    \u0027wait_for_vif_plugged\u0027 in migrate_data and"},{"line_number":10876,"context_line":"                    migrate_data.wait_for_vif_plugged)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7baacb1c_f0f37435","line":10873,"in_reply_to":"5b69f3b8_b1ba58ec","updated":"2026-11-24 19:25:39.000000000","message":"Actually, we\u0027re not going to hard-delete in the case of same-cell of course, so ignore that part :P","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"eddba413d9dee4923627811636e4c8f6878d04c1","unresolved":true,"context_lines":[{"line_number":10870,"context_line":"                    instance, events, timeout\u003dtimeout,"},{"line_number":10871,"context_line":"                    error_callback\u003derror_cb):"},{"line_number":10872,"context_line":"                migrate_data \u003d self._setup_destination_for_live_migration("},{"line_number":10873,"context_line":"                    ctxt, instance, disk, migrate_data, bdms, network_info)"},{"line_number":10874,"context_line":"                wait_for_vif_plugged \u003d ("},{"line_number":10875,"context_line":"                    \u0027wait_for_vif_plugged\u0027 in migrate_data and"},{"line_number":10876,"context_line":"                    migrate_data.wait_for_vif_plugged)"}],"source_content_type":"text/x-python","patch_set":6,"id":"a4e06272_4fce2643","line":10873,"in_reply_to":"7baacb1c_f0f37435","updated":"2026-11-25 08:38:05.000000000","message":"yup, the issue arises for both cases (same-cell and cross-cell) so we need to cleanup both, but agreed on the fact we won\u0027t hard-delete the instanced if same-cell of course 😉","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b15d9a0dd49dca1487fa3139649238261ebc4261","unresolved":true,"context_lines":[{"line_number":10870,"context_line":"                    instance, events, timeout\u003dtimeout,"},{"line_number":10871,"context_line":"                    error_callback\u003derror_cb):"},{"line_number":10872,"context_line":"                migrate_data \u003d self._setup_destination_for_live_migration("},{"line_number":10873,"context_line":"                    ctxt, instance, disk, migrate_data, bdms, network_info)"},{"line_number":10874,"context_line":"                wait_for_vif_plugged \u003d ("},{"line_number":10875,"context_line":"                    \u0027wait_for_vif_plugged\u0027 in migrate_data and"},{"line_number":10876,"context_line":"                    migrate_data.wait_for_vif_plugged)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5b69f3b8_b1ba58ec","line":10873,"in_reply_to":"c8ca4efd_12f82cf8","updated":"2026-11-24 18:24:12.000000000","message":"Ah you mean the resources we claimed in `_complete_live_migration_checks_at_dest()`? Good catch... we\u0027re going to hard-delete the instance in this case but you\u0027re right that we should probably try to clean that up first to make sure we don\u0027t leave residue.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"8c1e16d6c3c53e0f83dd1625bdb45d099146d914","unresolved":true,"context_lines":[{"line_number":10920,"context_line":"            thread_pool_factory.ExecutorType.LIVE_MIGRATION,"},{"line_number":10921,"context_line":"            \u0027live_migration_v2_monitor\u0027, instance, ctxt,"},{"line_number":10922,"context_line":"            self._live_migration_v2_monitor,"},{"line_number":10923,"context_line":"            ctxt, instance, migration, migrate_data)"},{"line_number":10924,"context_line":""},{"line_number":10925,"context_line":"        return migrate_data"},{"line_number":10926,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"38791d01_1e99b992","line":10923,"updated":"2026-11-24 09:53:25.000000000","message":"I just noticed that the default value of max_concurrent_live_migrations is 1 if unset, while 0 means we start 5 workers on threading mode.\nhttps://github.com/openstack/nova/blob/18898d20148c48b4671dbae0a461d723859380c5/nova/thread_pool_factory.py#L86-L87 and https://github.com/openstack/nova/blob/18898d20148c48b4671dbae0a461d723859380c5/nova/conf/compute.py#L705\n\nIf so, would that mean two current live-migrations in between hosts A and B (one-way and the other happening in parallel) could deadlock if both destination monitors start before either outgoing transfer?\nI wonder whether the monitors should use a separate executor, so they don’t consume the capacity needed for outgoing transfers?","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"2cf0c395b65611a1f6c29da8a0c61fd99d4ae6ab","unresolved":true,"context_lines":[{"line_number":10920,"context_line":"            thread_pool_factory.ExecutorType.LIVE_MIGRATION,"},{"line_number":10921,"context_line":"            \u0027live_migration_v2_monitor\u0027, instance, ctxt,"},{"line_number":10922,"context_line":"            self._live_migration_v2_monitor,"},{"line_number":10923,"context_line":"            ctxt, instance, migration, migrate_data)"},{"line_number":10924,"context_line":""},{"line_number":10925,"context_line":"        return migrate_data"},{"line_number":10926,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"b032aa61_a0d69e4c","line":10923,"in_reply_to":"24cd022a_88c90e17","updated":"2026-11-26 16:26:36.000000000","message":"that\u0027s the problem, we queue the transfer without guaranteeing that workers have capacity for them.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"a9efd7462792617d6ed05289434b52c36ca8c18e","unresolved":true,"context_lines":[{"line_number":10920,"context_line":"            thread_pool_factory.ExecutorType.LIVE_MIGRATION,"},{"line_number":10921,"context_line":"            \u0027live_migration_v2_monitor\u0027, instance, ctxt,"},{"line_number":10922,"context_line":"            self._live_migration_v2_monitor,"},{"line_number":10923,"context_line":"            ctxt, instance, migration, migrate_data)"},{"line_number":10924,"context_line":""},{"line_number":10925,"context_line":"        return migrate_data"},{"line_number":10926,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"37d01ac1_10a3a83c","line":10923,"in_reply_to":"2740c7f5_342b1b18","updated":"2026-12-02 20:37:51.000000000","message":"\u003e OK. I was wrong. I thought that the source driver monitoring thread is also uses the live_migration executor (as the name logically suggests :D) but indeed that thread is on the default executor. \n\u003e \n\u003e I\u0027m still wondering what is exactly happening.\n\u003e \n\u003e If the source node uses the live_migration executor to wait for completion, while running the actual monitoring in the default executor, then both executor has one running task on the source node during an outgoing live migration. (This should be the case otherwise we have a broken feature about limiting the number of outgoing migrations via the size of the live_migration executor on the source node).\n\nIts other way but overall yes it consume live migration as well as default executor. Source use:\n\n  - live migration executor for monitoring the live migration\n  - starts a new thread on the default executor to continue the live migration work on guest (guest.migrate())  - https://github.com/openstack/nova/blob/20e4cd8ba54b624cddadc720573483972b8ff528/nova/virt/libvirt/driver.py#L11813\n\nBut yes, for any outgoing migration, the dest node live migration executor is not used so dest node can handle the outgoing migration along with there is incoming migration.\n\n\u003e \n\u003e Now on the dest node, this exact code we are commenting on, starts a monitoring thread in the live_migration executor. As the default size of that is 1, this executor is exhausted on the dest. So any new, parallel, live migration that uses the dest node as the source of the migration needs to wait for the single worker to be freed in the live_migration_executor. Which means on the dest node the incoming live migration blocks the outgoing live migration to start.\n\nYes, that is reason, in this v2 code, dest live migration executor is used for monitoring the incoming migration so it block any outgoing migration ond dest node. \n\n\u003e \n\u003e I guess I need to look at your logs to understand more.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b15d9a0dd49dca1487fa3139649238261ebc4261","unresolved":true,"context_lines":[{"line_number":10920,"context_line":"            thread_pool_factory.ExecutorType.LIVE_MIGRATION,"},{"line_number":10921,"context_line":"            \u0027live_migration_v2_monitor\u0027, instance, ctxt,"},{"line_number":10922,"context_line":"            self._live_migration_v2_monitor,"},{"line_number":10923,"context_line":"            ctxt, instance, migration, migrate_data)"},{"line_number":10924,"context_line":""},{"line_number":10925,"context_line":"        return migrate_data"},{"line_number":10926,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"c2b53f4e_c2b76b8a","line":10923,"in_reply_to":"38791d01_1e99b992","updated":"2026-11-24 18:24:12.000000000","message":"Hmm, the limit would be on the outgoing live migrations (i..e the other node, not this one) so I\u0027m not quite sure what you\u0027re getting at. Where is the deadlock?\n\nFor this code, I think I would rather eat the cost of multiple monitor threads (and their polling) for the simplicity it brings in not having to spawn one, queue later-arriving migrations for it to monitor, etc. If that becomes a problem later, then perhaps we could address it but I prefer simplicity for now.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f78dfbfdbd5e9a42ccc98e33b94417fff54c8c9b","unresolved":true,"context_lines":[{"line_number":10920,"context_line":"            thread_pool_factory.ExecutorType.LIVE_MIGRATION,"},{"line_number":10921,"context_line":"            \u0027live_migration_v2_monitor\u0027, instance, ctxt,"},{"line_number":10922,"context_line":"            self._live_migration_v2_monitor,"},{"line_number":10923,"context_line":"            ctxt, instance, migration, migrate_data)"},{"line_number":10924,"context_line":""},{"line_number":10925,"context_line":"        return migrate_data"},{"line_number":10926,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7c4c2c75_ba50a982","line":10923,"in_reply_to":"6a1b0106_f7bfb2e1","updated":"2026-11-25 16:03:51.000000000","message":"Ack, I see now. I *think* we sort of have the same situation today in v1, except that we don\u0027t depend as much on the task that we schedule there. Although if we block on scheduling the \"hold graceful shutdown\" empty task, we\u0027ll actually block the source\u0027s `pre_live_migration call` right? In fact, I think even in v2, either one migration will win or neither will win, as conductor won\u0027t start the transfer until the call to the dest has set up of the monitor. So if we start the monitor on both destination nodes, we\u0027ll never actually start the transfer until one of them times out (or the conductor RPC times out). That\u0027s not great, but at least it\u0027s not stuck mid-migration waiting for a semaphore.\n\nAnyway, I\u0027m going to punt on this for the moment and give @gmaan.os14@gmail.com time to chime in.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"abd446fc26f3c697c6f0bd99a53fd336c2f4a563","unresolved":true,"context_lines":[{"line_number":10920,"context_line":"            thread_pool_factory.ExecutorType.LIVE_MIGRATION,"},{"line_number":10921,"context_line":"            \u0027live_migration_v2_monitor\u0027, instance, ctxt,"},{"line_number":10922,"context_line":"            self._live_migration_v2_monitor,"},{"line_number":10923,"context_line":"            ctxt, instance, migration, migrate_data)"},{"line_number":10924,"context_line":""},{"line_number":10925,"context_line":"        return migrate_data"},{"line_number":10926,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"d22aff1b_413349fb","line":10923,"in_reply_to":"7c4c2c75_ba50a982","updated":"2026-11-25 16:20:49.000000000","message":"\u003e  as conductor won\u0027t start the transfer until the call to the dest has set up of the monitor\n\nconductor only gates on the RPC succeeding and that only submit the task to the executor, nothing guarantees that such executor has a free worker to pick that task up.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e831a00866e9abbadd7d958cb963ee0d9c17d259","unresolved":true,"context_lines":[{"line_number":10920,"context_line":"            thread_pool_factory.ExecutorType.LIVE_MIGRATION,"},{"line_number":10921,"context_line":"            \u0027live_migration_v2_monitor\u0027, instance, ctxt,"},{"line_number":10922,"context_line":"            self._live_migration_v2_monitor,"},{"line_number":10923,"context_line":"            ctxt, instance, migration, migrate_data)"},{"line_number":10924,"context_line":""},{"line_number":10925,"context_line":"        return migrate_data"},{"line_number":10926,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"2740c7f5_342b1b18","line":10923,"in_reply_to":"966694ea_d7fa59b6","updated":"2026-12-02 10:04:01.000000000","message":"OK. I was wrong. I thought that the source driver monitoring thread is also uses the live_migration executor (as the name logically suggests :D) but indeed that thread is on the default executor. \n\nI\u0027m still wondering what is exactly happening.\n\nIf the source node uses the live_migration executor to wait for completion, while running the actual monitoring in the default executor, then both executor has one running task on the source node during an outgoing live migration. (This should be the case otherwise we have a broken feature about limiting the number of outgoing migrations via the size of the live_migration executor on the source node).\n\nNow on the dest node, this exact code we are commenting on, starts a monitoring thread in the live_migration executor. As the default size of that is 1, this executor is exhausted on the dest. So any new, parallel, live migration that uses the dest node as the source of the migration needs to wait for the single worker to be freed in the live_migration_executor. Which means on the dest node the incoming live migration blocks the outgoing live migration to start.\n\nI guess I need to look at your logs to understand more.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"0235257c1f39078387201bba1e11c2f51b62fa2f","unresolved":true,"context_lines":[{"line_number":10920,"context_line":"            thread_pool_factory.ExecutorType.LIVE_MIGRATION,"},{"line_number":10921,"context_line":"            \u0027live_migration_v2_monitor\u0027, instance, ctxt,"},{"line_number":10922,"context_line":"            self._live_migration_v2_monitor,"},{"line_number":10923,"context_line":"            ctxt, instance, migration, migrate_data)"},{"line_number":10924,"context_line":""},{"line_number":10925,"context_line":"        return migrate_data"},{"line_number":10926,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"c11d78ae_baaef251","line":10923,"in_reply_to":"b032aa61_a0d69e4c","updated":"2026-11-30 18:01:16.000000000","message":"I agree with Sylvain and it changes the behaviour and the capacity for parallel live migration between v1 and v2. With this change, v2 will allow only one live migration at a time, either incoming or outgoing, on the source and destination nodes. But in v1 live migration, outgoing live migrations can be run in parallel, each on the source and destination (meaning 1 outgoing live migration per node is allowed, even if that node has another incoming migration).\n\ngibi wrote:\n\u003e The default 1 now means that a compute can handle either an incoming migration or an outgoing migration but not both at the same time.\n\nis it? I think in v1 (threading mode also), we can have both migrations handled at the same time. I am tracing the code to see which executor runs it; let me know if I missed anything. From my findings, the dest live migration executor is not consumed for incoming migration, so it can handle a new outgoing live migration.\n\n1. Live migration performed on source: *RPC thread*\n2. checks and pre live migrations on dest etc are done on *RPC thread*\n3. Now source shot live migration on live migration executor[1]: *source live migration executor*\n4. source call driver live_migration[2]: *source live migration executor*\n5. driver executes guest migration on default executor[3]: *source default executor*\n6. driver start monitoring the live migration completion[4]: *source live migration executor*\n\n\nUsing the default executor for monitoring doesn\u0027t seem correct and could cause issues. I feel monitoring (in the v1 or v2 case) should be done on the live migration executors so we can ensure the existing live migration completes before Nova accepts another live migration.\n\n[1] https://github.com/openstack/nova/blob/ec53ac1270aa5f90f954aba9ad0f03b053061985/nova/compute/manager.py#L9481\n\n[2] https://github.com/openstack/nova/blob/ec53ac1270aa5f90f954aba9ad0f03b053061985/nova/virt/libvirt/driver.py#L11780\n\n[3] https://github.com/openstack/nova/blob/ec53ac1270aa5f90f954aba9ad0f03b053061985/nova/virt/libvirt/driver.py#L11813\n[4]https://github.com/openstack/nova/blob/ec53ac1270aa5f90f954aba9ad0f03b053061985/nova/virt/libvirt/driver.py#L11828","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"5b50c36b4d4f30abf9e635f3e48fbfca6f20ce8b","unresolved":true,"context_lines":[{"line_number":10920,"context_line":"            thread_pool_factory.ExecutorType.LIVE_MIGRATION,"},{"line_number":10921,"context_line":"            \u0027live_migration_v2_monitor\u0027, instance, ctxt,"},{"line_number":10922,"context_line":"            self._live_migration_v2_monitor,"},{"line_number":10923,"context_line":"            ctxt, instance, migration, migrate_data)"},{"line_number":10924,"context_line":""},{"line_number":10925,"context_line":"        return migrate_data"},{"line_number":10926,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"966694ea_d7fa59b6","line":10923,"in_reply_to":"c11d78ae_baaef251","updated":"2026-12-02 03:45:13.000000000","message":"I added a Tempest test for the existing live migration API and I can see that incoming and outgoing migrations are happening at the same time:\n\n- https://review.opendev.org/c/openstack/tempest/+/1018272\n\nBelow is the scenarios and logs to trace incoming and outgoing LM on host:\n\nTest:\n   \n    Created 2 VMs on different hosts: \n      - VM1 a4dd5927-4a97-457b-88aa-4d832272478a on host np165cf79cbee14\n      - VM2 b993502d-bbb4-44e7-92c1-b6d2e528a64b on host np7e9309f434d74\n    \n    Started two live migrations in parallel:\n      - Live migrate VM1 from host np165cf79cbee14 -\u003e host  np7e9309f434d74\n      - Live migrate VM2 from host np7e9309f434d74 -\u003e host  np165cf79cbee14 \n\nhttps://zuul.opendev.org/t/openstack/build/0b811c80ef3844dbaff8fc77e6abb96a/log/controller/logs/tempest_log.txt#2971\n\nI am tracking incoming and outgoing live migrations on the host   np7e9309f434d74  if both are running in parallel:\n\n- Outgoing LM  on   np7e9309f434d74  : VM2   b993502d-bbb4-44e7-92c1-b6d2e528a64b     migration from host     np7e9309f434d74  (source)   to host    np165cf79cbee14  (dest)\n- Incoming LM  on   np7e9309f434d74  : VM1  a4dd5927-4a97-457b-88aa-4d832272478a   migration from host    np165cf79cbee14  (source)   to host   np7e9309f434d74  (dest)\n\n\nOutgoing live migration started:\n\n    Dec 01 18:15:25.690819 np7e9309f434d74 nova-compute[88400]: DEBUG nova.compute.manager [None req-c42ea15f-529d-4666-9e0a-4f7399a080b7 tempest-LiveMigrationParallelTest-1002464089 tempest-LiveMigrationParallelTest-1002464089-project-admin] live_migration data is LibvirtLiveMigrateData(bdms\u003d[],block_migration\u003dTrue,disk_available_mb\u003d37888,disk_over_commit\u003dFalse,dst_cpu_shared_set_info\u003dset([]),dst_numa_info\u003d\u003c?\u003e,dst_supports_mdev_live_migration\u003dTrue,dst_supports_numa_live_migration\u003d\u003c?\u003e,dst_wants_file_backed_memory\u003dFalse,file_backed_memory_discard\u003d\u003c?\u003e,filename\u003d\u0027tmpe2rq6p1_\u0027,graphics_listen_addr_spice\u003d127.0.0.1,graphics_listen_addr_vnc\u003d0.0.0.0,image_type\u003d\u0027default\u0027,instance_relative_path\u003d\u0027b993502d-bbb4-44e7-92c1-b6d2e528a64b\u0027,is_shared_block_storage\u003dFalse,is_shared_instance_path\u003dFalse,is_volume_backed\u003dFalse,migration\u003dMigration(0e38d97f-67ff-4f9f-b9e5-8a91602d53af),old_vol_attachment_ids\u003d{},pci_dev_map_src_dst\u003d{},serial_listen_addr\u003dNone,serial_listen_ports\u003d[],source_mdev_types\u003d\u003c?\u003e,src_supports_native_luks\u003d\u003c?\u003e,src_supports_numa_live_migration\u003d\u003c?\u003e,supported_perf_events\u003d[],target_connect_addr\u003dNone,target_mdevs\u003d\u003c?\u003e,vifs\u003d[VIFMigrateData],vtpm_secret_uuid\u003d\u003c?\u003e,vtpm_secret_value\u003d\u003c?\u003e,wait_for_vif_plugged\u003dTrue) {{(pid\u003d88400) _do_live_migration /opt/stack/nova/nova/compute/manager.py:9436}}\n\nSource host np7e9309f434d74 started the monitoring of outgoing LM:\n\n    Dec 01 18:15:25.716102 np7e9309f434d74 nova-compute[88400]: DEBUG nova.virt.libvirt.driver [None req-c42ea15f-529d-4666-9e0a-4f7399a080b7 tempest-LiveMigrationParallelTest-1002464089 tempest-LiveMigrationParallelTest-1002464089-project-admin] [instance: b993502d-bbb4-44e7-92c1-b6d2e528a64b] Starting monitoring of live migration {{(pid\u003d88400) _live_migration /opt/stack/nova/nova/virt/libvirt/driver.py:11826}}\n    Dec 01 18:15:25.716102 np7e9309f434d74 nova-compute[88400]: DEBUG nova.objects.instance [None req-c42ea15f-529d-4666-9e0a-4f7399a080b7 tempest-LiveMigrationParallelTest-1002464089 tempest-LiveMigrationParallelTest-1002464089-project-admin] Lazy-loading \u0027migration_context\u0027 on Instance uuid b993502d-bbb4-44e7-92c1-b6d2e528a64b {{(pid\u003d88400) obj_load_attr /opt/stack/nova/nova/objects/instance.py:1145}}\n\n**Incoming migration (LM of  VM1  a4dd5927-4a97-457b-88aa-4d832272478a ) started: pre_live_migration started on host np7e9309f434d74:**\n\n    Dec 01 18:15:31.170997 np7e9309f434d74 nova-compute[88400]: DEBUG nova.compute.manager [None req-314bf6be-870e-4c1f-abb8-06d86bb64e90 tempest-LiveMigrationParallelTest-1002464089 tempest-LiveMigrationParallelTest-1002464089-project-admin] driver pre_live_migration data is LibvirtLiveMigrateData(bdms\u003d[],block_migration\u003dTrue,disk_available_mb\u003d37888,disk_over_commit\u003dFalse,dst_cpu_shared_set_info\u003dset([]),dst_numa_info\u003d\u003c?\u003e,dst_supports_mdev_live_migration\u003dTrue,dst_supports_numa_live_migration\u003d\u003c?\u003e,dst_wants_file_backed_memory\u003dFalse,file_backed_memory_discard\u003d\u003c?\u003e,filename\u003d\u0027tmpe397qkuk\u0027,graphics_listen_addr_spice\u003d127.0.0.1,graphics_listen_addr_vnc\u003d0.0.0.0,image_type\u003d\u0027default\u0027,instance_relative_path\u003d\u0027a4dd5927-4a97-457b-88aa-4d832272478a\u0027,is_shared_block_storage\u003dFalse,is_shared_instance_path\u003dFalse,is_volume_backed\u003dFalse,migration\u003d\u003c?\u003e,old_vol_attachment_ids\u003d{},pci_dev_map_src_dst\u003d{},serial_listen_addr\u003dNone,serial_listen_ports\u003d[],source_mdev_types\u003d\u003c?\u003e,src_supports_native_luks\u003d\u003c?\u003e,src_supports_numa_live_migration\u003d\u003c?\u003e,supported_perf_events\u003d[],target_connect_addr\u003dNone,target_mdevs\u003d\u003c?\u003e,vifs\u003d[VIFMigrateData],vtpm_secret_uuid\u003d\u003c?\u003e,vtpm_secret_value\u003d\u003c?\u003e,wait_for_vif_plugged\u003d\u003c?\u003e) {{(pid\u003d88400) _do_pre_live_migration /opt/stack/nova/nova/compute/manager.py:9154}}\n\nSource host np7e9309f434d74 monitoring of outgoing LM finished: \n\n    Dec 01 18:15:31.386826 np7e9309f434d74 nova-compute[88400]: DEBUG nova.virt.libvirt.driver [None req-c42ea15f-529d-4666-9e0a-4f7399a080b7 tempest-LiveMigrationParallelTest-1002464089 tempest-LiveMigrationParallelTest-1002464089-project-admin] [instance: b993502d-bbb4-44e7-92c1-b6d2e528a64b] Live migration monitoring is all done {{(pid\u003d88400) _live_migration /opt/stack/nova/nova/virt/libvirt/driver.py:11852}}\n\n**Incoming migration: pre_live_migration finished on host np7e9309f434d74 :**\n\n     Dec 01 18:15:31.887555 np7e9309f434d74 nova-compute[88400]: DEBUG nova.compute.manager [None req-314bf6be-870e-4c1f-abb8-06d86bb64e90 tempest-LiveMigrationParallelTest-1002464089 tempest-LiveMigrationParallelTest-1002464089-project-admin] pre_live_migration result data is LibvirtLiveMigrateData(bdms\u003d[],block_migration\u003dTrue,disk_available_mb\u003d37888,disk_over_commit\u003dFalse,dst_cpu_shared_set_info\u003dset([]),dst_numa_info\u003d\u003c?\u003e,dst_supports_mdev_live_migration\u003dTrue,dst_supports_numa_live_migration\u003d\u003c?\u003e,dst_wants_file_backed_memory\u003dFalse,file_backed_memory_discard\u003d\u003c?\u003e,filename\u003d\u0027tmpe397qkuk\u0027,graphics_listen_addr_spice\u003d127.0.0.1,graphics_listen_addr_vnc\u003d0.0.0.0,image_type\u003d\u0027default\u0027,instance_relative_path\u003d\u0027a4dd5927-4a97-457b-88aa-4d832272478a\u0027,is_shared_block_storage\u003dFalse,is_shared_instance_path\u003dFalse,is_volume_backed\u003dFalse,migration\u003d\u003c?\u003e,old_vol_attachment_ids\u003d{},pci_dev_map_src_dst\u003d{},serial_listen_addr\u003dNone,serial_listen_ports\u003d[],source_mdev_types\u003d\u003c?\u003e,src_supports_native_luks\u003d\u003c?\u003e,src_supports_numa_live_migration\u003d\u003c?\u003e,supported_perf_events\u003d[],target_connect_addr\u003dNone,target_mdevs\u003d\u003c?\u003e,vifs\u003d[VIFMigrateData],vtpm_secret_uuid\u003d\u003c?\u003e,vtpm_secret_value\u003d\u003c?\u003e,wait_for_vif_plugged\u003dTrue) {{(pid\u003d88400) _do_pre_live_migration /opt/stack/nova/nova/compute/manager.py:9220}}\n\nhttps://zuul.opendev.org/t/openstack/build/0b811c80ef3844dbaff8fc77e6abb96a/log/controller/logs/screen-n-cpu.txt#10800-11388","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"eddba413d9dee4923627811636e4c8f6878d04c1","unresolved":true,"context_lines":[{"line_number":10920,"context_line":"            thread_pool_factory.ExecutorType.LIVE_MIGRATION,"},{"line_number":10921,"context_line":"            \u0027live_migration_v2_monitor\u0027, instance, ctxt,"},{"line_number":10922,"context_line":"            self._live_migration_v2_monitor,"},{"line_number":10923,"context_line":"            ctxt, instance, migration, migrate_data)"},{"line_number":10924,"context_line":""},{"line_number":10925,"context_line":"        return migrate_data"},{"line_number":10926,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"d3bc9ca1_a0637788","line":10923,"in_reply_to":"c2b53f4e_c2b76b8a","updated":"2026-11-25 08:38:05.000000000","message":"I mean two different VMs migrating in opposite directions. Both the destination monitor here and the source transfer at L10526 use the same process-wide LIVE_MIGRATION executor.\n\nWith max_concurrent_live_migrations\u003d1, B’s worker can be occupied monitoring A-\u003eB, while A’s worker monitors B-\u003eA. Each outgoing transfer then queues behind its local incoming monitor, and both monitors wait for those transfers to finish.\n\nOne monitor per migration is fine, my only concern is sharing the bounded outbound executor with those monitors which can then deadlock the transfers.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"33c2af2094d8639d2b39b3b3d3c22ae67d5f6314","unresolved":true,"context_lines":[{"line_number":10920,"context_line":"            thread_pool_factory.ExecutorType.LIVE_MIGRATION,"},{"line_number":10921,"context_line":"            \u0027live_migration_v2_monitor\u0027, instance, ctxt,"},{"line_number":10922,"context_line":"            self._live_migration_v2_monitor,"},{"line_number":10923,"context_line":"            ctxt, instance, migration, migrate_data)"},{"line_number":10924,"context_line":""},{"line_number":10925,"context_line":"        return migrate_data"},{"line_number":10926,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"24cd022a_88c90e17","line":10923,"in_reply_to":"d22aff1b_413349fb","updated":"2026-11-25 16:35:19.000000000","message":"Right on the RPC.. I thought we would block (and eventually fail) on submitting to a full pool of live migration workers. If not, then fair enough and v1 will queue the thing to block shutdown (on the infinite queue) but since it doesn\u0027t depend on it to actually complete.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1314c13e0e80e0ba45bf19c17b1fb18124de520f","unresolved":true,"context_lines":[{"line_number":10920,"context_line":"            thread_pool_factory.ExecutorType.LIVE_MIGRATION,"},{"line_number":10921,"context_line":"            \u0027live_migration_v2_monitor\u0027, instance, ctxt,"},{"line_number":10922,"context_line":"            self._live_migration_v2_monitor,"},{"line_number":10923,"context_line":"            ctxt, instance, migration, migrate_data)"},{"line_number":10924,"context_line":""},{"line_number":10925,"context_line":"        return migrate_data"},{"line_number":10926,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"6a1b0106_f7bfb2e1","line":10923,"in_reply_to":"d3bc9ca1_a0637788","updated":"2026-11-25 14:38:12.000000000","message":"yepp it has an effect on overall migration capacity. In the legacy codepath the executor size limited the number of outgoing migration. In the new codepath the executor size limits both the number of outgoing migration and the number of incoming migrations as well. The default 1 now means that a compute can handle either an incoming migration or an outgoing migration but not both at the same time.\n\nThere could be a deadlock if the same migration independently consumes a thread on the outgoing side and the incoming side. It is a dining philosopher problem then.\n\nI guess an easy way out is not to reuse the LIVE_MIGRATION executor for this, but even then a more complicated network of migration across the computes can create a deadlock of mutually waiting souce or dest computes.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":true,"context_lines":[{"line_number":10937,"context_line":"        dest_cn \u003d self._get_compute_info(ctxt, self.host)"},{"line_number":10938,"context_line":"        dest_rp_uuid \u003d dest_cn.uuid"},{"line_number":10939,"context_line":""},{"line_number":10940,"context_line":"        while True:"},{"line_number":10941,"context_line":"            migration_allocs \u003d ("},{"line_number":10942,"context_line":"                self.reportclient.get_allocations_for_consumer("},{"line_number":10943,"context_line":"                    ctxt, migration.uuid))"}],"source_content_type":"text/x-python","patch_set":6,"id":"45e16848_ec6a7cf0","line":10940,"updated":"2026-11-25 14:21:43.000000000","message":"* This loop exits at any exception. I think we want two things about exception handling here:\n  * A clear catch all to log exceptions before exit\n  * Logic to keep looping on exceptions that considered transient, like placement communication error.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"249fb689e346cc38551ab33cdef5f90e181bd586","unresolved":true,"context_lines":[{"line_number":10937,"context_line":"        dest_cn \u003d self._get_compute_info(ctxt, self.host)"},{"line_number":10938,"context_line":"        dest_rp_uuid \u003d dest_cn.uuid"},{"line_number":10939,"context_line":""},{"line_number":10940,"context_line":"        while True:"},{"line_number":10941,"context_line":"            migration_allocs \u003d ("},{"line_number":10942,"context_line":"                self.reportclient.get_allocations_for_consumer("},{"line_number":10943,"context_line":"                    ctxt, migration.uuid))"}],"source_content_type":"text/x-python","patch_set":6,"id":"9008f147_ee48dbc7","line":10940,"in_reply_to":"45e16848_ec6a7cf0","updated":"2026-11-25 19:35:27.000000000","message":"Yep, I think I\u0027m already good on the retry (i.e. placement) because of the fix for bauzas\u0027 comments but will add more here for the others.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e831a00866e9abbadd7d958cb963ee0d9c17d259","unresolved":true,"context_lines":[{"line_number":10937,"context_line":"        dest_cn \u003d self._get_compute_info(ctxt, self.host)"},{"line_number":10938,"context_line":"        dest_rp_uuid \u003d dest_cn.uuid"},{"line_number":10939,"context_line":""},{"line_number":10940,"context_line":"        while True:"},{"line_number":10941,"context_line":"            migration_allocs \u003d ("},{"line_number":10942,"context_line":"                self.reportclient.get_allocations_for_consumer("},{"line_number":10943,"context_line":"                    ctxt, migration.uuid))"}],"source_content_type":"text/x-python","patch_set":6,"id":"942b7e8b_5a684e73","line":10940,"in_reply_to":"9008f147_ee48dbc7","updated":"2026-12-02 10:04:01.000000000","message":"yepp. I see the retry now. Lets add some logging for the other exceptions that trigger the exit of the monitor.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e998609ad6059df04d711d8241e6dea25562980f","unresolved":false,"context_lines":[{"line_number":10937,"context_line":"        dest_cn \u003d self._get_compute_info(ctxt, self.host)"},{"line_number":10938,"context_line":"        dest_rp_uuid \u003d dest_cn.uuid"},{"line_number":10939,"context_line":""},{"line_number":10940,"context_line":"        while True:"},{"line_number":10941,"context_line":"            migration_allocs \u003d ("},{"line_number":10942,"context_line":"                self.reportclient.get_allocations_for_consumer("},{"line_number":10943,"context_line":"                    ctxt, migration.uuid))"}],"source_content_type":"text/x-python","patch_set":6,"id":"6af2288c_6c23e071","line":10940,"in_reply_to":"942b7e8b_5a684e73","updated":"2026-12-02 11:38:05.000000000","message":"and I also see the catch all and logging as well, sorry :)","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":false,"context_lines":[{"line_number":10940,"context_line":"        while True:"},{"line_number":10941,"context_line":"            migration_allocs \u003d ("},{"line_number":10942,"context_line":"                self.reportclient.get_allocations_for_consumer("},{"line_number":10943,"context_line":"                    ctxt, migration.uuid))"},{"line_number":10944,"context_line":"            if not migration_allocs:"},{"line_number":10945,"context_line":"                # Migration consumer allocations are gone — the source"},{"line_number":10946,"context_line":"                # has either completed or reverted."}],"source_content_type":"text/x-python","patch_set":6,"id":"83451573_21cf328f","line":10943,"updated":"2026-11-25 14:21:43.000000000","message":"so I assume we ensured that the migration object has the same uuid in both DBs by cloning. So this is a valid uuid to poll","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"8c1e16d6c3c53e0f83dd1625bdb45d099146d914","unresolved":true,"context_lines":[{"line_number":10941,"context_line":"            migration_allocs \u003d ("},{"line_number":10942,"context_line":"                self.reportclient.get_allocations_for_consumer("},{"line_number":10943,"context_line":"                    ctxt, migration.uuid))"},{"line_number":10944,"context_line":"            if not migration_allocs:"},{"line_number":10945,"context_line":"                # Migration consumer allocations are gone — the source"},{"line_number":10946,"context_line":"                # has either completed or reverted."},{"line_number":10947,"context_line":"                instance_allocs \u003d ("}],"source_content_type":"text/x-python","patch_set":6,"id":"8d2a8d8c_8bad6b64","line":10944,"updated":"2026-11-24 09:53:25.000000000","message":"this can be error-prone, get_allocations_for_consumer() can return empty dict on HTTP failures and its docstring mentions to rather use get_allocs_for_consumer() see https://github.com/openstack/nova/blob/18898d20148c48b4671dbae0a461d723859380c5/nova/scheduler/client/report.py#L1560-L1561.\nHere, we should use that and retry failed reads then.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f78dfbfdbd5e9a42ccc98e33b94417fff54c8c9b","unresolved":true,"context_lines":[{"line_number":10941,"context_line":"            migration_allocs \u003d ("},{"line_number":10942,"context_line":"                self.reportclient.get_allocations_for_consumer("},{"line_number":10943,"context_line":"                    ctxt, migration.uuid))"},{"line_number":10944,"context_line":"            if not migration_allocs:"},{"line_number":10945,"context_line":"                # Migration consumer allocations are gone — the source"},{"line_number":10946,"context_line":"                # has either completed or reverted."},{"line_number":10947,"context_line":"                instance_allocs \u003d ("}],"source_content_type":"text/x-python","patch_set":6,"id":"e7adce76_b425fcfd","line":10944,"in_reply_to":"8d2a8d8c_8bad6b64","updated":"2026-11-25 16:03:51.000000000","message":"Ack good call.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"2cf0c395b65611a1f6c29da8a0c61fd99d4ae6ab","unresolved":false,"context_lines":[{"line_number":10941,"context_line":"            migration_allocs \u003d ("},{"line_number":10942,"context_line":"                self.reportclient.get_allocations_for_consumer("},{"line_number":10943,"context_line":"                    ctxt, migration.uuid))"},{"line_number":10944,"context_line":"            if not migration_allocs:"},{"line_number":10945,"context_line":"                # Migration consumer allocations are gone — the source"},{"line_number":10946,"context_line":"                # has either completed or reverted."},{"line_number":10947,"context_line":"                instance_allocs \u003d ("}],"source_content_type":"text/x-python","patch_set":6,"id":"4f478313_d5cfbda1","line":10944,"in_reply_to":"e7adce76_b425fcfd","updated":"2026-11-26 16:26:36.000000000","message":"Done","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":false,"context_lines":[{"line_number":10959,"context_line":"                        # The instance was cloned hidden\u003dTrue by"},{"line_number":10960,"context_line":"                        # conductor. Unhide it now that migration"},{"line_number":10961,"context_line":"                        # succeeded so it appears in listings."},{"line_number":10962,"context_line":"                        instance.hidden \u003d False"},{"line_number":10963,"context_line":"                    self._do_post_live_migration_at_destination("},{"line_number":10964,"context_line":"                        ctxt, instance, False)"},{"line_number":10965,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fbc0e65_360aea12","line":10962,"updated":"2026-11-25 14:21:43.000000000","message":"OK _do_post_live_migration_at_destination() will do the instance.save()","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":true,"context_lines":[{"line_number":10979,"context_line":"                        ctxt, instance, migration, migrate_data)"},{"line_number":10980,"context_line":"                return"},{"line_number":10981,"context_line":""},{"line_number":10982,"context_line":"            # TODO(danms): make this interval configurable"},{"line_number":10983,"context_line":"            time.sleep(5)"},{"line_number":10984,"context_line":""},{"line_number":10985,"context_line":"    def _live_migration_v2_cleanup_failed_destination("}],"source_content_type":"text/x-python","patch_set":6,"id":"abfb91f2_3d56e1a2","line":10982,"updated":"2026-11-25 14:21:43.000000000","message":"yepp I would like to get that config added in the first release","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e831a00866e9abbadd7d958cb963ee0d9c17d259","unresolved":false,"context_lines":[{"line_number":10979,"context_line":"                        ctxt, instance, migration, migrate_data)"},{"line_number":10980,"context_line":"                return"},{"line_number":10981,"context_line":""},{"line_number":10982,"context_line":"            # TODO(danms): make this interval configurable"},{"line_number":10983,"context_line":"            time.sleep(5)"},{"line_number":10984,"context_line":""},{"line_number":10985,"context_line":"    def _live_migration_v2_cleanup_failed_destination("}],"source_content_type":"text/x-python","patch_set":6,"id":"168418b6_862a9479","line":10982,"in_reply_to":"7187790d_04fefc85","updated":"2026-12-02 10:04:01.000000000","message":"Acknowledged. This is two different mechanism so better to have two differnet knobs","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"249fb689e346cc38551ab33cdef5f90e181bd586","unresolved":true,"context_lines":[{"line_number":10979,"context_line":"                        ctxt, instance, migration, migrate_data)"},{"line_number":10980,"context_line":"                return"},{"line_number":10981,"context_line":""},{"line_number":10982,"context_line":"            # TODO(danms): make this interval configurable"},{"line_number":10983,"context_line":"            time.sleep(5)"},{"line_number":10984,"context_line":""},{"line_number":10985,"context_line":"    def _live_migration_v2_cleanup_failed_destination("}],"source_content_type":"text/x-python","patch_set":6,"id":"7187790d_04fefc85","line":10982,"in_reply_to":"abfb91f2_3d56e1a2","updated":"2026-11-25 19:35:27.000000000","message":"Ack, and I\u0027m adding a new config knob not reusing the existing live migration monitor interval. They\u0027re kinda almost the same thing and you could argue that it\u0027s best to re-use, but one is polling local stuff and the other (this one) is polling externally and is also less time-sensitive.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":true,"context_lines":[{"line_number":10984,"context_line":""},{"line_number":10985,"context_line":"    def _live_migration_v2_cleanup_failed_destination("},{"line_number":10986,"context_line":"            self, ctxt, instance, migration, migrate_data):"},{"line_number":10987,"context_line":"        \"\"\"Remove cross-cell state owned by the destination compute.\"\"\""},{"line_number":10988,"context_line":"        bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("},{"line_number":10989,"context_line":"            ctxt, instance.uuid)"},{"line_number":10990,"context_line":"        old_attachment_ids \u003d migrate_data.old_vol_attachment_ids"}],"source_content_type":"text/x-python","patch_set":6,"id":"30ab6d21_7425e416","line":10987,"updated":"2026-11-25 14:21:43.000000000","message":"this is misleading, the function is called regardless of same-cell or cross-cell move happened","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e831a00866e9abbadd7d958cb963ee0d9c17d259","unresolved":false,"context_lines":[{"line_number":10984,"context_line":""},{"line_number":10985,"context_line":"    def _live_migration_v2_cleanup_failed_destination("},{"line_number":10986,"context_line":"            self, ctxt, instance, migration, migrate_data):"},{"line_number":10987,"context_line":"        \"\"\"Remove cross-cell state owned by the destination compute.\"\"\""},{"line_number":10988,"context_line":"        bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("},{"line_number":10989,"context_line":"            ctxt, instance.uuid)"},{"line_number":10990,"context_line":"        old_attachment_ids \u003d migrate_data.old_vol_attachment_ids"}],"source_content_type":"text/x-python","patch_set":6,"id":"8d7bb047_616885fd","line":10987,"in_reply_to":"30ab6d21_7425e416","updated":"2026-12-02 10:04:01.000000000","message":"Done","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e998609ad6059df04d711d8241e6dea25562980f","unresolved":true,"context_lines":[{"line_number":641,"context_line":""},{"line_number":642,"context_line":""},{"line_number":643,"context_line":"class DestMigrationResources:"},{"line_number":644,"context_line":"    \"\"\"Destination-owned resources retained from preparation to finalization.\"\"\""},{"line_number":645,"context_line":""},{"line_number":646,"context_line":"    def __init__(self):"},{"line_number":647,"context_line":"        self.migrate_data: migrate_data_obj.LiveMigrateData | None \u003d None"}],"source_content_type":"text/x-python","patch_set":7,"id":"49ba6e8b_dc8c1dba","line":644,"updated":"2026-12-02 11:38:05.000000000","message":"that is a too long line again. Something is broken with our tooling catching these.\n\n// later \n\nyes 79 chars are not enforced any more: https://review.opendev.org/c/openstack/nova/+/1018411\n\nI think we still have the intention to break a 79 chars though.","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e998609ad6059df04d711d8241e6dea25562980f","unresolved":true,"context_lines":[{"line_number":10550,"context_line":"            raise exception.LiveMigrationNotSubmitted("},{"line_number":10551,"context_line":"                migration_uuid\u003dmigration.uuid,"},{"line_number":10552,"context_line":"                instance_uuid\u003dinstance.uuid)"},{"line_number":10553,"context_line":"        future.add_done_callback(functools.partial("},{"line_number":10554,"context_line":"            self._cleanup_cancelled_live_migration_v2,"},{"line_number":10555,"context_line":"            context, instance, migrate_data))"},{"line_number":10556,"context_line":"        self._waiting_live_migrations[instance.uuid] \u003d (migration, future)"},{"line_number":10557,"context_line":""},{"line_number":10558,"context_line":"    def _cleanup_cancelled_live_migration_v2("}],"source_content_type":"text/x-python","patch_set":7,"id":"6437adec_189b8fef","line":10555,"range":{"start_line":10553,"start_character":0,"end_line":10555,"end_character":45},"updated":"2026-12-02 11:38:05.000000000","message":"so we call _cleanup_cancelled_live_migration_v2 when the future is done either due to never started but cancelled, or due to finished successfully. This seems strange. But maybe we handle the success case in _cleanup_cancelled_live_migration_v2 ?\n\n// later\n\nYepp we have a conditional there to only act if future.cancelled() is true","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"7d6e4129d326968bcb2560e27ec0065d1e7b4ba1","unresolved":false,"context_lines":[{"line_number":10550,"context_line":"            raise exception.LiveMigrationNotSubmitted("},{"line_number":10551,"context_line":"                migration_uuid\u003dmigration.uuid,"},{"line_number":10552,"context_line":"                instance_uuid\u003dinstance.uuid)"},{"line_number":10553,"context_line":"        future.add_done_callback(functools.partial("},{"line_number":10554,"context_line":"            self._cleanup_cancelled_live_migration_v2,"},{"line_number":10555,"context_line":"            context, instance, migrate_data))"},{"line_number":10556,"context_line":"        self._waiting_live_migrations[instance.uuid] \u003d (migration, future)"},{"line_number":10557,"context_line":""},{"line_number":10558,"context_line":"    def _cleanup_cancelled_live_migration_v2("}],"source_content_type":"text/x-python","patch_set":7,"id":"c25fff40_2616f2dc","line":10555,"range":{"start_line":10553,"start_character":0,"end_line":10555,"end_character":45},"in_reply_to":"6437adec_189b8fef","updated":"2026-12-02 11:40:23.000000000","message":"Done","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e998609ad6059df04d711d8241e6dea25562980f","unresolved":true,"context_lines":[{"line_number":10555,"context_line":"            context, instance, migrate_data))"},{"line_number":10556,"context_line":"        self._waiting_live_migrations[instance.uuid] \u003d (migration, future)"},{"line_number":10557,"context_line":""},{"line_number":10558,"context_line":"    def _cleanup_cancelled_live_migration_v2("},{"line_number":10559,"context_line":"            self, context, instance, migrate_data, future):"},{"line_number":10560,"context_line":"        \"\"\"Restore source state when queued v2 execution is cancelled.\"\"\""},{"line_number":10561,"context_line":"        if not future.cancelled():"}],"source_content_type":"text/x-python","patch_set":7,"id":"7fd76b96_5abb332d","line":10558,"range":{"start_line":10558,"start_character":8,"end_line":10558,"end_character":44},"updated":"2026-12-02 11:38:05.000000000","message":"I assume this a souce only method. The destination detects the cancelling via placement and has its own cleaning via _live_migration_v2_cleanup_failed_destination() . If so I tempted to include \"source\" into the name of _cleanup_cancelled_live_migration_v2","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"2cf0c395b65611a1f6c29da8a0c61fd99d4ae6ab","unresolved":false,"context_lines":[{"line_number":10563,"context_line":"        # Unlike v1, destination preparation has already changed shared"},{"line_number":10564,"context_line":"        # same-cell volume BDMs before the source task is queued. Restore them"},{"line_number":10565,"context_line":"        # before the shared abort handler reverts Placement and clears"},{"line_number":10566,"context_line":"        # task_state. The destination independently cleans its own resources."},{"line_number":10567,"context_line":"        try:"},{"line_number":10568,"context_line":"            bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("},{"line_number":10569,"context_line":"                context, instance.uuid)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9d6029b6_243d62cf","line":10566,"updated":"2026-11-26 16:26:36.000000000","message":"ty","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e998609ad6059df04d711d8241e6dea25562980f","unresolved":true,"context_lines":[{"line_number":10576,"context_line":"                    bdm.volume_id]"},{"line_number":10577,"context_line":"                bdm.save()"},{"line_number":10578,"context_line":"            instance.refresh()"},{"line_number":10579,"context_line":"            instance.drop_migration_context()"},{"line_number":10580,"context_line":"            instance.progress \u003d 0"},{"line_number":10581,"context_line":"            instance.save(expected_task_state\u003d[task_states.MIGRATING])"},{"line_number":10582,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":7,"id":"5e3fbb87_c5cd92ad","line":10579,"updated":"2026-12-02 11:38:05.000000000","message":"This seems to be a generic things, Does the shared abort handler do this already?","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"7d6e4129d326968bcb2560e27ec0065d1e7b4ba1","unresolved":false,"context_lines":[{"line_number":10576,"context_line":"                    bdm.volume_id]"},{"line_number":10577,"context_line":"                bdm.save()"},{"line_number":10578,"context_line":"            instance.refresh()"},{"line_number":10579,"context_line":"            instance.drop_migration_context()"},{"line_number":10580,"context_line":"            instance.progress \u003d 0"},{"line_number":10581,"context_line":"            instance.save(expected_task_state\u003d[task_states.MIGRATING])"},{"line_number":10582,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":7,"id":"4e35aa25_a0b874ad","line":10579,"in_reply_to":"5e3fbb87_c5cd92ad","updated":"2026-12-02 11:40:23.000000000","message":"nope we don\u0027t have it there.","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e998609ad6059df04d711d8241e6dea25562980f","unresolved":true,"context_lines":[{"line_number":10586,"context_line":"    def _do_live_migration_v2(self, context, dest, instance,"},{"line_number":10587,"context_line":"                              migration, migrate_data):"},{"line_number":10588,"context_line":"        self._set_migration_status(migration, \u0027preparing\u0027)"},{"line_number":10589,"context_line":"        source_bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("},{"line_number":10590,"context_line":"            context, instance.uuid)"},{"line_number":10591,"context_line":"        old_attachment_ids \u003d migrate_data.old_vol_attachment_ids"},{"line_number":10592,"context_line":"        old_connection_infos \u003d migrate_data.old_vol_connection_infos"},{"line_number":10593,"context_line":"        for bdm in source_bdms:"},{"line_number":10594,"context_line":"            if not bdm.is_volume:"},{"line_number":10595,"context_line":"                continue"},{"line_number":10596,"context_line":"            if bdm.volume_id in old_attachment_ids:"},{"line_number":10597,"context_line":"                bdm.attachment_id \u003d old_attachment_ids[bdm.volume_id]"},{"line_number":10598,"context_line":"            if bdm.volume_id in old_connection_infos:"},{"line_number":10599,"context_line":"                bdm.connection_info \u003d old_connection_infos[bdm.volume_id]"},{"line_number":10600,"context_line":""},{"line_number":10601,"context_line":"        migrate_data.migration \u003d migration"},{"line_number":10602,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"74022b9f_3fc8cb40","line":10599,"range":{"start_line":10589,"start_character":0,"end_line":10599,"end_character":73},"updated":"2026-12-02 11:38:05.000000000","message":"Why do we need this? A bit of explanation could help. Is this because in a same-cell migration the _setup_destination_for_live_migration() already modified the BDM in the DB and therefore here when we read the BDM from the DB we see the dest data there? (And in the cross cell case this is no-op as the dest BDM modification is in a separate DB?)","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e998609ad6059df04d711d8241e6dea25562980f","unresolved":true,"context_lines":[{"line_number":10598,"context_line":"            if bdm.volume_id in old_connection_infos:"},{"line_number":10599,"context_line":"                bdm.connection_info \u003d old_connection_infos[bdm.volume_id]"},{"line_number":10600,"context_line":""},{"line_number":10601,"context_line":"        migrate_data.migration \u003d migration"},{"line_number":10602,"context_line":""},{"line_number":10603,"context_line":"        # Check if the migration was aborted while queued"},{"line_number":10604,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"65959da0_baa4c124","line":10601,"updated":"2026-12-02 11:38:05.000000000","message":"this is also weird. Is this a dance because we got the migrate_data from the dest with the dest\u0027s copy of the migration object that is in a different DB during cross cell move?","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e998609ad6059df04d711d8241e6dea25562980f","unresolved":true,"context_lines":[{"line_number":10638,"context_line":"                self._set_migration_status(migration, \u0027error\u0027)"},{"line_number":10639,"context_line":"                instance.refresh()"},{"line_number":10640,"context_line":"                instance.drop_migration_context()"},{"line_number":10641,"context_line":"                self._set_instance_obj_error_state(instance,"},{"line_number":10642,"context_line":"                                                   clean_task_state\u003dTrue)"},{"line_number":10643,"context_line":""},{"line_number":10644,"context_line":"    @wrap_exception()"}],"source_content_type":"text/x-python","patch_set":7,"id":"98b0bb5e_c4158b10","line":10641,"updated":"2026-12-02 11:38:05.000000000","message":"We do a refresh here but we don\u0027t do it in _live_migration_v2_rollback_at_source but both does drop_migration_context() that is a strange asymmetry. Maybe it is nothing. I just spotted it.\n\n//later\n\nOhh, so this Exception handler pushes the instance to ERROR. So this is not a normal rollback then that moves the instance back to ACTIVE on the source side. Maybe that explains the asymmetry. I\u0027m tempted to change the LOG message here to note that the rollback also failed not just the migration. I guess when we end up in this handler the instance is broken and needs manual recovery involving some surgery? or just a hard reboot on the source?","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e998609ad6059df04d711d8241e6dea25562980f","unresolved":true,"context_lines":[{"line_number":10655,"context_line":"        \"\"\""},{"line_number":10656,"context_line":"        LOG.info(\u0027Driver completed live migration to %s.\u0027, dest,"},{"line_number":10657,"context_line":"                 instance\u003dinstance)"},{"line_number":10658,"context_line":"        # Restore destination networking before allowing its monitor to"},{"line_number":10659,"context_line":"        # finalize. Activation failure cannot reverse the completed transfer."},{"line_number":10660,"context_line":"        try:"},{"line_number":10661,"context_line":"            migration_obj \u003d objects.Migration("}],"source_content_type":"text/x-python","patch_set":7,"id":"a509df69_31a8f409","line":10658,"range":{"start_line":10658,"start_character":10,"end_line":10658,"end_character":17},"updated":"2026-12-02 11:38:05.000000000","message":"restore is a strange word for me here signalling some kind of recovery, which it isn\u0027t. \"Switch to\"? \"Activate\"?","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e998609ad6059df04d711d8241e6dea25562980f","unresolved":true,"context_lines":[{"line_number":10668,"context_line":"                          instance\u003dinstance)"},{"line_number":10669,"context_line":""},{"line_number":10670,"context_line":"        migration \u003d migrate_data.migration"},{"line_number":10671,"context_line":"        deleted \u003d self.reportclient.delete_allocation_for_instance("},{"line_number":10672,"context_line":"            ctxt, migration.uuid, consumer_type\u003d\u0027migration\u0027, force\u003dFalse)"},{"line_number":10673,"context_line":"        # False means Placement confirmed the allocations are already gone."},{"line_number":10674,"context_line":"        # None means the client\u0027s safe_connect wrapper swallowed a failure."},{"line_number":10675,"context_line":"        if deleted is None:"}],"source_content_type":"text/x-python","patch_set":7,"id":"e8cc1070_54073599","line":10672,"range":{"start_line":10671,"start_character":7,"end_line":10672,"end_character":73},"updated":"2026-12-02 11:38:05.000000000","message":"auch, this is a wrongly name function that scared me. We are not deleting the instance allocation here. This function deletes any kind of consumer\u0027s allocation. Can we rename the function in a followup? (or add a second one with a better name if renaming is too much diff elswhere?)","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"2cf0c395b65611a1f6c29da8a0c61fd99d4ae6ab","unresolved":true,"context_lines":[{"line_number":10675,"context_line":"        if deleted is None:"},{"line_number":10676,"context_line":"            raise exception.AllocationDeleteFailed("},{"line_number":10677,"context_line":"                consumer_uuid\u003dmigration.uuid,"},{"line_number":10678,"context_line":"                error\u003d\u0027Unable to confirm live migration success in Placement\u0027)"},{"line_number":10679,"context_line":""},{"line_number":10680,"context_line":"        # Placement now authorizes destination finalization. Do not let a"},{"line_number":10681,"context_line":"        # source cleanup failure reach the caller\u0027s instance-error handling,"}],"source_content_type":"text/x-python","patch_set":7,"id":"0b542560_04c6bddd","line":10678,"updated":"2026-11-26 16:26:36.000000000","message":"we defensively gate here by saying that the live-migration didn\u0027t worked so the action becomes an error but the destination monitor is still actively looking this allocation, I\u0027d rather retry to delete that allocation, because the dest could wait forever if not, provided we also consider the case that if Placement commits the deletion but we got a network issue on the response, then the destination would do the necessary tasks and the retry would go to False.","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e998609ad6059df04d711d8241e6dea25562980f","unresolved":true,"context_lines":[{"line_number":10675,"context_line":"        if deleted is None:"},{"line_number":10676,"context_line":"            raise exception.AllocationDeleteFailed("},{"line_number":10677,"context_line":"                consumer_uuid\u003dmigration.uuid,"},{"line_number":10678,"context_line":"                error\u003d\u0027Unable to confirm live migration success in Placement\u0027)"},{"line_number":10679,"context_line":""},{"line_number":10680,"context_line":"        # Placement now authorizes destination finalization. Do not let a"},{"line_number":10681,"context_line":"        # source cleanup failure reach the caller\u0027s instance-error handling,"}],"source_content_type":"text/x-python","patch_set":7,"id":"ef442eca_0d3175de","line":10678,"in_reply_to":"0b542560_04c6bddd","updated":"2026-12-02 11:38:05.000000000","message":"I agree to retry, the delete_allocation_for_instance does not have any retries built in, maybe we want another helper in the reportclient that is better named (see above) and also implements retry.","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e998609ad6059df04d711d8241e6dea25562980f","unresolved":false,"context_lines":[{"line_number":10681,"context_line":"        # source cleanup failure reach the caller\u0027s instance-error handling,"},{"line_number":10682,"context_line":"        # particularly when both computes share the same instance DB row."},{"line_number":10683,"context_line":"        try:"},{"line_number":10684,"context_line":"            # FIXME(danms): this method does a bunch of cleanup and some of the"},{"line_number":10685,"context_line":"            # steps could prevent other steps from happening. We run this here"},{"line_number":10686,"context_line":"            # without letting the failure stop other work we have to do, but"},{"line_number":10687,"context_line":"            # this \"non-critical cleanup\" method should probably be more"}],"source_content_type":"text/x-python","patch_set":7,"id":"f0a9b764_b7c43ff1","line":10684,"updated":"2026-12-02 11:38:05.000000000","message":"thanks","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e998609ad6059df04d711d8241e6dea25562980f","unresolved":true,"context_lines":[{"line_number":10691,"context_line":"        except Exception:"},{"line_number":10692,"context_line":"            LOG.exception(\u0027Source cleanup failed after publishing successful \u0027"},{"line_number":10693,"context_line":"                          \u0027live migration to %s in Placement.\u0027, dest,"},{"line_number":10694,"context_line":"                          instance\u003dinstance)"},{"line_number":10695,"context_line":""},{"line_number":10696,"context_line":"        try:"},{"line_number":10697,"context_line":"            migration.status \u003d \u0027completed\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"02b0770b_cbebebec","line":10694,"updated":"2026-12-02 11:38:05.000000000","message":"yepp, hopefully this exception is now enough to give a hint at what point the cleanup failed so the manual cleanup can be done. When we implement the FIXME noted above we can be more specific in the logging to say what cleanup needs to be done manually if any.","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"7d6e4129d326968bcb2560e27ec0065d1e7b4ba1","unresolved":false,"context_lines":[{"line_number":10691,"context_line":"        except Exception:"},{"line_number":10692,"context_line":"            LOG.exception(\u0027Source cleanup failed after publishing successful \u0027"},{"line_number":10693,"context_line":"                          \u0027live migration to %s in Placement.\u0027, dest,"},{"line_number":10694,"context_line":"                          instance\u003dinstance)"},{"line_number":10695,"context_line":""},{"line_number":10696,"context_line":"        try:"},{"line_number":10697,"context_line":"            migration.status \u003d \u0027completed\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"43c54eed_5d710828","line":10694,"in_reply_to":"02b0770b_cbebebec","updated":"2026-12-02 11:40:23.000000000","message":"Acknowledged","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e998609ad6059df04d711d8241e6dea25562980f","unresolved":true,"context_lines":[{"line_number":10789,"context_line":"        self.network_api.setup_networks_on_host(context, instance, self.host)"},{"line_number":10790,"context_line":""},{"line_number":10791,"context_line":"        self.driver.rollback_live_migration_at_source("},{"line_number":10792,"context_line":"            context, instance, migrate_data)"},{"line_number":10793,"context_line":""},{"line_number":10794,"context_line":"        # Restore this compute\u0027s volume BDMs without disconnecting or"},{"line_number":10795,"context_line":"        # deleting destination attachments. The destination retains its own"}],"source_content_type":"text/x-python","patch_set":7,"id":"2e7edbad_8e69b8ac","line":10792,"updated":"2026-12-02 11:38:05.000000000","message":"does this depend on the BDMs pointing to the source already? (that is down just below)","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e998609ad6059df04d711d8241e6dea25562980f","unresolved":true,"context_lines":[{"line_number":10809,"context_line":"            bdm.connection_info \u003d source_bdm.connection_info"},{"line_number":10810,"context_line":"            bdm.save()"},{"line_number":10811,"context_line":""},{"line_number":10812,"context_line":"        self._notify_about_instance_usage(context, instance,"},{"line_number":10813,"context_line":"                                          \"live_migration._rollback.start\")"},{"line_number":10814,"context_line":"        compute_utils.notify_about_instance_action(context, instance,"},{"line_number":10815,"context_line":"                self.host,"},{"line_number":10816,"context_line":"                action\u003dfields.NotificationAction.LIVE_MIGRATION_ROLLBACK,"},{"line_number":10817,"context_line":"                phase\u003dfields.NotificationPhase.START,"},{"line_number":10818,"context_line":"                bdms\u003dbdms)"},{"line_number":10819,"context_line":""},{"line_number":10820,"context_line":"        # NOTE(luyao): We only update instance info after rollback operations"},{"line_number":10821,"context_line":"        # are complete"}],"source_content_type":"text/x-python","patch_set":7,"id":"007c996c_e22aefa7","line":10818,"range":{"start_line":10812,"start_character":0,"end_line":10818,"end_character":26},"updated":"2026-12-02 11:38:05.000000000","message":"this should be moved to the top of the function as it signals the start of the rollback","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"6d2f7fb10dad90df1fd1f41ea92187e16dd67bb4","unresolved":true,"context_lines":[{"line_number":10883,"context_line":"        \"\"\""},{"line_number":10884,"context_line":"        dest_resources \u003d DestMigrationResources()"},{"line_number":10885,"context_line":"        try:"},{"line_number":10886,"context_line":"            self._prepare_live_migration_v2_destination("},{"line_number":10887,"context_line":"                ctxt, instance, migrate_data, migration, limits,"},{"line_number":10888,"context_line":"                dest_check_data, dest_resources)"},{"line_number":10889,"context_line":"            self._start_recorded_task("},{"line_number":10890,"context_line":"                thread_pool_factory.ExecutorType.LIVE_MIGRATION,"},{"line_number":10891,"context_line":"                \u0027live_migration_v2_monitor\u0027, instance, ctxt,"}],"source_content_type":"text/x-python","patch_set":7,"id":"c0a94329_73677953","line":10888,"range":{"start_line":10886,"start_character":0,"end_line":10888,"end_character":48},"updated":"2026-11-30 18:20:07.000000000","message":"If we keep this setup skipped from RPC tracking and not starting the task at the start, then _prepare_live_migration_v2_destination work itself is untracked, and any shutdown happening during that work will not let graceful shutdown to wait for live migration and shut down the dest immediately. \n\nWe need to skip the general RPC tracking, which is correct, as this RPC call return does not tell whether live migration work on the dest is done or not. But we need to start the task \u0027live_migration_v2_at_dest\u0027 at the start of this function which can be ended in the function live_migration_v2_monitor() (aftre L11051). I think live_migration_v2_monitor() is the final set of work done at dest (I mean that when it is completed, it means migration on dest is done and it can be shut down).\n\nIn summary, start the task here at the start and end it when it actually finishes on dest, irrespective of which method is run on which executors.\n\n\n Same as we did for v1 case:\n- starting task in pre_live_migration[1]\n- end in post_live_migration_at_destination or error/rollback_live_migration_at_destination [2]\n\n[1]https://github.com/openstack/nova/blob/ec53ac1270aa5f90f954aba9ad0f03b053061985/nova/compute/manager.py#L9072\n[2]\nhttps://github.com/openstack/nova/blob/ec53ac1270aa5f90f954aba9ad0f03b053061985/nova/compute/manager.py#L9955\nhttps://github.com/openstack/nova/blob/ec53ac1270aa5f90f954aba9ad0f03b053061985/nova/compute/manager.py#L10289","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"2cf0c395b65611a1f6c29da8a0c61fd99d4ae6ab","unresolved":false,"context_lines":[{"line_number":11080,"context_line":"                # both consumers on the next poll, without running cleanup."},{"line_number":11081,"context_line":"                LOG.warning(\u0027Failed to read Placement allocations while \u0027"},{"line_number":11082,"context_line":"                            \u0027monitoring live migration %s; will retry: %s\u0027,"},{"line_number":11083,"context_line":"                            migration.uuid, exc, instance\u003dinstance)"},{"line_number":11084,"context_line":"            else:"},{"line_number":11085,"context_line":"                if not migration_allocs:"},{"line_number":11086,"context_line":"                    # Migration consumer allocations are gone — the source"}],"source_content_type":"text/x-python","patch_set":7,"id":"3bcdd098_de7e9c4e","line":11083,"updated":"2026-11-26 16:26:36.000000000","message":"++","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e998609ad6059df04d711d8241e6dea25562980f","unresolved":true,"context_lines":[{"line_number":11140,"context_line":""},{"line_number":11141,"context_line":"        if dest_resources.driver_prepared:"},{"line_number":11142,"context_line":"            try:"},{"line_number":11143,"context_line":"                _do_cleanup, destroy_disks \u003d self._live_migration_cleanup_flags("},{"line_number":11144,"context_line":"                    dest_resources.migrate_data,"},{"line_number":11145,"context_line":"                    migr_ctxt\u003dinstance.migration_context)"},{"line_number":11146,"context_line":"                # Volumes are disconnected separately using the driver BDMs"}],"source_content_type":"text/x-python","patch_set":7,"id":"d4c7f8df_834739f0","line":11143,"updated":"2026-12-02 11:38:05.000000000","message":"long line (here and below)","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e998609ad6059df04d711d8241e6dea25562980f","unresolved":true,"context_lines":[{"line_number":11156,"context_line":"            except Exception:"},{"line_number":11157,"context_line":"                LOG.exception(\u0027Failed to roll back destination driver setup.\u0027,"},{"line_number":11158,"context_line":"                              instance\u003dinstance)"},{"line_number":11159,"context_line":"        # A failed driver preparation may have rejected pre-existing files."},{"line_number":11160,"context_line":"        # Do not destroy the domain/disks in that case, but disconnect any"},{"line_number":11161,"context_line":"        # volumes the driver may already have connected."},{"line_number":11162,"context_line":"        if dest_resources.driver_started:"}],"source_content_type":"text/x-python","patch_set":7,"id":"4ad07af1_0f58479a","line":11159,"range":{"start_line":11159,"start_character":0,"end_line":11159,"end_character":75},"updated":"2026-12-02 11:38:05.000000000","message":"I cannot fully parse this sentence","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e998609ad6059df04d711d8241e6dea25562980f","unresolved":true,"context_lines":[{"line_number":11162,"context_line":"        if dest_resources.driver_started:"},{"line_number":11163,"context_line":"            # Same-cell BDM rows may already have been restored by the source."},{"line_number":11164,"context_line":"            # Disconnect using our retained destination driver BDMs, without"},{"line_number":11165,"context_line":"            # saving them or reloading connection information from the database."},{"line_number":11166,"context_line":"            for driver_bdm in ("},{"line_number":11167,"context_line":"                    dest_resources.block_device_info[\u0027block_device_mapping\u0027]):"},{"line_number":11168,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"eb45e5b9_140154dd","line":11165,"updated":"2026-12-02 11:38:05.000000000","message":"We do a lot of BDM dancing now due to the differences between same-cell and cross-cell and due to same-cell case sharing the same BDMs DB rows across two computes doing async update on them. Also there is the dest_resources on the dest side trying to encapsulate it and there is old_* fields on the source side trying to encapsulate it. This feels a bit arbitrary. \n\nWe did a clear ownership assignment of the Placement allocation. Only the source node changes it, the dest only monitors it. That is a lot clearer setup. \n\nAlso somehow the network setup is better factored even though both computes does networking setup it is lot less noisy code.","commit_id":"ecc1bb0079969c3da926d77f034de2deb677a433"}],"nova/objects/migrate_data.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9a4844c82cb0bd76ba2ad862432cc0e7b09d5464","unresolved":true,"context_lines":[{"line_number":176,"context_line":"        # TODO(mdbooth): This field was made redundant by change Ibe9215c0. We"},{"line_number":177,"context_line":"        # should eventually remove it."},{"line_number":178,"context_line":"        \u0027old_vol_attachment_ids\u0027: fields.DictOfStringsField(),"},{"line_number":179,"context_line":"        \u0027old_vol_connection_infos\u0027: fields.DictOfStringsField(),"},{"line_number":180,"context_line":"        # wait_for_vif_plugged is set in pre_live_migration on the destination"},{"line_number":181,"context_line":"        # compute host based on the [compute]/live_migration_wait_for_vif_plug"},{"line_number":182,"context_line":"        # config option value; a default value is not set here since the"}],"source_content_type":"text/x-python","patch_set":6,"id":"1fb915e5_5f928bb9","line":179,"updated":"2026-11-25 14:21:43.000000000","message":"lets call this out in the commit message with reasoning. It might also be a separate commit.\n\n// after reading the commit message (sorry :D)\n\nOK I think this will be moved to a separate commit.","commit_id":"2a479020dd0d55bd7439bde5a6fc137609cbd6f1"}]}
