)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"c21309c7fca55230f96fe7574d03a8fed08341c4","unresolved":true,"context_lines":[{"line_number":12,"context_line":"the lazy-apply of the cell mapping change once we determine the"},{"line_number":13,"context_line":"outcome of the migration, we also apply the pending AZ pin."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Note that if we\u0027re not doing an actual cross-cell move, we don\u0027t"},{"line_number":16,"context_line":"actually have an indication that it moved cells. This PoC cheats"},{"line_number":17,"context_line":"a bit by just looking up the current host\u0027s AZ before applying."},{"line_number":18,"context_line":"However, we could also do a little more investigation to tighten"},{"line_number":19,"context_line":"that up."},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"6a878297_e1341867","line":17,"range":{"start_line":15,"start_character":0,"end_line":17,"end_character":63},"updated":"2026-11-23 18:41:14.000000000","message":"well this behvior should not be cell dependent\n\nthe new api command is not a request for a cross cell live migration\n\nits a request for a live migration to a diffent az\n\nwether that coress a cell or not is an internal impleation detail\nso its not cheatign to check fi the az has changed its actully the more corect approch\n\nusign soemthign to determin if it chaged cells would and then infering form that a need to check if we repin would however be a probelm.\n\nso this is ok.","commit_id":"79511c19b2d03c595e2f70d06ee7df142c21b579"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"92b645c555408730eb64a298f2cc4a9e0a37a12c","unresolved":true,"context_lines":[{"line_number":12,"context_line":"the lazy-apply of the cell mapping change once we determine the"},{"line_number":13,"context_line":"outcome of the migration, we also apply the pending AZ pin."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Note that if we\u0027re not doing an actual cross-cell move, we don\u0027t"},{"line_number":16,"context_line":"actually have an indication that it moved cells. This PoC cheats"},{"line_number":17,"context_line":"a bit by just looking up the current host\u0027s AZ before applying."},{"line_number":18,"context_line":"However, we could also do a little more investigation to tighten"},{"line_number":19,"context_line":"that up."},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7e6b1f7f_36bbe44c","line":17,"range":{"start_line":15,"start_character":0,"end_line":17,"end_character":63},"in_reply_to":"6a878297_e1341867","updated":"2026-11-23 23:50:33.000000000","message":"Definitely should  not be cells-dependent of course. I was being upfront about the cheating for PoC purposes specifically to indicate that we need something that behaves the same in either case.","commit_id":"79511c19b2d03c595e2f70d06ee7df142c21b579"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"c21309c7fca55230f96fe7574d03a8fed08341c4","unresolved":true,"context_lines":[{"line_number":18,"context_line":"However, we could also do a little more investigation to tighten"},{"line_number":19,"context_line":"that up."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"This is really just an example of how/where/when we could lazy-re-pin"},{"line_number":22,"context_line":"the instance in the case of new live migration."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: Iaa28096e4bf5f5efed9c8274fefd27d01fde008b"},{"line_number":25,"context_line":"Signed-off-by: Dan Smith \u003cdansmith@redhat.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ef95429e_ab5f11fb","line":22,"range":{"start_line":21,"start_character":0,"end_line":22,"end_character":47},"updated":"2026-11-23 18:41:14.000000000","message":"im still hoping that next cycle or the cylcle after we can move awy from any for mof lazy fixup like this or the cell mapping once we have time to work on removing the use of placment for signalling if we ever get to that but htis still feels like a foot gun to me.\n\nits oen we have agreed to exposes to folks but still one i worry about.","commit_id":"79511c19b2d03c595e2f70d06ee7df142c21b579"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a3b3e0fb6631e231533971b0a859ff7bcb3de732","unresolved":true,"context_lines":[{"line_number":18,"context_line":"However, we could also do a little more investigation to tighten"},{"line_number":19,"context_line":"that up."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"This is really just an example of how/where/when we could lazy-re-pin"},{"line_number":22,"context_line":"the instance in the case of new live migration."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: Iaa28096e4bf5f5efed9c8274fefd27d01fde008b"},{"line_number":25,"context_line":"Signed-off-by: Dan Smith \u003cdansmith@redhat.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"60f34cc2_cd89d5cf","line":22,"range":{"start_line":21,"start_character":0,"end_line":22,"end_character":47},"in_reply_to":"3359b576_599607e4","updated":"2026-11-24 11:39:16.000000000","message":"well this is defintly not keepign the logic close to where it belowns since your moving a db write in a read code path givign instance get which is primarly a read from the cell db a sideffect mutating the api db.\n\nit is inlien with 7.\n\neverntualy considtely is only a bug if it causes the state of the resouce and the tracked state in the db to be out of sync.\n\nif we are cliamign teh migtion is complete and the isntance action is complete and the isntance is active with task sate \u003d none then all cleanup and finasliation shoudl be compelte\n\nif you left the task state in pending_finalisation until it was actully done then i would agree its not a bug but if we have marked the migration as complete, emmited the relevent noticcaion and set the isntace action tocomplete but not fixed the cell mappings or az pin then the reported state of the vm does not match the state of the db.\n\n\nand where that become a probelsm is if we live migrate then live migrate again without ever doign another call to the instace api.\n\ni.e. i monitor the state of the migrateion via the migraiotn api and move it again withou ever doing a read that tirger this healing.\n\nso this is nto about eventual consitency its about correctnes.\n\nthe two are related but distinct","commit_id":"79511c19b2d03c595e2f70d06ee7df142c21b579"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7bf2f8f86d69481aa9488d79cf8875fab71984fa","unresolved":true,"context_lines":[{"line_number":18,"context_line":"However, we could also do a little more investigation to tighten"},{"line_number":19,"context_line":"that up."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"This is really just an example of how/where/when we could lazy-re-pin"},{"line_number":22,"context_line":"the instance in the case of new live migration."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: Iaa28096e4bf5f5efed9c8274fefd27d01fde008b"},{"line_number":25,"context_line":"Signed-off-by: Dan Smith \u003cdansmith@redhat.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"0370018a_90626383","line":22,"range":{"start_line":21,"start_character":0,"end_line":22,"end_character":47},"in_reply_to":"60f34cc2_cd89d5cf","updated":"2026-11-24 14:37:32.000000000","message":"\u003e if you left the task state in pending_finalisation until it was actully done then i would agree its not a bug but if we have marked the migration as complete, emmited the relevent noticcaion and set the isntace action tocomplete but not fixed the cell mappings or az pin then the reported state of the vm does not match the state of the db.\n\nThis would be leaving things incomplete that the computes are well capable of completing themselves, and which they own. That would be a net negative in my mind and I\u0027m not sure why we\u0027d do that. Especially since there\u0027s no way to see that, other than maybe peeking into the DB?\n\n\u003e and where that become a probelsm is if we live migrate then live migrate again without ever doign another call to the instace api.\n\nAgain, you can\u0027t do anything with a server without compute/api::get() being called, so this is not a thing. It\u0027s also been discussed earlier in the set.","commit_id":"79511c19b2d03c595e2f70d06ee7df142c21b579"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"92b645c555408730eb64a298f2cc4a9e0a37a12c","unresolved":true,"context_lines":[{"line_number":18,"context_line":"However, we could also do a little more investigation to tighten"},{"line_number":19,"context_line":"that up."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"This is really just an example of how/where/when we could lazy-re-pin"},{"line_number":22,"context_line":"the instance in the case of new live migration."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: Iaa28096e4bf5f5efed9c8274fefd27d01fde008b"},{"line_number":25,"context_line":"Signed-off-by: Dan Smith \u003cdansmith@redhat.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3359b576_599607e4","line":22,"range":{"start_line":21,"start_character":0,"end_line":22,"end_character":47},"in_reply_to":"ef95429e_ab5f11fb","updated":"2026-11-23 23:50:33.000000000","message":"Well, we should discuss that in detail later of course, but involving any more services in completing a live migration than absolutely necessary is unreasonable risk, IMHO. So the lazy completion feels like a (very important) feature to me, and not a bug.\n\nMaybe I\u0027m too old, but these use to be referenced more often:\n\nhttps://web.archive.org/web/20260828110626/https://wiki.openstack.org/wiki/BasicDesignTenets\n\nThis definitely fits with #7 for obvious reasons but also #6 which is keeping the logic close to where it belongs. For the actual migration, that\u0027s the minimum number of compute nodes, databases and rabbits required, which also fits #4. For the eventually-consistent AZ pin, that\u0027s the API which is the only place it\u0027s really ever considered. Putting anything synchronously in the middle of live migration that doesn\u0027t need to be fits with #3. Just referencing the tenets here as there seems to be a bit of a difference of opinion about whether or not eventual consistency is a bug or a feature. Making everything synchronous is easy in the happy times but it breaks hard. I think all the ways we see legacy live migration fail today is a good demonstration of that.","commit_id":"79511c19b2d03c595e2f70d06ee7df142c21b579"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"c21309c7fca55230f96fe7574d03a8fed08341c4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"316796dd_b913e254","updated":"2026-11-23 18:41:14.000000000","message":"i still need to reviwe this in more detail but thansk for at least creating poc.\n\ni will rework my other move operations poc on top of this and see if i can reuse the same approch for cold migrate resize and evacuate to heal pinning in all cases that require it.\n\nfor cold migrate/resize we dont need to do it lazially in the case were you are activly confirming or reveritign via the api but in the auto confrim case or if we fail before we reach verify resize we would need to clean up the pendign state.\n\n\nfor live migration with the new or old path if we fail in pre live migration or when we start teh migraton at the libvirt level (i.e. not the normal api driven abort path) we would also need to use the laze approch so im thinking if we shoudl alwasy rely on hte lazy fix or spcial case the places where we can do it egerly.","commit_id":"79511c19b2d03c595e2f70d06ee7df142c21b579"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9d2a7a473cc061e6fd77ae6b7a0a624e7b23bf4f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"d9441269_c18fd890","updated":"2026-11-24 10:49:36.000000000","message":"just partial review comments triggered by actually reviewing patches earlier in the series. I\u0027m not done with this patch just yet :)","commit_id":"79511c19b2d03c595e2f70d06ee7df142c21b579"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"92b645c555408730eb64a298f2cc4a9e0a37a12c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"2c6ba7f6_71c12273","in_reply_to":"316796dd_b913e254","updated":"2026-11-23 23:50:33.000000000","message":"\u003e for cold migrate/resize we dont need to do it lazially in the case were you are activly confirming or reveritign via the api but in the auto confrim case or if we fail before we reach verify resize we would need to clean up the pendign state.\n\nYep, agreed it should be non-lazy for the standard cases but lazy for the automatic case. However, I think the config for that is currently only required on the computes that will do the convert (or is it conductor?) so some care will be needed there.\n\n\u003e for live migration with the new or old path if we fail in pre live migration or when we start teh migraton at the libvirt level (i.e. not the normal api driven abort path) we would also need to use the laze approch so im thinking if we shoudl alwasy rely on hte lazy fix or spcial case the places where we can do it egerly.\n\nI\u0027m sure we disagree here, but I would much prefer to not add this behavior to legacy live migration. Reliably knowing when the migration is done from the top is much harder in that case (maybe impossible given all the cleanup RPCs that could be pending, I\u0027d have to look). Leaving it as unable to migrate pinned instances feels like a good scope containment measure, especially since we have unpin as an escape.","commit_id":"79511c19b2d03c595e2f70d06ee7df142c21b579"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"7b49dbdb6bbd64f267b5f049088369357d48f9ce","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"d3d678b4_1d9d421a","updated":"2026-12-02 13:27:36.000000000","message":"note hte behivor of this patch is incostent with the behviro of unhsleve so i have adressed that in https://review.opendev.org/c/openstack/nova/+/1018061/1\n\nso that vm that were previously unpinned will not be pinned by the request to move it to an az\n\nvms that were previously pinned will be pinned as is the a case for unhsleve.\n\ni have rebased my az move serise on top so i will update the corresponding spec to document this approch leater today","commit_id":"7732914d7bd87f3115caa7247531001cb849e19f"}],"doc/source/admin/configuration/cross-cell-live-migration.rst":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"3ec79066351cc15795ed90b59ccee3afd8c66d78","unresolved":false,"context_lines":[{"line_number":52,"context_line":"retain the original pin. A host-only move updates an existing pin to the"},{"line_number":53,"context_line":"destination host\u0027s AZ, but does not pin an instance that was unpinned."},{"line_number":54,"context_line":"For same-cell moves, lazy resolution applies the pending pin only if it"},{"line_number":55,"context_line":"matches the current instance host\u0027s AZ; otherwise it discards the pending pin."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"The ``block_migration`` and ``disk_over_commit`` parameters from the old API"},{"line_number":58,"context_line":"are not accepted; block migration is decided automatically."}],"source_content_type":"text/x-rst","patch_set":3,"id":"6b175d45_4cf1db73","line":55,"updated":"2026-11-25 15:50:36.000000000","message":"I think this conditional is valid for the cross cell move as well. I\u0027m not saying we need to apply it there as we have other inputs to decided on, I just not that this is a generically correct condition.","commit_id":"79511c19b2d03c595e2f70d06ee7df142c21b579"}],"nova/compute/api.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"c21309c7fca55230f96fe7574d03a8fed08341c4","unresolved":true,"context_lines":[{"line_number":3035,"context_line":"                _(\"Cell %s is not responding or returned an exception, \""},{"line_number":3036,"context_line":"                  \"hence instance info is not available.\") % cell_uuid)"},{"line_number":3037,"context_line":""},{"line_number":3038,"context_line":"    def _finish_live_migration_az(self, context, instance, succeeded\u003dNone):"},{"line_number":3039,"context_line":"        \"\"\"Resolve the staged AZ pin before clearing dual-cell routing."},{"line_number":3040,"context_line":""},{"line_number":3041,"context_line":"        For same-cell moves, infer the outcome from the current host\u0027s AZ."}],"source_content_type":"text/x-python","patch_set":3,"id":"42630a30_149331d5","line":3038,"range":{"start_line":3038,"start_character":8,"end_line":3038,"end_character":33},"updated":"2026-11-23 18:41:14.000000000","message":"i guess if every api acction like cold migrate, live meigrtae, lock reset-state\n\nare going to hith one of _get_instance_cross_cell_lookup or _get_instance\n\nthen i guess this is ok.\n\nthe footgun woudl be if this was only invoked as a sidefect of server list or show.\n\ni have not confirm the assertion that this is called in all relevent code path but that is my main consern with doign this in the api level lazilly.","commit_id":"79511c19b2d03c595e2f70d06ee7df142c21b579"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"3ec79066351cc15795ed90b59ccee3afd8c66d78","unresolved":true,"context_lines":[{"line_number":3035,"context_line":"                _(\"Cell %s is not responding or returned an exception, \""},{"line_number":3036,"context_line":"                  \"hence instance info is not available.\") % cell_uuid)"},{"line_number":3037,"context_line":""},{"line_number":3038,"context_line":"    def _finish_live_migration_az(self, context, instance, succeeded\u003dNone):"},{"line_number":3039,"context_line":"        \"\"\"Resolve the staged AZ pin before clearing dual-cell routing."},{"line_number":3040,"context_line":""},{"line_number":3041,"context_line":"        For same-cell moves, infer the outcome from the current host\u0027s AZ."}],"source_content_type":"text/x-python","patch_set":3,"id":"bf50d6ee_f31743f9","line":3038,"range":{"start_line":3038,"start_character":8,"end_line":3038,"end_character":33},"in_reply_to":"20046a66_80e574ff","updated":"2026-11-25 15:50:36.000000000","message":"\u003e i guess if every api acction like cold migrate, live meigrtae, lock reset-state\n\u003e\n\u003e are going to hith one of _get_instance_cross_cell_lookup or _get_instance\n\u003e\n\u003e then i guess this is ok.\n...\n\u003e i have not confirm the assertion that this is called in all relevent code path but that is my main consern with doign this in the api level lazilly.\n\nI did some digging about this and found that almost all of externally triggered instance DB reads are going through this. I noted the exceptions and we can review them / fix them case by case:\nhttps://review.opendev.org/c/openstack/nova/+/1008837/2//COMMIT_MSG#comment-60aaf26b_7dae3d9c\n\n\u003e yes and like Schrödinger\u0027s cat obserivng its state will mutate it\n\nnope, this still needs the external observer, the API call, almost any API call, to trigger the state fixing.\n\n\u003e that means a reqeust for server show or detail list with only the reader role will write to the db and change state. and for a detail list that could be a lot of write as the side effect of a read turning an operation that should be fast ane parallel into somehting potinclly slower and serial.\n\nThe positive side of checking the need for a state fixup at every DB read is that it amortize the cost of the write as well. So there won\u0027t really be one big bang openstack server list command that suddenly writes to 1000s of DB rows. \n\nThis is not the first time we do something like this. We did data migration at data read may times in the past. (Even it in this specific InstanceMapping codepath as well, look for the user id fixup in the code). I don\u0027t remember reports about performance issue due to the DB read escalating to writes.\n\nI also consider the if this causes any irreversible structural damage if in the future we come up with a better solution and I see very limited. The RequestSpec.pending_availablity_zone flag is one, but object is a serialized blob in the DB so the field is removable later if not needed. The other can be the InstanceMapping.old_cell_mapping field but I don\u0027t think we will come up with a solution that does not require two cell_ids to track for a cross cell migration.\n\nSo I think this is safe to progress with for now (pending review on the exceptions I linked to above)","commit_id":"79511c19b2d03c595e2f70d06ee7df142c21b579"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"92b645c555408730eb64a298f2cc4a9e0a37a12c","unresolved":true,"context_lines":[{"line_number":3035,"context_line":"                _(\"Cell %s is not responding or returned an exception, \""},{"line_number":3036,"context_line":"                  \"hence instance info is not available.\") % cell_uuid)"},{"line_number":3037,"context_line":""},{"line_number":3038,"context_line":"    def _finish_live_migration_az(self, context, instance, succeeded\u003dNone):"},{"line_number":3039,"context_line":"        \"\"\"Resolve the staged AZ pin before clearing dual-cell routing."},{"line_number":3040,"context_line":""},{"line_number":3041,"context_line":"        For same-cell moves, infer the outcome from the current host\u0027s AZ."}],"source_content_type":"text/x-python","patch_set":3,"id":"528200b8_7738969d","line":3038,"range":{"start_line":3038,"start_character":8,"end_line":3038,"end_character":33},"in_reply_to":"42630a30_149331d5","updated":"2026-11-23 23:50:33.000000000","message":"My feeling on this is that the only things that know about an instance\u0027s current AZ pin are those that start with an API action. Thus to me leaving an instance in pending-az-repin state indefinitely is totally fine because it only means nothing has cared yet.\n\nIt is like Schrödinger\u0027s AZ pin.. if we haven\u0027t looked, it hasn\u0027t mattered :)","commit_id":"79511c19b2d03c595e2f70d06ee7df142c21b579"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a3b3e0fb6631e231533971b0a859ff7bcb3de732","unresolved":true,"context_lines":[{"line_number":3035,"context_line":"                _(\"Cell %s is not responding or returned an exception, \""},{"line_number":3036,"context_line":"                  \"hence instance info is not available.\") % cell_uuid)"},{"line_number":3037,"context_line":""},{"line_number":3038,"context_line":"    def _finish_live_migration_az(self, context, instance, succeeded\u003dNone):"},{"line_number":3039,"context_line":"        \"\"\"Resolve the staged AZ pin before clearing dual-cell routing."},{"line_number":3040,"context_line":""},{"line_number":3041,"context_line":"        For same-cell moves, infer the outcome from the current host\u0027s AZ."}],"source_content_type":"text/x-python","patch_set":3,"id":"20046a66_80e574ff","line":3038,"range":{"start_line":3038,"start_character":8,"end_line":3038,"end_character":33},"in_reply_to":"528200b8_7738969d","updated":"2026-11-24 11:39:16.000000000","message":"yes and like Schrödinger\u0027s cat obserivng its state will mutate it\n\nthat means a reqeust for server show  or detail list with only the reader role will write to the db and change state.  and for a detail list that could be a lot of write as the side effect of a read turning an operation that should be fast ane parallel into somehting potinclly slower and serial.","commit_id":"79511c19b2d03c595e2f70d06ee7df142c21b579"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9e048a33ade7f50556bab5565b66ce68f0f1e5d7","unresolved":true,"context_lines":[{"line_number":3035,"context_line":"                _(\"Cell %s is not responding or returned an exception, \""},{"line_number":3036,"context_line":"                  \"hence instance info is not available.\") % cell_uuid)"},{"line_number":3037,"context_line":""},{"line_number":3038,"context_line":"    def _finish_live_migration_az(self, context, instance, succeeded\u003dNone):"},{"line_number":3039,"context_line":"        \"\"\"Resolve the staged AZ pin before clearing dual-cell routing."},{"line_number":3040,"context_line":""},{"line_number":3041,"context_line":"        For same-cell moves, infer the outcome from the current host\u0027s AZ."}],"source_content_type":"text/x-python","patch_set":3,"id":"31bc76e0_698b77a2","line":3038,"range":{"start_line":3038,"start_character":8,"end_line":3038,"end_character":33},"in_reply_to":"bf50d6ee_f31743f9","updated":"2026-11-25 16:06:14.000000000","message":"```\nyes and like Schrödinger\u0027s cat obserivng its state will mutate it\n\nnope, this still needs the external observer, the API call, almost any API call, to trigger the state fixing.\n```\n\nyes that was my point the extrenal observer calling the api cause the mutation fo the db state even if that api call is made with a token that only has the reader role which otherwise would nto be allowed to muteate the state in the db.\n\n```\nSo there won\u0027t really be one big bang openstack server list command that suddenly writes to 1000s of DB rows.\n```\nideally yoru correct but ill not that both ceilometer and watcher do lis all instance in all tenatns and cells perodicly\n\nwatcher does this onec an hour or once every 15mins downstream\nceilimiter does it on a similar cadence.\n\nBoth are doing it to build metrics ro a view of the underlying resourse on the cloud.\n\nwiht that said the api supprot pagination so even in teh case fo listing all the  isntnaces that shoudl happen in batches today.","commit_id":"79511c19b2d03c595e2f70d06ee7df142c21b579"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9d2a7a473cc061e6fd77ae6b7a0a624e7b23bf4f","unresolved":true,"context_lines":[{"line_number":3042,"context_line":"        Cross-cell lookups pass the outcome of resolving the cell mapping."},{"line_number":3043,"context_line":"        \"\"\""},{"line_number":3044,"context_line":"        spec \u003d objects.RequestSpec.get_by_instance_uuid(context, instance.uuid)"},{"line_number":3045,"context_line":"        pending \u003d spec.pending_availability_zone"},{"line_number":3046,"context_line":"        if pending:"},{"line_number":3047,"context_line":"            if succeeded is None:"},{"line_number":3048,"context_line":"                succeeded \u003d pending \u003d\u003d ("},{"line_number":3049,"context_line":"                    availability_zones.get_host_availability_zone("}],"source_content_type":"text/x-python","patch_set":3,"id":"2ef2a8ed_41004683","line":3046,"range":{"start_line":3045,"start_character":0,"end_line":3046,"end_character":19},"updated":"2026-11-24 10:49:36.000000000","message":"can pending_availability_zone be None *because* the CCLM caller asked the instance to be unpinned as a result of the move? Or it is only None if there is no pending CCLM operation?","commit_id":"79511c19b2d03c595e2f70d06ee7df142c21b579"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a3b3e0fb6631e231533971b0a859ff7bcb3de732","unresolved":true,"context_lines":[{"line_number":3042,"context_line":"        Cross-cell lookups pass the outcome of resolving the cell mapping."},{"line_number":3043,"context_line":"        \"\"\""},{"line_number":3044,"context_line":"        spec \u003d objects.RequestSpec.get_by_instance_uuid(context, instance.uuid)"},{"line_number":3045,"context_line":"        pending \u003d spec.pending_availability_zone"},{"line_number":3046,"context_line":"        if pending:"},{"line_number":3047,"context_line":"            if succeeded is None:"},{"line_number":3048,"context_line":"                succeeded \u003d pending \u003d\u003d ("},{"line_number":3049,"context_line":"                    availability_zones.get_host_availability_zone("}],"source_content_type":"text/x-python","patch_set":3,"id":"f3e7c539_c055cc85","line":3046,"range":{"start_line":3045,"start_character":0,"end_line":3046,"end_character":19},"in_reply_to":"2ef2a8ed_41004683","updated":"2026-11-24 11:39:16.000000000","message":"if we were to mirror unhselve to az/host  you would unpin via explcitly passing null which would be python None\n\nwe coudl use a differnt sentenial i guess either usign the sentinel object pattern or maybe the empty string\n\nwe just need someitng to distinguis unset vs an allowed value so a module level constnat object() is probly the simplest","commit_id":"79511c19b2d03c595e2f70d06ee7df142c21b579"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ae159bf46dd43f01f8c31404212c2def2db368a3","unresolved":false,"context_lines":[{"line_number":3051,"context_line":"            if succeeded:"},{"line_number":3052,"context_line":"                spec.availability_zone \u003d pending"},{"line_number":3053,"context_line":"            spec.pending_availability_zone \u003d None"},{"line_number":3054,"context_line":"            spec.save()"},{"line_number":3055,"context_line":""},{"line_number":3056,"context_line":"    def _get_instance_cross_cell_lookup(self, context, im, expected_attrs,"},{"line_number":3057,"context_line":"                                        cell_down_support):"}],"source_content_type":"text/x-python","patch_set":3,"id":"cd28f304_2b7803fe","line":3054,"updated":"2026-11-24 14:04:25.000000000","message":"++","commit_id":"79511c19b2d03c595e2f70d06ee7df142c21b579"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9d2a7a473cc061e6fd77ae6b7a0a624e7b23bf4f","unresolved":false,"context_lines":[{"line_number":3121,"context_line":"        if migration_complete:"},{"line_number":3122,"context_line":"            # Definitely complete, so clear our dual-cell routing"},{"line_number":3123,"context_line":"            instance \u003d new_result"},{"line_number":3124,"context_line":"            self._finish_live_migration_az(context, instance, True)"},{"line_number":3125,"context_line":"            im.set_cells_atomically(new_cm, None)"},{"line_number":3126,"context_line":"        elif migration_reverted:"},{"line_number":3127,"context_line":"            # Definitely reverted, so revert our dual-cell routing"},{"line_number":3128,"context_line":"            instance \u003d old_result"}],"source_content_type":"text/x-python","patch_set":3,"id":"ac3736f6_db755fa8","line":3125,"range":{"start_line":3124,"start_character":0,"end_line":3125,"end_character":49},"updated":"2026-11-24 10:49:36.000000000","message":"This two both writes the API DB but in two different transactions. I\u0027m wondering if failing on the set_cells_atomically() call due to a race, could cause problems as the AZ is already pinned in the _finish_live_migration_az() call. \n\nAt least we need this ordering as once set_cells_atomically() succeeds we won\u0027t attempt the lazy cleanup again, so that should be the last DB write here in the hook.\n\nRe-running _finish_live_migration_az multiple times (as previous set_cells_atomically failing) is OK as _finish_live_migration_az atomically moving the pending value to the real field and resetting the pending field and the logic gated on the pending field.\n\nSo the only visible effect of a race here afaik is that the AZ pin will be visible on the API but the cell mapping is not yet cleaned up (not visible on the API). As a not cleaned cell mapping is still a functional cell mapping for the instance, I think this race is not a problem.\n\n// later\n\nAbove I assumed that both racing requests read the same \"migration\". That only holds if a not yet cleaned up instance mapping prevents the next CCLM (or other move operations manipulating the request_spec in the DB). I guess the race is still safe as all those new lifecycle operations are hitting this same codepath very early and will attempt the cleanup first before manipulating the request_spec.","commit_id":"79511c19b2d03c595e2f70d06ee7df142c21b579"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a3b3e0fb6631e231533971b0a859ff7bcb3de732","unresolved":true,"context_lines":[{"line_number":3121,"context_line":"        if migration_complete:"},{"line_number":3122,"context_line":"            # Definitely complete, so clear our dual-cell routing"},{"line_number":3123,"context_line":"            instance \u003d new_result"},{"line_number":3124,"context_line":"            self._finish_live_migration_az(context, instance, True)"},{"line_number":3125,"context_line":"            im.set_cells_atomically(new_cm, None)"},{"line_number":3126,"context_line":"        elif migration_reverted:"},{"line_number":3127,"context_line":"            # Definitely reverted, so revert our dual-cell routing"},{"line_number":3128,"context_line":"            instance \u003d old_result"}],"source_content_type":"text/x-python","patch_set":3,"id":"cccb740e_1a82b8e0","line":3125,"range":{"start_line":3124,"start_character":0,"end_line":3125,"end_character":49},"in_reply_to":"ac3736f6_db755fa8","updated":"2026-11-24 11:39:16.000000000","message":"when exactly are we goign to condier the live migration complet by the way in terms of the instace action as discting form the migration recored\n\nis it when the migration recored is set to complete or whne we actully finish doign all the deffered clenaup?","commit_id":"79511c19b2d03c595e2f70d06ee7df142c21b579"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ae159bf46dd43f01f8c31404212c2def2db368a3","unresolved":true,"context_lines":[{"line_number":5828,"context_line":""},{"line_number":5829,"context_line":"        request_spec \u003d objects.RequestSpec.get_by_instance_uuid("},{"line_number":5830,"context_line":"            context, instance.uuid)"},{"line_number":5831,"context_line":""},{"line_number":5832,"context_line":"        if dest_host and dest_availability_zone:"},{"line_number":5833,"context_line":"            host_az \u003d availability_zones.get_host_availability_zone("},{"line_number":5834,"context_line":"                context, dest_host)"}],"source_content_type":"text/x-python","patch_set":3,"id":"dd7ab582_ade241c5","line":5831,"updated":"2026-11-24 14:04:25.000000000","message":"As I mentioned couple of times, I\u0027d appreciate if you could return some exception if someone wants to move a BFV instance that\u0027s pinned to an AZ if cross_az_attach is False (which means \"don\u0027t move it\") unless we\u0027re 100% sure that when live-migrating, we also move the volume to another AZ.\n\nIf you don\u0027t want that conditional here, then at least I\u0027d appreciate some big fat API reference docs that would say \"you can BREAK your instances if you live-migrate to another AZ, dude\".","commit_id":"79511c19b2d03c595e2f70d06ee7df142c21b579"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"807770b780879b042af22606e0ea0819539821ca","unresolved":true,"context_lines":[{"line_number":5828,"context_line":""},{"line_number":5829,"context_line":"        request_spec \u003d objects.RequestSpec.get_by_instance_uuid("},{"line_number":5830,"context_line":"            context, instance.uuid)"},{"line_number":5831,"context_line":""},{"line_number":5832,"context_line":"        if dest_host and dest_availability_zone:"},{"line_number":5833,"context_line":"            host_az \u003d availability_zones.get_host_availability_zone("},{"line_number":5834,"context_line":"                context, dest_host)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9b044529_58ceb5a8","line":5831,"in_reply_to":"5e7177bd_8102349c","updated":"2026-11-24 14:48:38.000000000","message":"thanks Dan, I\u0027m not that opiniated about any HTTP409 return, but I think we need to explain the issue to operators if we don\u0027t provide it. Thank you again.","commit_id":"79511c19b2d03c595e2f70d06ee7df142c21b579"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7bf2f8f86d69481aa9488d79cf8875fab71984fa","unresolved":true,"context_lines":[{"line_number":5828,"context_line":""},{"line_number":5829,"context_line":"        request_spec \u003d objects.RequestSpec.get_by_instance_uuid("},{"line_number":5830,"context_line":"            context, instance.uuid)"},{"line_number":5831,"context_line":""},{"line_number":5832,"context_line":"        if dest_host and dest_availability_zone:"},{"line_number":5833,"context_line":"            host_az \u003d availability_zones.get_host_availability_zone("},{"line_number":5834,"context_line":"                context, dest_host)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5e7177bd_8102349c","line":5831,"in_reply_to":"dd7ab582_ade241c5","updated":"2026-11-24 14:37:32.000000000","message":"I mentioned this in the earlier patch (and I have a revision coming for it) that it was missing all the pin checks because of this being at the end. I don\u0027t think we need to care why an instance is pinned in order to _reject_ it. But I agree that if we go ahead with this PoC, we probably need a special check here for pinned and cross_az_attach (and having a volume) which will refuse unless you unpin first. That would be consistent I think.\n\nI\u0027ll leave this open as a reminder to do that if we fold this in.","commit_id":"79511c19b2d03c595e2f70d06ee7df142c21b579"}],"nova/conductor/tasks/live_migrate_v2.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"df317ed595d6290abdfbdf2cce29bb99cd2cc933","unresolved":true,"context_lines":[{"line_number":140,"context_line":"    def _execute(self):"},{"line_number":141,"context_line":"        inst_map \u003d objects.InstanceMapping.get_by_instance_uuid("},{"line_number":142,"context_line":"            self.context, self.instance.uuid)"},{"line_number":143,"context_line":"        if self.destination:"},{"line_number":144,"context_line":"            # Reload the persisted spec: the scheduler\u0027s copy may already"},{"line_number":145,"context_line":"            # have its availability_zone overridden for this move."},{"line_number":146,"context_line":"            spec \u003d objects.RequestSpec.get_by_instance_uuid("}],"source_content_type":"text/x-python","patch_set":4,"id":"5806b94a_3f928dfc","line":143,"updated":"2026-12-02 12:07:01.000000000","message":"don\u0027t we need the same if availability_zone is set?","commit_id":"7732914d7bd87f3115caa7247531001cb849e19f"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"df317ed595d6290abdfbdf2cce29bb99cd2cc933","unresolved":true,"context_lines":[{"line_number":142,"context_line":"            self.context, self.instance.uuid)"},{"line_number":143,"context_line":"        if self.destination:"},{"line_number":144,"context_line":"            # Reload the persisted spec: the scheduler\u0027s copy may already"},{"line_number":145,"context_line":"            # have its availability_zone overridden for this move."},{"line_number":146,"context_line":"            spec \u003d objects.RequestSpec.get_by_instance_uuid("},{"line_number":147,"context_line":"                self.context, self.instance.uuid)"},{"line_number":148,"context_line":"            if self.availability_zone or spec.availability_zone:"}],"source_content_type":"text/x-python","patch_set":4,"id":"94c83ad8_2843c652","line":145,"updated":"2026-12-02 12:07:01.000000000","message":"... and we don\u0027t want to save those values here, we only want to save the pending_availablity_zone value at this step","commit_id":"7732914d7bd87f3115caa7247531001cb849e19f"}],"nova/objects/request_spec.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ae159bf46dd43f01f8c31404212c2def2db368a3","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        # Persist the destination AZ without changing the AZ pin"},{"line_number":89,"context_line":"        # until lazy InstanceMapping resolution confirms migration success."},{"line_number":90,"context_line":"        \u0027pending_availability_zone\u0027: fields.StringField("},{"line_number":91,"context_line":"            nullable\u003dTrue, default\u003dNone),"},{"line_number":92,"context_line":"        \u0027flavor\u0027: fields.ObjectField(\u0027Flavor\u0027, nullable\u003dFalse),"},{"line_number":93,"context_line":"        \u0027num_instances\u0027: fields.IntegerField(default\u003d1),"},{"line_number":94,"context_line":"        # NOTE(alex_xu): This field won\u0027t be persisted."}],"source_content_type":"text/x-python","patch_set":3,"id":"b5fab703_57aa0460","line":91,"updated":"2026-11-24 14:04:25.000000000","message":"looks like we have no choices but to persist another AZ field here. I\u0027m cool with the proposal, I\u0027m just afraid of yet another AZ naming 😉","commit_id":"79511c19b2d03c595e2f70d06ee7df142c21b579"}]}
