)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"7913f68d625f71f0ed54a2945d1b7ea5a0f8c202","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"4a33aa68_99afa60e","updated":"2026-10-01 08:19:14.000000000","message":"functional test unstable","commit_id":"9d92484eb2f352649ab7dc7082204ab678d01c23"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"2ff0af3859704b0f44d609370d4791bfcef7930b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"fca63201_3cda9145","in_reply_to":"4a33aa68_99afa60e","updated":"2026-10-02 12:36:30.000000000","message":"fixed in the parent commit by tuning the helpers","commit_id":"9d92484eb2f352649ab7dc7082204ab678d01c23"}],"nova/conductor/tasks/cross_cell_migrate.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7fb5f6e076b30da160e0de6498d923777e988059","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        # from the source cell before cloning so the destination can claim"},{"line_number":150,"context_line":"        # devices for both flavor aliases and SR-IOV ports (bug 2168874)."},{"line_number":151,"context_line":"        if \u0027pci_requests\u0027 not in self.instance:"},{"line_number":152,"context_line":"            self.instance.obj_load_attr(\u0027pci_requests\u0027)"},{"line_number":153,"context_line":"        # We copy instance actions to preserve the history of the instance"},{"line_number":154,"context_line":"        # in case the resize is confirmed."},{"line_number":155,"context_line":"        actions \u003d objects.InstanceActionList.get_by_instance_uuid("}],"source_content_type":"text/x-python","patch_set":1,"id":"29a711b3_3230232a","line":152,"updated":"2026-11-10 15:01:23.000000000","message":"I said this in another review semi-recently.. we really need to have a way to lazy-pre-load multiple attributes in a single go, as it\u0027s wasteful to do these two in order.","commit_id":"9d92484eb2f352649ab7dc7082204ab678d01c23"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"866d8c7f35f31cd5f3923013e5bebab1aa3484a7","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        # from the source cell before cloning so the destination can claim"},{"line_number":150,"context_line":"        # devices for both flavor aliases and SR-IOV ports (bug 2168874)."},{"line_number":151,"context_line":"        if \u0027pci_requests\u0027 not in self.instance:"},{"line_number":152,"context_line":"            self.instance.obj_load_attr(\u0027pci_requests\u0027)"},{"line_number":153,"context_line":"        # We copy instance actions to preserve the history of the instance"},{"line_number":154,"context_line":"        # in case the resize is confirmed."},{"line_number":155,"context_line":"        actions \u003d objects.InstanceActionList.get_by_instance_uuid("}],"source_content_type":"text/x-python","patch_set":1,"id":"ddb6ca3a_ec90f1af","line":152,"in_reply_to":"29a711b3_3230232a","updated":"2026-11-11 14:51:50.000000000","message":"yeah that is also a reasonable improvement on top of this fix. I\u0027m not sure if I need an oslo.versionedobject change for that though so I will take it separately.","commit_id":"9d92484eb2f352649ab7dc7082204ab678d01c23"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0eee09973a9329b095a5b63eaebc5d1bf422bc61","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        # from the source cell before cloning so the destination can claim"},{"line_number":150,"context_line":"        # devices for both flavor aliases and SR-IOV ports (bug 2168874)."},{"line_number":151,"context_line":"        if \u0027pci_requests\u0027 not in self.instance:"},{"line_number":152,"context_line":"            self.instance.obj_load_attr(\u0027pci_requests\u0027)"},{"line_number":153,"context_line":"        # We copy instance actions to preserve the history of the instance"},{"line_number":154,"context_line":"        # in case the resize is confirmed."},{"line_number":155,"context_line":"        actions \u003d objects.InstanceActionList.get_by_instance_uuid("}],"source_content_type":"text/x-python","patch_set":1,"id":"37ca2194_56abe385","line":152,"in_reply_to":"ddb6ca3a_ec90f1af","updated":"2026-11-11 19:35:13.000000000","message":"I dig it a bit and it seems different fields are loaded separately form the DB via the `_load_\u0027 helpers in Instance. So even if we get a list of fields to load reusing the existing code would mean separate DB queries for each field (in a loop). That would not save any DB round trip (and here we are in the conductor so no RPC round trip is needed anyhow, but that RPC round trip can be relevant for a compute initiad lazy load sequence).\n\nAnother direction would be to re-use the DB query builder behind Instance.get_by_uuid if multiple fields are requested to basically do new Instance load instead of a lazy load.\n\nThen I looked at what if we preload these field in the first place for the migrate and resize API. It turns out that the same-cell side of these operations does not always need the keypairs (for example) as it only needed for config drive. So for keypairs preloading it in the API is just a waste in many cases.\n\nFinally I settled on the following idea. We are here in the conductor about to copy the whole instance (except some fields) to the other cell. Here we know what fields we need (basically all except some). We cannot pre-load, we cannot batch lazy-load easily, what if here, we simply load an new Instance object from the DB. That way we can batch load all the fields in one go.\n\nWhat do you think?\n(I went ahead and implemented it to see how this looks https://review.opendev.org/c/openstack/nova/+/1015204 )","commit_id":"9d92484eb2f352649ab7dc7082204ab678d01c23"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7fb5f6e076b30da160e0de6498d923777e988059","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        # target cell in case people use those for auditing (remember that"},{"line_number":167,"context_line":"        # faults are only shown in the API for ERROR/DELETED instances and only"},{"line_number":168,"context_line":"        # the most recent fault is shown)."},{"line_number":169,"context_line":"        inst \u003d clone_creatable_object("},{"line_number":170,"context_line":"            self.target_ctx, self.instance,"},{"line_number":171,"context_line":"            delete_fields\u003d[\u0027fault\u0027, \u0027pci_devices\u0027, \u0027services\u0027, \u0027tags\u0027])"},{"line_number":172,"context_line":"        # This part is important - we want to create the instance in the target"}],"source_content_type":"text/x-python","patch_set":2,"id":"068a4680_c7502723","line":169,"updated":"2026-11-10 15:01:23.000000000","message":"So, I wonder under what circumstances we would want to do this where there are _any_ unloaded fields in the instance (or any sub-objects for that matter).\n\nMaybe we should at least iterate Instance (and maybe InstanceExtra) and look for unloaded fields that we LOG.debug() here?","commit_id":"11df7ed11cfccfafb784e39c5d1cfe25ee36d1fb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"866d8c7f35f31cd5f3923013e5bebab1aa3484a7","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        # target cell in case people use those for auditing (remember that"},{"line_number":167,"context_line":"        # faults are only shown in the API for ERROR/DELETED instances and only"},{"line_number":168,"context_line":"        # the most recent fault is shown)."},{"line_number":169,"context_line":"        inst \u003d clone_creatable_object("},{"line_number":170,"context_line":"            self.target_ctx, self.instance,"},{"line_number":171,"context_line":"            delete_fields\u003d[\u0027fault\u0027, \u0027pci_devices\u0027, \u0027services\u0027, \u0027tags\u0027])"},{"line_number":172,"context_line":"        # This part is important - we want to create the instance in the target"}],"source_content_type":"text/x-python","patch_set":2,"id":"925d2f66_8d8b403d","line":169,"in_reply_to":"068a4680_c7502723","updated":"2026-11-11 14:51:50.000000000","message":"yeah that is a good idea. I\u0027m (OK my personal machine god) pretty sure that there are other missed fields in the instance here. I will craft something as a follow up patch along this line","commit_id":"11df7ed11cfccfafb784e39c5d1cfe25ee36d1fb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0eee09973a9329b095a5b63eaebc5d1bf422bc61","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        # target cell in case people use those for auditing (remember that"},{"line_number":167,"context_line":"        # faults are only shown in the API for ERROR/DELETED instances and only"},{"line_number":168,"context_line":"        # the most recent fault is shown)."},{"line_number":169,"context_line":"        inst \u003d clone_creatable_object("},{"line_number":170,"context_line":"            self.target_ctx, self.instance,"},{"line_number":171,"context_line":"            delete_fields\u003d[\u0027fault\u0027, \u0027pci_devices\u0027, \u0027services\u0027, \u0027tags\u0027])"},{"line_number":172,"context_line":"        # This part is important - we want to create the instance in the target"}],"source_content_type":"text/x-python","patch_set":2,"id":"bd78ff41_2657b6bc","line":169,"in_reply_to":"925d2f66_8d8b403d","updated":"2026-11-11 19:35:13.000000000","message":"eventually I added unit test that forces us to decide any future fields to be cloned or excluded. See in https://review.opendev.org/c/openstack/nova/+/1015204","commit_id":"11df7ed11cfccfafb784e39c5d1cfe25ee36d1fb"}]}
