)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c737d6af14bd80981f1398c7f7ad94e7c00a57ad","unresolved":false,"context_lines":[{"line_number":5029,"context_line":"            # Rollback port bindings to the source host."},{"line_number":5030,"context_line":"            try:"},{"line_number":5031,"context_line":"                # This is gross but migrate_instance_start looks at the"},{"line_number":5032,"context_line":"                # migration.dest_compute to determine where to actiate the"},{"line_number":5033,"context_line":"                # port bindings and we want the source compute port bindings"},{"line_number":5034,"context_line":"                # to be re-activated."},{"line_number":5035,"context_line":"                with utils.temporary_mutation("}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_e697153a","line":5032,"range":{"start_line":5032,"start_character":63,"end_line":5032,"end_character":70},"updated":"2019-02-06 21:57:16.000000000","message":"activate","commit_id":"9ce3879b12cb60e52e1eab185f54899e346c2f73"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64bafe4d125acc02f6fda710896c8db00fa26032","unresolved":false,"context_lines":[{"line_number":5029,"context_line":"            # Rollback port bindings to the source host."},{"line_number":5030,"context_line":"            try:"},{"line_number":5031,"context_line":"                # This is gross but migrate_instance_start looks at the"},{"line_number":5032,"context_line":"                # migration.dest_compute to determine where to actiate the"},{"line_number":5033,"context_line":"                # port bindings and we want the source compute port bindings"},{"line_number":5034,"context_line":"                # to be re-activated."},{"line_number":5035,"context_line":"                with utils.temporary_mutation("}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_a9130cb8","line":5032,"range":{"start_line":5032,"start_character":63,"end_line":5032,"end_character":70},"in_reply_to":"9fdfeff1_e697153a","updated":"2019-02-07 18:10:38.000000000","message":"Done","commit_id":"9ce3879b12cb60e52e1eab185f54899e346c2f73"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9b42ec46685870f931fd220fcbe8e74678590e36","unresolved":false,"context_lines":[{"line_number":4973,"context_line":"        resize \u003d migration.migration_type \u003d\u003d \u0027resize\u0027"},{"line_number":4974,"context_line":"        instance.old_flavor \u003d instance.flavor"},{"line_number":4975,"context_line":"        if resize:"},{"line_number":4976,"context_line":"            flavor \u003d instance.new_flavor"},{"line_number":4977,"context_line":"            # If we are resizing to a new flavor we need to set the"},{"line_number":4978,"context_line":"            # flavor-related fields on the instance."},{"line_number":4979,"context_line":"            # TODO(mriedem): This is likely where storing old/new_flavor on"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_25470a4f","line":4976,"range":{"start_line":4976,"start_character":12,"end_line":4976,"end_character":40},"updated":"2019-02-11 23:14:07.000000000","message":"This isn\u0027t set yet so _set_instance_info is going to blow up.","commit_id":"94e4f5a8ff5f0a2b896a09d232b70d34f4eb985d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"df494f5c090a6957370ebf6110a4ab8063e3c8af","unresolved":false,"context_lines":[{"line_number":5068,"context_line":"        migration.status \u003d \u0027finished\u0027"},{"line_number":5069,"context_line":"        migration.save()"},{"line_number":5070,"context_line":""},{"line_number":5071,"context_line":"        self._update_instance_after_spawn("},{"line_number":5072,"context_line":"            ctxt, instance, vm_state\u003dvm_states.RESIZED)"},{"line_number":5073,"context_line":"        instance.save(expected_task_state\u003dtask_states.RESIZE_FINISH)"},{"line_number":5074,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_83e6f3e7","line":5071,"updated":"2019-02-11 21:37:06.000000000","message":"Maybe we should also set the target cell instance as hidden\u003dFalse here? Although at this point the instance mapping still points at the source cell so that probably doesn\u0027t help us much.","commit_id":"94e4f5a8ff5f0a2b896a09d232b70d34f4eb985d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b1663bb516ba11660f51c87f9ceaf2cc1f6adc2e","unresolved":false,"context_lines":[{"line_number":5068,"context_line":"        migration.status \u003d \u0027finished\u0027"},{"line_number":5069,"context_line":"        migration.save()"},{"line_number":5070,"context_line":""},{"line_number":5071,"context_line":"        self._update_instance_after_spawn("},{"line_number":5072,"context_line":"            ctxt, instance, vm_state\u003dvm_states.RESIZED)"},{"line_number":5073,"context_line":"        instance.save(expected_task_state\u003dtask_states.RESIZE_FINISH)"},{"line_number":5074,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_85c35689","line":5071,"in_reply_to":"9fdfeff1_83e6f3e7","updated":"2019-02-12 13:28:03.000000000","message":"This doesn\u0027t change the host/node/launched_at values like in the resize_instance method so we need to do that as well. Note that RT.instance_claim() like in unshelve would set the instance host/node/launched_at and also update usage on this host but since we\u0027re not using that, we have to make the change manually (like in _resize_instance in a normal resize).","commit_id":"94e4f5a8ff5f0a2b896a09d232b70d34f4eb985d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ad8bf2883b46415bbd858ec350d1be73252d0b11","unresolved":false,"context_lines":[{"line_number":5061,"context_line":"        # similar to how unshelve works."},{"line_number":5062,"context_line":"        if snapshot_id:"},{"line_number":5063,"context_line":"            # TODO(mriedem): Use a more generic method."},{"line_number":5064,"context_line":"            self._delete_snapshot_of_shelved_instance("},{"line_number":5065,"context_line":"                ctxt, instance, snapshot_id)"},{"line_number":5066,"context_line":""},{"line_number":5067,"context_line":"        migration.status \u003d \u0027finished\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_43b406d2","line":5064,"updated":"2019-02-18 17:52:19.000000000","message":"If we split https://review.openstack.org/#/c/627891/19/nova/conductor/tasks/cross_cell_migrate.py@363 to nova.compute.utils then we could re-use that here.","commit_id":"ff21e7108393512925bd3124fb0e1a392e279361"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cf685b1820b42fcec5522b1b6d74bb43c5cd5aa4","unresolved":false,"context_lines":[{"line_number":5061,"context_line":"        # similar to how unshelve works."},{"line_number":5062,"context_line":"        if snapshot_id:"},{"line_number":5063,"context_line":"            # TODO(mriedem): Use a more generic method."},{"line_number":5064,"context_line":"            self._delete_snapshot_of_shelved_instance("},{"line_number":5065,"context_line":"                ctxt, instance, snapshot_id)"},{"line_number":5066,"context_line":""},{"line_number":5067,"context_line":"        migration.status \u003d \u0027finished\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_5e4a995b","line":5064,"in_reply_to":"9fdfeff1_43b406d2","updated":"2019-02-18 18:13:59.000000000","message":"Done","commit_id":"ff21e7108393512925bd3124fb0e1a392e279361"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7e5835e427cb8c2636f57143ea0eda315c5ac617","unresolved":false,"context_lines":[{"line_number":4992,"context_line":""},{"line_number":4993,"context_line":"        # Activate the port bindings for this host."},{"line_number":4994,"context_line":"        self.network_api.migrate_instance_finish(ctxt, instance, migration)"},{"line_number":4995,"context_line":"        # NOTE(mriedem): Not calling self.network_api.get_instance_nw_info()"},{"line_number":4996,"context_line":"        # here since it just uses the info_cache rather than getting anything"},{"line_number":4997,"context_line":"        # new from neutron so I am not sure what good it would do, unless we"},{"line_number":4998,"context_line":"        # call it with force_refresh\u003dTrue...but how does traditional resize"},{"line_number":4999,"context_line":"        # get the destination host port info after the ports are bound on the"},{"line_number":5000,"context_line":"        # destination? Maybe it doesn\u0027t need it?"},{"line_number":5001,"context_line":""},{"line_number":5002,"context_line":"        # Update the volume attachments using this host\u0027s connector."},{"line_number":5003,"context_line":"        # That will update the BlockDeviceMapping.connection_info which"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_58a14c46","line":5000,"range":{"start_line":4995,"start_character":8,"end_line":5000,"end_character":48},"updated":"2019-02-18 22:48:09.000000000","message":"Should maybe just do this anyway - the cache does get refreshed and anything that\u0027s not a current port gets dropped from the cache.","commit_id":"6620af8aff845608f4277f8dca523386c8884d1f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cf2f843b01fd7ba0e83c21a4e3e8f6a07493c687","unresolved":false,"context_lines":[{"line_number":4992,"context_line":""},{"line_number":4993,"context_line":"        # Activate the port bindings for this host."},{"line_number":4994,"context_line":"        self.network_api.migrate_instance_finish(ctxt, instance, migration)"},{"line_number":4995,"context_line":"        # NOTE(mriedem): Not calling self.network_api.get_instance_nw_info()"},{"line_number":4996,"context_line":"        # here since it just uses the info_cache rather than getting anything"},{"line_number":4997,"context_line":"        # new from neutron so I am not sure what good it would do, unless we"},{"line_number":4998,"context_line":"        # call it with force_refresh\u003dTrue...but how does traditional resize"},{"line_number":4999,"context_line":"        # get the destination host port info after the ports are bound on the"},{"line_number":5000,"context_line":"        # destination? Maybe it doesn\u0027t need it?"},{"line_number":5001,"context_line":""},{"line_number":5002,"context_line":"        # Update the volume attachments using this host\u0027s connector."},{"line_number":5003,"context_line":"        # That will update the BlockDeviceMapping.connection_info which"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_f1cfe4b0","line":5000,"range":{"start_line":4995,"start_character":8,"end_line":5000,"end_character":48},"in_reply_to":"9fdfeff1_58a14c46","updated":"2019-02-19 20:27:21.000000000","message":"Done","commit_id":"6620af8aff845608f4277f8dca523386c8884d1f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"89c9a003cf110cb71d91dc8544cc7cd8a06c94a7","unresolved":false,"context_lines":[{"line_number":4990,"context_line":"        # is fixed if setup_networks_on_host is made smarter by passing the"},{"line_number":4991,"context_line":"        # migration record and the method checks the migration_type."},{"line_number":4992,"context_line":""},{"line_number":4993,"context_line":"        # Activate the port bindings for this host."},{"line_number":4994,"context_line":"        self.network_api.migrate_instance_finish(ctxt, instance, migration)"},{"line_number":4995,"context_line":"        network_info \u003d self.network_api.get_instance_nw_info(ctxt, instance)"},{"line_number":4996,"context_line":""},{"line_number":4997,"context_line":"        # Update the volume attachments using this host\u0027s connector."}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_5a002eac","line":4994,"range":{"start_line":4993,"start_character":8,"end_line":4994,"end_character":75},"updated":"2019-02-20 21:49:14.000000000","message":"We\u0027re going to have the same issue as bug 1813789 here because this will update the port bindings and send the network-vif-plugged event and that means when driver.spawn waits for it we might have already gotten the event and neutron won\u0027t send another one so we could timeout.","commit_id":"d19b6fd363511fb3e7d3f3a26f5518d81734e2b6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c4b54a604c34fa437d9fad3586c9ec8a57c4193f","unresolved":false,"context_lines":[{"line_number":4990,"context_line":"        # is fixed if setup_networks_on_host is made smarter by passing the"},{"line_number":4991,"context_line":"        # migration record and the method checks the migration_type."},{"line_number":4992,"context_line":""},{"line_number":4993,"context_line":"        # Activate the port bindings for this host."},{"line_number":4994,"context_line":"        self.network_api.migrate_instance_finish(ctxt, instance, migration)"},{"line_number":4995,"context_line":"        network_info \u003d self.network_api.get_instance_nw_info(ctxt, instance)"},{"line_number":4996,"context_line":""},{"line_number":4997,"context_line":"        # Update the volume attachments using this host\u0027s connector."}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_6f0e2d8d","line":4994,"range":{"start_line":4993,"start_character":8,"end_line":4994,"end_character":75},"in_reply_to":"9fdfeff1_5a002eac","updated":"2019-02-26 16:21:58.000000000","message":"Added a FIXME.","commit_id":"d19b6fd363511fb3e7d3f3a26f5518d81734e2b6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2d075f71e001aa8aece6a233ce0033d494189960","unresolved":false,"context_lines":[{"line_number":5133,"context_line":"                    try:"},{"line_number":5134,"context_line":"                        # TODO(mriedem): Refactor remove_volume_connection so"},{"line_number":5135,"context_line":"                        # we can pass the bdm to it directly."},{"line_number":5136,"context_line":"                        self.remove_volume_connection("},{"line_number":5137,"context_line":"                            ctxt, bdm.volume_id, instance)"},{"line_number":5138,"context_line":"                    except Exception:"},{"line_number":5139,"context_line":"                        LOG.exception(\u0027Failed to remove volume connection on \u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"5fc1f717_484cd19d","line":5136,"range":{"start_line":5136,"start_character":29,"end_line":5136,"end_character":53},"updated":"2019-03-08 23:19:39.000000000","message":"This only terminates the connection (removes the export) in the cinder v2 flow...so we need to also change this to delete the v3 style attachment otherwise it will be leaked.","commit_id":"d1d2604a8a61e3a5c00aed970e32f21429390f16"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f2e65c2c3eb4430b76a5b10a905d84b995608662","unresolved":false,"context_lines":[{"line_number":5133,"context_line":"                    try:"},{"line_number":5134,"context_line":"                        # TODO(mriedem): Refactor remove_volume_connection so"},{"line_number":5135,"context_line":"                        # we can pass the bdm to it directly."},{"line_number":5136,"context_line":"                        self.remove_volume_connection("},{"line_number":5137,"context_line":"                            ctxt, bdm.volume_id, instance)"},{"line_number":5138,"context_line":"                    except Exception:"},{"line_number":5139,"context_line":"                        LOG.exception(\u0027Failed to remove volume connection on \u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"5fc1f717_9ca43ebb","line":5136,"range":{"start_line":5136,"start_character":29,"end_line":5136,"end_character":53},"in_reply_to":"5fc1f717_484cd19d","updated":"2019-03-08 23:57:13.000000000","message":"Done","commit_id":"d1d2604a8a61e3a5c00aed970e32f21429390f16"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2a0cd5585f224e6eaea60ef36c201a32eaa0b6d5","unresolved":false,"context_lines":[{"line_number":5152,"context_line":"        # network-vif-plugged event and that means when driver.spawn waits for"},{"line_number":5153,"context_line":"        # it we might have already gotten the event and neutron won\u0027t send"},{"line_number":5154,"context_line":"        # another one so we could timeout."},{"line_number":5155,"context_line":"        self.network_api.migrate_instance_finish(ctxt, instance, migration)"},{"line_number":5156,"context_line":"        network_info \u003d self.network_api.get_instance_nw_info(ctxt, instance)"},{"line_number":5157,"context_line":""},{"line_number":5158,"context_line":"        # If the original vm_state was STOPPED, we do not automatically"}],"source_content_type":"text/x-python","patch_set":25,"id":"dfbec78f_4a9f1450","line":5155,"updated":"2019-05-04 16:25:49.000000000","message":"This is blowing up during port binding update:\n\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [None req-330d2fb0-4fff-41cd-a9be-dbf85545fb43 tempest-MigrationsAdminTest-939009750 tempest-MigrationsAdminTest-939009750] [instance: a9c07104-9644-4657-839f-ae43052893c4] Unable to update binding details for port 4b9a5615-c534-4205-892b-947b8460c874: InternalServerError: Request Failed: internal server error while processing your request.\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: Neutron server returns request_ids: [\u0027req-57591e83-11e7-4482-9518-f16ee86403e7\u0027]\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4] Traceback (most recent call last):\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/opt/stack/nova/nova/network/neutronv2/api.py\", line 3368, in _update_port_binding_for_instance\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]     neutron.update_port(port_id, {\u0027port\u0027: updates})\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/opt/stack/nova/nova/network/neutronv2/api.py\", line 127, in wrapper\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]     ret \u003d obj(*args, **kwargs)\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py\", line 808, in update_port\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]     revision_number\u003drevision_number)\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/opt/stack/nova/nova/network/neutronv2/api.py\", line 127, in wrapper\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]     ret \u003d obj(*args, **kwargs)\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py\", line 2389, in _update_resource\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]     return self.put(path, **kwargs)\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/opt/stack/nova/nova/network/neutronv2/api.py\", line 127, in wrapper\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]     ret \u003d obj(*args, **kwargs)\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py\", line 363, in put\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]     headers\u003dheaders, params\u003dparams)\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/opt/stack/nova/nova/network/neutronv2/api.py\", line 127, in wrapper\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]     ret \u003d obj(*args, **kwargs)\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py\", line 331, in retry_request\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]     headers\u003dheaders, params\u003dparams)\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/opt/stack/nova/nova/network/neutronv2/api.py\", line 127, in wrapper\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]     ret \u003d obj(*args, **kwargs)\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py\", line 294, in do_request\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]     self._handle_fault_response(status_code, replybody, resp)\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/opt/stack/nova/nova/network/neutronv2/api.py\", line 127, in wrapper\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]     ret \u003d obj(*args, **kwargs)\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py\", line 269, in _handle_fault_response\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]     exception_handler_v20(status_code, error_body)\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py\", line 93, in exception_handler_v20\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4]     request_ids\u003drequest_ids)\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4] InternalServerError: Request Failed: internal server error while processing your request.\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4] Neutron server returns request_ids: [\u0027req-57591e83-11e7-4482-9518-f16ee86403e7\u0027]\nMay 04 14:33:20.738082 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.network.neutronv2.api [instance: a9c07104-9644-4657-839f-ae43052893c4] \nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [None req-330d2fb0-4fff-41cd-a9be-dbf85545fb43 tempest-MigrationsAdminTest-939009750 tempest-MigrationsAdminTest-939009750] [instance: a9c07104-9644-4657-839f-ae43052893c4] Setting instance vm_state to ERROR: InternalServerError: Request Failed: internal server error while processing your request.\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: Neutron server returns request_ids: [\u0027req-57591e83-11e7-4482-9518-f16ee86403e7\u0027]\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4] Traceback (most recent call last):\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/opt/stack/nova/nova/compute/manager.py\", line 8991, in _error_out_instance_on_exception\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]     yield\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/opt/stack/nova/nova/compute/manager.py\", line 5381, in finish_snapshot_based_resize_at_dest\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]     ctxt, instance, migration, snapshot_id)\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/opt/stack/nova/nova/compute/manager.py\", line 5426, in _finish_snapshot_based_resize_at_dest\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]     ctxt, instance, migration, image_meta, bdms)\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/opt/stack/nova/nova/compute/manager.py\", line 5488, in _finish_snapshot_based_resize_at_dest_spawn\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]     self.network_api.migrate_instance_finish(ctxt, instance, migration)\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/opt/stack/nova/nova/network/neutronv2/api.py\", line 2810, in migrate_instance_finish\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]     migration\u003dmigration)\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/opt/stack/nova/nova/network/neutronv2/api.py\", line 3373, in _update_port_binding_for_instance\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]     port_id, instance\u003dinstance)\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py\", line 220, in __exit__\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]     self.force_reraise()\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py\", line 196, in force_reraise\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]     six.reraise(self.type_, self.value, self.tb)\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/opt/stack/nova/nova/network/neutronv2/api.py\", line 3368, in _update_port_binding_for_instance\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]     neutron.update_port(port_id, {\u0027port\u0027: updates})\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/opt/stack/nova/nova/network/neutronv2/api.py\", line 127, in wrapper\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]     ret \u003d obj(*args, **kwargs)\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py\", line 808, in update_port\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]     revision_number\u003drevision_number)\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/opt/stack/nova/nova/network/neutronv2/api.py\", line 127, in wrapper\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]     ret \u003d obj(*args, **kwargs)\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py\", line 2389, in _update_resource\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]     return self.put(path, **kwargs)\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/opt/stack/nova/nova/network/neutronv2/api.py\", line 127, in wrapper\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]     ret \u003d obj(*args, **kwargs)\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py\", line 363, in put\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]     headers\u003dheaders, params\u003dparams)\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/opt/stack/nova/nova/network/neutronv2/api.py\", line 127, in wrapper\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]     ret \u003d obj(*args, **kwargs)\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py\", line 331, in retry_request\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]     headers\u003dheaders, params\u003dparams)\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/opt/stack/nova/nova/network/neutronv2/api.py\", line 127, in wrapper\nMay 04 14:33:20.740627 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]     ret \u003d obj(*args, **kwargs)\nMay 04 14:33:20.743099 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py\", line 294, in do_request\nMay 04 14:33:20.743099 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]     self._handle_fault_response(status_code, replybody, resp)\nMay 04 14:33:20.743099 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/opt/stack/nova/nova/network/neutronv2/api.py\", line 127, in wrapper\nMay 04 14:33:20.743099 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]     ret \u003d obj(*args, **kwargs)\nMay 04 14:33:20.743099 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py\", line 269, in _handle_fault_response\nMay 04 14:33:20.743099 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]     exception_handler_v20(status_code, error_body)\nMay 04 14:33:20.743099 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]   File \"/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py\", line 93, in exception_handler_v20\nMay 04 14:33:20.743099 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4]     request_ids\u003drequest_ids)\nMay 04 14:33:20.743099 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4] InternalServerError: Request Failed: internal server error while processing your request.\nMay 04 14:33:20.743099 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4] Neutron server returns request_ids: [\u0027req-57591e83-11e7-4482-9518-f16ee86403e7\u0027]\nMay 04 14:33:20.743099 ubuntu-bionic-ovh-gra1-0005970038 nova-compute[17528]: ERROR nova.compute.manager [instance: a9c07104-9644-4657-839f-ae43052893c4] \n\nMaybe related to https://review.opendev.org/#/c/653506/\n\nShould probably enhance the NeutronFixture to track port bindings and simulate the unique constraint (port binding is unique per port and host).","commit_id":"eb848a9c99ecf3fb9913f51397c853da903499ec"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"31f999042b533f499df1dde5deb345e5f97b328d","unresolved":false,"context_lines":[{"line_number":5068,"context_line":"        self._finish_snapshot_based_resize_at_dest_spawn("},{"line_number":5069,"context_line":"            ctxt, instance, migration, image_meta, bdms)"},{"line_number":5070,"context_line":""},{"line_number":5071,"context_line":"        # If we spawned from a temporary snapshot image we can delete that now,"},{"line_number":5072,"context_line":"        # similar to how unshelve works."},{"line_number":5073,"context_line":"        if snapshot_id:"},{"line_number":5074,"context_line":"            compute_utils.delete_image("},{"line_number":5075,"context_line":"                ctxt, instance, self.image_api, snapshot_id)"},{"line_number":5076,"context_line":""},{"line_number":5077,"context_line":"        migration.status \u003d \u0027finished\u0027"},{"line_number":5078,"context_line":"        migration.save()"}],"source_content_type":"text/x-python","patch_set":32,"id":"9fb8cfa7_a5a6740e","line":5075,"range":{"start_line":5071,"start_character":8,"end_line":5075,"end_character":60},"updated":"2019-06-26 21:11:45.000000000","message":"If using the libvirt driver and the rbd image backend we have to follow https://review.opendev.org/#/c/457886/ and flatten the snapshot image in order to delete it here.","commit_id":"dc625b7d6a74c1f8fd3371e12cf05d9b09d9ade9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8056ff002602ae73ca5acb1967f5942b848f71d0","unresolved":false,"context_lines":[{"line_number":5055,"context_line":"                self._finish_snapshot_based_resize_at_dest("},{"line_number":5056,"context_line":"                    ctxt, instance, migration, snapshot_id)"},{"line_number":5057,"context_line":"        except Exception:"},{"line_number":5058,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":5059,"context_line":"                self._revert_allocation(ctxt, instance, migration)"},{"line_number":5060,"context_line":""},{"line_number":5061,"context_line":"    def _finish_snapshot_based_resize_at_dest("},{"line_number":5062,"context_line":"            self, ctxt, instance, migration, snapshot_id):"}],"source_content_type":"text/x-python","patch_set":34,"id":"7faddb67_9a757dfd","line":5059,"range":{"start_line":5058,"start_character":12,"end_line":5059,"end_character":66},"updated":"2019-07-03 20:55:23.000000000","message":"Like prep_snapshot_based_resize_at_source, we might not need this since the conductor MigrationTask should do this revert:\n\nhttps://review.opendev.org/#/c/634832/36/nova/compute/manager.py@4599\n\nSince we\u0027re still in a synchronous call from conductor.","commit_id":"35a298c59ae1135ba457e4b7ac73780a527e75c9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e65fbe3a9eb5e7a8e2edfef7304c2ff53527af94","unresolved":false,"context_lines":[{"line_number":5055,"context_line":"                self._finish_snapshot_based_resize_at_dest("},{"line_number":5056,"context_line":"                    ctxt, instance, migration, snapshot_id)"},{"line_number":5057,"context_line":"        except Exception:"},{"line_number":5058,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":5059,"context_line":"                self._revert_allocation(ctxt, instance, migration)"},{"line_number":5060,"context_line":""},{"line_number":5061,"context_line":"    def _finish_snapshot_based_resize_at_dest("},{"line_number":5062,"context_line":"            self, ctxt, instance, migration, snapshot_id):"}],"source_content_type":"text/x-python","patch_set":34,"id":"7faddb67_7af4415c","line":5059,"range":{"start_line":5058,"start_character":12,"end_line":5059,"end_character":66},"in_reply_to":"7faddb67_9a757dfd","updated":"2019-07-03 20:58:00.000000000","message":"I\u0027ll just leave a NOTE for now.","commit_id":"35a298c59ae1135ba457e4b7ac73780a527e75c9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b7eea8184a06715ebfc1431fda4451ea01526b1d","unresolved":false,"context_lines":[{"line_number":5103,"context_line":"        # If we spawned from a temporary snapshot image we can delete that now,"},{"line_number":5104,"context_line":"        # similar to how unshelve works."},{"line_number":5105,"context_line":"        if snapshot_id:"},{"line_number":5106,"context_line":"            # FIXME(mriedem): Need to deal with bug 1653953 for libvirt with"},{"line_number":5107,"context_line":"            # the rbd image backend."},{"line_number":5108,"context_line":"            compute_utils.delete_image("},{"line_number":5109,"context_line":"                ctxt, instance, self.image_api, snapshot_id)"},{"line_number":5110,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"9fb8cfa7_0065cab4","line":5107,"range":{"start_line":5106,"start_character":12,"end_line":5107,"end_character":36},"updated":"2019-06-28 15:23:16.000000000","message":"For this I think the cleanest thing we can do is from the driver check to see if instance.migration_context is not None and if so, get the Migration record for that context (instance.migration_context.migration_id) and from that check the Migration.cross_cell_move flag and if True, then flatten the image.","commit_id":"35a298c59ae1135ba457e4b7ac73780a527e75c9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"403ee37469fe021fb841d57a05695d9881b4c28b","unresolved":false,"context_lines":[{"line_number":5103,"context_line":"        # If we spawned from a temporary snapshot image we can delete that now,"},{"line_number":5104,"context_line":"        # similar to how unshelve works."},{"line_number":5105,"context_line":"        if snapshot_id:"},{"line_number":5106,"context_line":"            # FIXME(mriedem): Need to deal with bug 1653953 for libvirt with"},{"line_number":5107,"context_line":"            # the rbd image backend."},{"line_number":5108,"context_line":"            compute_utils.delete_image("},{"line_number":5109,"context_line":"                ctxt, instance, self.image_api, snapshot_id)"},{"line_number":5110,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"7faddb67_fa7271e3","line":5107,"range":{"start_line":5106,"start_character":12,"end_line":5107,"end_character":36},"in_reply_to":"9fb8cfa7_0065cab4","updated":"2019-07-03 21:02:55.000000000","message":"Added these details to the comment for posterity.","commit_id":"35a298c59ae1135ba457e4b7ac73780a527e75c9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d33873f6c65479a3f2e768297bac811754c74f59","unresolved":false,"context_lines":[{"line_number":4939,"context_line":"        # to ACTIVE for backwards compatibility"},{"line_number":4940,"context_line":"        old_vm_state \u003d instance.system_metadata.get(\u0027old_vm_state\u0027,"},{"line_number":4941,"context_line":"                                                    vm_states.ACTIVE)"},{"line_number":4942,"context_line":"        instance.old_flavor \u003d old_flavor"},{"line_number":4943,"context_line":""},{"line_number":4944,"context_line":"        if old_instance_type_id !\u003d new_instance_type_id:"},{"line_number":4945,"context_line":"            new_flavor \u003d instance.new_flavor  # this is set in _prep_resize"}],"source_content_type":"text/x-python","patch_set":38,"id":"7faddb67_4a8fa529","line":4942,"updated":"2019-08-15 13:40:17.000000000","message":"Same-cell resize does the same thing here.","commit_id":"2aea30bad3b93cf60a8982cbef7f5214f9ec638d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bcbb1eb59acb44280459ab9ac421945dfffa4b64","unresolved":false,"context_lines":[{"line_number":4939,"context_line":"        # to ACTIVE for backwards compatibility"},{"line_number":4940,"context_line":"        old_vm_state \u003d instance.system_metadata.get(\u0027old_vm_state\u0027,"},{"line_number":4941,"context_line":"                                                    vm_states.ACTIVE)"},{"line_number":4942,"context_line":"        instance.old_flavor \u003d old_flavor"},{"line_number":4943,"context_line":""},{"line_number":4944,"context_line":"        if old_instance_type_id !\u003d new_instance_type_id:"},{"line_number":4945,"context_line":"            new_flavor \u003d instance.new_flavor  # this is set in _prep_resize"}],"source_content_type":"text/x-python","patch_set":38,"id":"7faddb67_e0a462a5","line":4942,"in_reply_to":"7faddb67_4a8fa529","updated":"2019-08-16 09:14:14.000000000","message":"OK. I learned something today. :)","commit_id":"2aea30bad3b93cf60a8982cbef7f5214f9ec638d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"715f6dee66f38759ff2785523a817d557d9f6bf4","unresolved":false,"context_lines":[{"line_number":5146,"context_line":"            image_meta \u003d instance.image_meta"},{"line_number":5147,"context_line":""},{"line_number":5148,"context_line":"        resize \u003d migration.migration_type \u003d\u003d \u0027resize\u0027"},{"line_number":5149,"context_line":"        instance.old_flavor \u003d instance.flavor"},{"line_number":5150,"context_line":"        if resize:"},{"line_number":5151,"context_line":"            flavor \u003d instance.new_flavor"},{"line_number":5152,"context_line":"            # If we are resizing to a new flavor we need to set the"}],"source_content_type":"text/x-python","patch_set":38,"id":"7faddb67_7f2ce500","line":5149,"range":{"start_line":5149,"start_character":8,"end_line":5149,"end_character":45},"updated":"2019-08-12 14:30:37.000000000","message":"Is it intentional that we set old_flavor even if this is just a migration?","commit_id":"2aea30bad3b93cf60a8982cbef7f5214f9ec638d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bcbb1eb59acb44280459ab9ac421945dfffa4b64","unresolved":false,"context_lines":[{"line_number":5146,"context_line":"            image_meta \u003d instance.image_meta"},{"line_number":5147,"context_line":""},{"line_number":5148,"context_line":"        resize \u003d migration.migration_type \u003d\u003d \u0027resize\u0027"},{"line_number":5149,"context_line":"        instance.old_flavor \u003d instance.flavor"},{"line_number":5150,"context_line":"        if resize:"},{"line_number":5151,"context_line":"            flavor \u003d instance.new_flavor"},{"line_number":5152,"context_line":"            # If we are resizing to a new flavor we need to set the"}],"source_content_type":"text/x-python","patch_set":38,"id":"7faddb67_40ad3682","line":5149,"range":{"start_line":5149,"start_character":8,"end_line":5149,"end_character":45},"in_reply_to":"7faddb67_0aac4d9d","updated":"2019-08-16 09:14:14.000000000","message":"Thanks for the pointer.","commit_id":"2aea30bad3b93cf60a8982cbef7f5214f9ec638d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d33873f6c65479a3f2e768297bac811754c74f59","unresolved":false,"context_lines":[{"line_number":5146,"context_line":"            image_meta \u003d instance.image_meta"},{"line_number":5147,"context_line":""},{"line_number":5148,"context_line":"        resize \u003d migration.migration_type \u003d\u003d \u0027resize\u0027"},{"line_number":5149,"context_line":"        instance.old_flavor \u003d instance.flavor"},{"line_number":5150,"context_line":"        if resize:"},{"line_number":5151,"context_line":"            flavor \u003d instance.new_flavor"},{"line_number":5152,"context_line":"            # If we are resizing to a new flavor we need to set the"}],"source_content_type":"text/x-python","patch_set":38,"id":"7faddb67_0aac4d9d","line":5149,"range":{"start_line":5149,"start_character":8,"end_line":5149,"end_character":45},"in_reply_to":"7faddb67_7f2ce500","updated":"2019-08-15 13:40:17.000000000","message":"Yes, this is following how finish_resize works for a same-cell resize/cold migrate. See L4942.","commit_id":"2aea30bad3b93cf60a8982cbef7f5214f9ec638d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"715f6dee66f38759ff2785523a817d557d9f6bf4","unresolved":false,"context_lines":[{"line_number":5162,"context_line":"        # This seems a bit late to be sending the start notification but"},{"line_number":5163,"context_line":"        # it is what traditional resize has always done as well and it does"},{"line_number":5164,"context_line":"        # contain the changes to the instance with the new_flavor and"},{"line_number":5165,"context_line":"        # task_state."},{"line_number":5166,"context_line":"        bdms \u003d instance.get_bdms()"},{"line_number":5167,"context_line":"        network_info \u003d instance.get_network_info()"},{"line_number":5168,"context_line":"        self._send_finish_resize_notifications("}],"source_content_type":"text/x-python","patch_set":38,"id":"7faddb67_9f4681c0","line":5165,"updated":"2019-08-12 14:30:37.000000000","message":"yepp","commit_id":"2aea30bad3b93cf60a8982cbef7f5214f9ec638d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"715f6dee66f38759ff2785523a817d557d9f6bf4","unresolved":false,"context_lines":[{"line_number":5191,"context_line":""},{"line_number":5192,"context_line":"        self._update_instance_after_spawn("},{"line_number":5193,"context_line":"            ctxt, instance, vm_state\u003dvm_states.RESIZED)"},{"line_number":5194,"context_line":"        # Setting the host/node values will make the ResourceTracker continue"},{"line_number":5195,"context_line":"        # to track usage for this instance on this host."},{"line_number":5196,"context_line":"        instance.host \u003d migration.dest_compute"},{"line_number":5197,"context_line":"        instance.node \u003d migration.dest_node"},{"line_number":5198,"context_line":"        instance.save(expected_task_state\u003dtask_states.RESIZE_FINISH)"},{"line_number":5199,"context_line":""},{"line_number":5200,"context_line":"        # Broadcast to all schedulers that the instance is on this host."}],"source_content_type":"text/x-python","patch_set":38,"id":"7faddb67_9ffbe145","line":5197,"range":{"start_line":5194,"start_character":1,"end_line":5197,"end_character":43},"updated":"2019-08-12 14:30:37.000000000","message":"Hm isn\u0027t it a bit too late? During non cross cell resize this is done already in _resize_instance() when the migration.status is set to \u0027post-migrating\u0027","commit_id":"2aea30bad3b93cf60a8982cbef7f5214f9ec638d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bcbb1eb59acb44280459ab9ac421945dfffa4b64","unresolved":false,"context_lines":[{"line_number":5191,"context_line":""},{"line_number":5192,"context_line":"        self._update_instance_after_spawn("},{"line_number":5193,"context_line":"            ctxt, instance, vm_state\u003dvm_states.RESIZED)"},{"line_number":5194,"context_line":"        # Setting the host/node values will make the ResourceTracker continue"},{"line_number":5195,"context_line":"        # to track usage for this instance on this host."},{"line_number":5196,"context_line":"        instance.host \u003d migration.dest_compute"},{"line_number":5197,"context_line":"        instance.node \u003d migration.dest_node"},{"line_number":5198,"context_line":"        instance.save(expected_task_state\u003dtask_states.RESIZE_FINISH)"},{"line_number":5199,"context_line":""},{"line_number":5200,"context_line":"        # Broadcast to all schedulers that the instance is on this host."}],"source_content_type":"text/x-python","patch_set":38,"id":"7faddb67_608392cc","line":5197,"range":{"start_line":5194,"start_character":1,"end_line":5197,"end_character":43},"in_reply_to":"7faddb67_6aa86177","updated":"2019-08-16 09:14:14.000000000","message":"Thanks for the explanation. It is a lot cleaner now. I think the key to me was that there are two copies of the instance record and we are setting the dest host instance record here, even _before_ the dest host instance is the one that actively seen by the user.","commit_id":"2aea30bad3b93cf60a8982cbef7f5214f9ec638d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d33873f6c65479a3f2e768297bac811754c74f59","unresolved":false,"context_lines":[{"line_number":5191,"context_line":""},{"line_number":5192,"context_line":"        self._update_instance_after_spawn("},{"line_number":5193,"context_line":"            ctxt, instance, vm_state\u003dvm_states.RESIZED)"},{"line_number":5194,"context_line":"        # Setting the host/node values will make the ResourceTracker continue"},{"line_number":5195,"context_line":"        # to track usage for this instance on this host."},{"line_number":5196,"context_line":"        instance.host \u003d migration.dest_compute"},{"line_number":5197,"context_line":"        instance.node \u003d migration.dest_node"},{"line_number":5198,"context_line":"        instance.save(expected_task_state\u003dtask_states.RESIZE_FINISH)"},{"line_number":5199,"context_line":""},{"line_number":5200,"context_line":"        # Broadcast to all schedulers that the instance is on this host."}],"source_content_type":"text/x-python","patch_set":38,"id":"7faddb67_6aa86177","line":5197,"range":{"start_line":5194,"start_character":1,"end_line":5197,"end_character":43},"in_reply_to":"7faddb67_9ffbe145","updated":"2019-08-15 13:40:17.000000000","message":"The analog to resize_instance is prep_snapshot_based_resize_at_source, and this method is analogous to _finish_resize. The big difference is with cross-cell migration these two methods are running against different copies of the instance in different databases, so setting the instance host/node in prep_snapshot_based_resize_at_source would only change the copy on the instance in the source cell DB and affect the ResourceTracker on the source host, but we want to make sure the dest host ResourceTracker is going to be tracking this instance as running on it, which we wouldn\u0027t get if we didn\u0027t set this here, or before we get here in conductor, e.g. sometime between PrepResizeAtSourceTask and FinishResizeAtDestTask. I mentioned something like that in prep_snapshot_based_resize_at_source too:\n\nhttps://review.opendev.org/#/c/634832/44/nova/compute/manager.py@4763\n\nAs far as continuing to keep a placeholder claim on the old_flavor on the source host, the RT on the source host should do that based on the migration record in the source cell database until the user confirms/reverts the migration:\n\nhttps://github.com/openstack/nova/blob/872a823d9a02f31e266882bfb499673c51fb4075/nova/compute/resource_tracker.py#L759\n\nI\u0027m not sure if it matters from a dest host/RT/cell DB perspective if we update the instance host/node values here after we\u0027ve applied the migration context or if we should do it before in conductor (after PrepResizeAtSourceTask but before FinishResizeAtDestTask).\n\nNote also that with same-cell resize it\u0027s a bit weird that we update the instance host/node to the dest compute before we even successfully finish on the dest compute, i.e. that finish_migration is successful. In a same-cell resize, if _finish_resize fails for some reason, the instance is marked as being on the dest host so if you reboot or rebuild it that\u0027s where it\u0027s going to go. With cross-cell resize things are a bit different in that we still have the instance on the source host in the source cell DB so if we fail in this step in the target cell / dest host, conductor won\u0027t update the instance mapping to point at the target cell and it will rollback the target cell copy of the instance, so you\u0027re left with the instance on the source cell/host and you can reboot it from there as needed to recover.","commit_id":"2aea30bad3b93cf60a8982cbef7f5214f9ec638d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8f63f294cfb3bb6376679070755cb9f93fdfade9","unresolved":false,"context_lines":[{"line_number":519,"context_line":"class ComputeManager(manager.Manager):"},{"line_number":520,"context_line":"    \"\"\"Manages the running instances from creation to destruction.\"\"\""},{"line_number":521,"context_line":""},{"line_number":522,"context_line":"    target \u003d messaging.Target(version\u003d\u00275.4\u0027)"},{"line_number":523,"context_line":""},{"line_number":524,"context_line":"    def __init__(self, compute_driver\u003dNone, *args, **kwargs):"},{"line_number":525,"context_line":"        \"\"\"Load configuration options and connect to the hypervisor.\"\"\""}],"source_content_type":"text/x-python","patch_set":40,"id":"7faddb67_46610e11","line":522,"updated":"2019-08-28 14:41:13.000000000","message":"As an aside, could we have added stubs for all the new methods you\u0027re adding in this series and simply bumped this once? I guess not, since that\u0027d mean 5.1 on one machine (without the patch that adds the implmentation) !\u003d 5.1 on another (with the patch), but worth asking","commit_id":"ac31cb13d84aad0d5a3f59cf8157765675d4f3bc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f2698857571f195fa9b021f26c57c35a03b32d4c","unresolved":false,"context_lines":[{"line_number":519,"context_line":"class ComputeManager(manager.Manager):"},{"line_number":520,"context_line":"    \"\"\"Manages the running instances from creation to destruction.\"\"\""},{"line_number":521,"context_line":""},{"line_number":522,"context_line":"    target \u003d messaging.Target(version\u003d\u00275.4\u0027)"},{"line_number":523,"context_line":""},{"line_number":524,"context_line":"    def __init__(self, compute_driver\u003dNone, *args, **kwargs):"},{"line_number":525,"context_line":"        \"\"\"Load configuration options and connect to the hypervisor.\"\"\""}],"source_content_type":"text/x-python","patch_set":40,"id":"3fa7e38b_e3f5becc","line":522,"in_reply_to":"7faddb67_46610e11","updated":"2019-09-18 20:39:04.000000000","message":"I don\u0027t think that\u0027s a game we want to play.","commit_id":"ac31cb13d84aad0d5a3f59cf8157765675d4f3bc"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8f63f294cfb3bb6376679070755cb9f93fdfade9","unresolved":false,"context_lines":[{"line_number":5153,"context_line":"            # Just use what is already on the volume-backed instance."},{"line_number":5154,"context_line":"            image_meta \u003d instance.image_meta"},{"line_number":5155,"context_line":""},{"line_number":5156,"context_line":"        resize \u003d migration.migration_type \u003d\u003d \u0027resize\u0027"},{"line_number":5157,"context_line":"        instance.old_flavor \u003d instance.flavor"},{"line_number":5158,"context_line":"        if resize:"},{"line_number":5159,"context_line":"            flavor \u003d instance.new_flavor"}],"source_content_type":"text/x-python","patch_set":40,"id":"7faddb67_41d01854","line":5156,"range":{"start_line":5156,"start_character":0,"end_line":5156,"end_character":53},"updated":"2019-08-28 14:41:13.000000000","message":"nit: \u0027Migration.is_resize\u0027 might be nice, though we do only have one other thing like this at the moment (\u0027nova.compute.resource_tracker.ResourceTracker._get_instance_type\u0027)","commit_id":"ac31cb13d84aad0d5a3f59cf8157765675d4f3bc"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8f63f294cfb3bb6376679070755cb9f93fdfade9","unresolved":false,"context_lines":[{"line_number":5159,"context_line":"            flavor \u003d instance.new_flavor"},{"line_number":5160,"context_line":"            # If we are resizing to a new flavor we need to set the"},{"line_number":5161,"context_line":"            # flavor-related fields on the instance."},{"line_number":5162,"context_line":"            # NOTE(mriedem): This is likely where storing old/new_flavor on"},{"line_number":5163,"context_line":"            # the MigrationContext would make this cleaner."},{"line_number":5164,"context_line":"            self._set_instance_info(instance, flavor)"},{"line_number":5165,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"7faddb67_c1c3a889","line":5162,"updated":"2019-08-28 14:41:13.000000000","message":"nit: feels like as much a TODO as a note","commit_id":"ac31cb13d84aad0d5a3f59cf8157765675d4f3bc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f2698857571f195fa9b021f26c57c35a03b32d4c","unresolved":false,"context_lines":[{"line_number":5159,"context_line":"            flavor \u003d instance.new_flavor"},{"line_number":5160,"context_line":"            # If we are resizing to a new flavor we need to set the"},{"line_number":5161,"context_line":"            # flavor-related fields on the instance."},{"line_number":5162,"context_line":"            # NOTE(mriedem): This is likely where storing old/new_flavor on"},{"line_number":5163,"context_line":"            # the MigrationContext would make this cleaner."},{"line_number":5164,"context_line":"            self._set_instance_info(instance, flavor)"},{"line_number":5165,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"3fa7e38b_4305b2c1","line":5162,"in_reply_to":"7faddb67_c1c3a889","updated":"2019-09-18 20:39:04.000000000","message":"I removed this from earlier in the series:\n\nhttps://review.opendev.org/#/c/633293/45/nova/compute/resource_tracker.py@314\n\nSo I should probably just remove it from here as well. I\u0027m likely not going to be spending time on migrating the old/new_flavor stashing we do on the instance and moving that to the migration_context even though I think that\u0027s a cleaner/better fit for that data, it\u0027s just that it pre-dated migration_context.","commit_id":"ac31cb13d84aad0d5a3f59cf8157765675d4f3bc"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8f63f294cfb3bb6376679070755cb9f93fdfade9","unresolved":false,"context_lines":[{"line_number":5172,"context_line":"        # contain the changes to the instance with the new_flavor and"},{"line_number":5173,"context_line":"        # task_state."},{"line_number":5174,"context_line":"        bdms \u003d instance.get_bdms()"},{"line_number":5175,"context_line":"        network_info \u003d instance.get_network_info()"},{"line_number":5176,"context_line":"        self._send_finish_resize_notifications("},{"line_number":5177,"context_line":"            ctxt, instance, bdms, network_info,"},{"line_number":5178,"context_line":"            fields.NotificationPhase.START)"}],"source_content_type":"text/x-python","patch_set":40,"id":"7faddb67_616194a8","line":5175,"updated":"2019-08-28 14:41:13.000000000","message":"I\u0027m assuming we don\u0027t need to worry about refreshing this since we did that on the source side [1]\n\n[1] https://review.opendev.org/#/c/634832/45/nova/compute/manager.py@4704","commit_id":"ac31cb13d84aad0d5a3f59cf8157765675d4f3bc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f2698857571f195fa9b021f26c57c35a03b32d4c","unresolved":false,"context_lines":[{"line_number":5172,"context_line":"        # contain the changes to the instance with the new_flavor and"},{"line_number":5173,"context_line":"        # task_state."},{"line_number":5174,"context_line":"        bdms \u003d instance.get_bdms()"},{"line_number":5175,"context_line":"        network_info \u003d instance.get_network_info()"},{"line_number":5176,"context_line":"        self._send_finish_resize_notifications("},{"line_number":5177,"context_line":"            ctxt, instance, bdms, network_info,"},{"line_number":5178,"context_line":"            fields.NotificationPhase.START)"}],"source_content_type":"text/x-python","patch_set":40,"id":"3fa7e38b_831baa19","line":5175,"in_reply_to":"7faddb67_616194a8","updated":"2019-09-18 20:39:04.000000000","message":"The source in that case (_prep_snapshot_based_resize_at_source) is a different cell database so it doesn\u0027t really apply here.\n\nThis is just used for notifications. See in _finish_snapshot_based_resize_at_dest_spawn we call the network API after migrate_instance_finish and pass that to driver.spawn.\n\nNow that you mention it, I think at some point while working on this series I thought about how migrate_instance_finish should just have the refresh_cache decorator on it but doesn\u0027t for whatever reason, but that\u0027s something we could think about doing later.","commit_id":"ac31cb13d84aad0d5a3f59cf8157765675d4f3bc"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8f63f294cfb3bb6376679070755cb9f93fdfade9","unresolved":false,"context_lines":[{"line_number":5274,"context_line":"                    # port bindings and we want the source compute port"},{"line_number":5275,"context_line":"                    # bindings to be re-activated. Remember at this point the"},{"line_number":5276,"context_line":"                    # instance.host is still pointing at the source compute."},{"line_number":5277,"context_line":"                    # TODO(mriedem): Maybe we should be calling"},{"line_number":5278,"context_line":"                    # setup_instance_network_on_host here to deal with pci"},{"line_number":5279,"context_line":"                    # devices?"},{"line_number":5280,"context_line":"                    with utils.temporary_mutation("},{"line_number":5281,"context_line":"                            migration, dest_compute\u003dmigration.source_compute):"},{"line_number":5282,"context_line":"                        self.network_api.migrate_instance_start("}],"source_content_type":"text/x-python","patch_set":40,"id":"7faddb67_810050ad","line":5279,"range":{"start_line":5277,"start_character":0,"end_line":5279,"end_character":30},"updated":"2019-08-28 14:41:13.000000000","message":"Do we need to decide on this before we move on?","commit_id":"ac31cb13d84aad0d5a3f59cf8157765675d4f3bc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f2698857571f195fa9b021f26c57c35a03b32d4c","unresolved":false,"context_lines":[{"line_number":5274,"context_line":"                    # port bindings and we want the source compute port"},{"line_number":5275,"context_line":"                    # bindings to be re-activated. Remember at this point the"},{"line_number":5276,"context_line":"                    # instance.host is still pointing at the source compute."},{"line_number":5277,"context_line":"                    # TODO(mriedem): Maybe we should be calling"},{"line_number":5278,"context_line":"                    # setup_instance_network_on_host here to deal with pci"},{"line_number":5279,"context_line":"                    # devices?"},{"line_number":5280,"context_line":"                    with utils.temporary_mutation("},{"line_number":5281,"context_line":"                            migration, dest_compute\u003dmigration.source_compute):"},{"line_number":5282,"context_line":"                        self.network_api.migrate_instance_start("}],"source_content_type":"text/x-python","patch_set":40,"id":"3fa7e38b_c3cf627d","line":5279,"range":{"start_line":5277,"start_character":0,"end_line":5279,"end_character":30},"in_reply_to":"7faddb67_810050ad","updated":"2019-09-18 20:39:04.000000000","message":"Right now cross-cell resize with instances have NUMA or PCI devices is a limitation in my mind since we don\u0027t have any integration testing for it nor have I built up the necessary fixtures in the functional tests to tease all of that out, so I haven\u0027t been focused on it too much. It\u0027s definitely something that if not implemented in the initial phase needs to go into the doc.","commit_id":"ac31cb13d84aad0d5a3f59cf8157765675d4f3bc"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8f63f294cfb3bb6376679070755cb9f93fdfade9","unresolved":false,"context_lines":[{"line_number":5289,"context_line":""},{"line_number":5290,"context_line":"                # Rollback volume connections on this host."},{"line_number":5291,"context_line":"                for bdm in bdms:"},{"line_number":5292,"context_line":"                    if bdm.is_volume:"},{"line_number":5293,"context_line":"                        try:"},{"line_number":5294,"context_line":"                            self._remove_volume_connection("},{"line_number":5295,"context_line":"                                ctxt, bdm, instance, delete_attachment\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":40,"id":"7faddb67_21de3c3e","line":5292,"range":{"start_line":5292,"start_character":0,"end_line":5292,"end_character":37},"updated":"2019-08-28 14:41:13.000000000","message":"style nit:\n\n  if not bdm.is_volume:\n      continue\n\n  try:\n      ...\n\nJust makes the below easier to read (less wrapping)","commit_id":"ac31cb13d84aad0d5a3f59cf8157765675d4f3bc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f2698857571f195fa9b021f26c57c35a03b32d4c","unresolved":false,"context_lines":[{"line_number":5289,"context_line":""},{"line_number":5290,"context_line":"                # Rollback volume connections on this host."},{"line_number":5291,"context_line":"                for bdm in bdms:"},{"line_number":5292,"context_line":"                    if bdm.is_volume:"},{"line_number":5293,"context_line":"                        try:"},{"line_number":5294,"context_line":"                            self._remove_volume_connection("},{"line_number":5295,"context_line":"                                ctxt, bdm, instance, delete_attachment\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":40,"id":"3fa7e38b_c3944247","line":5292,"range":{"start_line":5292,"start_character":0,"end_line":5292,"end_character":37},"in_reply_to":"7faddb67_21de3c3e","updated":"2019-09-18 20:39:04.000000000","message":"That\u0027s a style nit of mine - negative logic in the condition and continuing in a loop.","commit_id":"ac31cb13d84aad0d5a3f59cf8157765675d4f3bc"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0489db8d1122fde77f074101c6030bf8d8703757","unresolved":false,"context_lines":[{"line_number":5236,"context_line":"    @errors_out_migration"},{"line_number":5237,"context_line":"    @wrap_instance_fault"},{"line_number":5238,"context_line":"    def finish_snapshot_based_resize_at_dest("},{"line_number":5239,"context_line":"            self, ctxt, instance, migration, snapshot_id):"},{"line_number":5240,"context_line":"        \"\"\"Finishes the snapshot-based resize at the destination compute."},{"line_number":5241,"context_line":""},{"line_number":5242,"context_line":"        Sets up block devices and networking on the destination compute and"}],"source_content_type":"text/x-python","patch_set":43,"id":"3fa7e38b_8b02aa0a","line":5239,"updated":"2019-10-08 13:42:44.000000000","message":"We need to pass the request_spec to this rpc method to be able to get the port - rp mapping for the migrate_instance_finish() call below.","commit_id":"287ebdaa8944d4198787f9fa24762e25c8e3b8fe"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fdb15c88bba5b59c02c40ba83e54d85d06803e55","unresolved":false,"context_lines":[{"line_number":5236,"context_line":"    @errors_out_migration"},{"line_number":5237,"context_line":"    @wrap_instance_fault"},{"line_number":5238,"context_line":"    def finish_snapshot_based_resize_at_dest("},{"line_number":5239,"context_line":"            self, ctxt, instance, migration, snapshot_id):"},{"line_number":5240,"context_line":"        \"\"\"Finishes the snapshot-based resize at the destination compute."},{"line_number":5241,"context_line":""},{"line_number":5242,"context_line":"        Sets up block devices and networking on the destination compute and"}],"source_content_type":"text/x-python","patch_set":43,"id":"3fa7e38b_9c40ae37","line":5239,"in_reply_to":"3fa7e38b_8b02aa0a","updated":"2019-10-08 15:05:20.000000000","message":"Done","commit_id":"287ebdaa8944d4198787f9fa24762e25c8e3b8fe"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0489db8d1122fde77f074101c6030bf8d8703757","unresolved":false,"context_lines":[{"line_number":5372,"context_line":"        # network-vif-plugged event and that means when driver.spawn waits for"},{"line_number":5373,"context_line":"        # it we might have already gotten the event and neutron won\u0027t send"},{"line_number":5374,"context_line":"        # another one so we could timeout."},{"line_number":5375,"context_line":"        # TODO(mriedem): Calculate provider mappings when we support cross-cell"},{"line_number":5376,"context_line":"        # resize/migrate with ports having resource requests."},{"line_number":5377,"context_line":"        self.network_api.migrate_instance_finish("},{"line_number":5378,"context_line":"            ctxt, instance, migration, provider_mappings\u003dNone)"}],"source_content_type":"text/x-python","patch_set":43,"id":"3fa7e38b_0b179a53","line":5375,"updated":"2019-10-08 13:42:44.000000000","message":"group-rp mapping is calculated in the conductor in the MigrationTask._schedule(). Here you have to extract the port_id - rp mapping from the request_spec and pass that to the migrate_instance_finish() call as a parameter.\n\nFor that we need the RequestSpec to be passed in the rpc method.","commit_id":"287ebdaa8944d4198787f9fa24762e25c8e3b8fe"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5ebda95f9dd7079cfe0fbaa38751c28bed0d714d","unresolved":false,"context_lines":[{"line_number":5426,"context_line":"        # If we spawned from a temporary snapshot image we can delete that now,"},{"line_number":5427,"context_line":"        # similar to how unshelve works."},{"line_number":5428,"context_line":"        if snapshot_id:"},{"line_number":5429,"context_line":"            # FIXME(mriedem): Need to deal with bug 1653953 for libvirt with"},{"line_number":5430,"context_line":"            # the rbd image backend. I think the cleanest thing we can do is"},{"line_number":5431,"context_line":"            # from the driver check to see if instance.migration_context is not"},{"line_number":5432,"context_line":"            # None and if so, get the Migration record for that context"}],"source_content_type":"text/x-python","patch_set":47,"id":"3fa7e38b_d089e625","line":5429,"updated":"2019-10-29 21:40:38.000000000","message":"Done toward the end of the series:\n\nhttps://review.opendev.org/#/c/691991/","commit_id":"28109a79ae4e54ae3a6d6f41afeb5a37576b9623"}],"nova/compute/rpcapi.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cede417b09ad045ff13b7abe5a719e20021846ef","unresolved":false,"context_lines":[{"line_number":580,"context_line":""},{"line_number":581,"context_line":"        :param ctxt: nova auth request context targeted at the target cell DB"},{"line_number":582,"context_line":"        :param instance: The Instance object being resized with the"},{"line_number":583,"context_line":"            ``migration_context`` field set. Upon successful completion of this"},{"line_number":584,"context_line":"            method the vm_state should be \"resized\", the task_state should be"},{"line_number":585,"context_line":"            None, and migration context, host/node and flavor-related fields"},{"line_number":586,"context_line":"            should be set on the instance."}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_c326f1ce","line":583,"range":{"start_line":583,"start_character":14,"end_line":583,"end_character":31},"updated":"2019-02-14 17:41:06.000000000","message":"Need to pass the snapshot_id instead.","commit_id":"746ddab119e49e3c6c7b94493c4cab452f1cf684"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4ccb24cce031346ba95eacf37e6bdb591fac075a","unresolved":false,"context_lines":[{"line_number":580,"context_line":""},{"line_number":581,"context_line":"        :param ctxt: nova auth request context targeted at the target cell DB"},{"line_number":582,"context_line":"        :param instance: The Instance object being resized with the"},{"line_number":583,"context_line":"            ``migration_context`` field set. Upon successful completion of this"},{"line_number":584,"context_line":"            method the vm_state should be \"resized\", the task_state should be"},{"line_number":585,"context_line":"            None, and migration context, host/node and flavor-related fields"},{"line_number":586,"context_line":"            should be set on the instance."}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_16b755f7","line":583,"range":{"start_line":583,"start_character":14,"end_line":583,"end_character":31},"in_reply_to":"9fdfeff1_c326f1ce","updated":"2019-02-14 18:00:54.000000000","message":"Done","commit_id":"746ddab119e49e3c6c7b94493c4cab452f1cf684"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fc33ecf4007fab5e6f5565b1d8698b76929acc52","unresolved":false,"context_lines":[{"line_number":588,"context_line":"            be \"finished\"."},{"line_number":589,"context_line":"        :param snapshot_id: ID of the image snapshot created for a"},{"line_number":590,"context_line":"            non-volume-backed instance, else None."},{"line_number":591,"context_line":"        :raises: nova.exception.MigrationError if the destination compute"},{"line_number":592,"context_line":"            service is too old for this method"},{"line_number":593,"context_line":"        \"\"\""},{"line_number":594,"context_line":"        client \u003d self.router.client(ctxt)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_749a5914","line":591,"range":{"start_line":591,"start_character":9,"end_line":591,"end_character":15},"updated":"2019-02-14 20:06:28.000000000","message":"This should include MessagingTimeout.","commit_id":"ff21e7108393512925bd3124fb0e1a392e279361"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cf685b1820b42fcec5522b1b6d74bb43c5cd5aa4","unresolved":false,"context_lines":[{"line_number":588,"context_line":"            be \"finished\"."},{"line_number":589,"context_line":"        :param snapshot_id: ID of the image snapshot created for a"},{"line_number":590,"context_line":"            non-volume-backed instance, else None."},{"line_number":591,"context_line":"        :raises: nova.exception.MigrationError if the destination compute"},{"line_number":592,"context_line":"            service is too old for this method"},{"line_number":593,"context_line":"        \"\"\""},{"line_number":594,"context_line":"        client \u003d self.router.client(ctxt)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_fe0cad3a","line":591,"range":{"start_line":591,"start_character":9,"end_line":591,"end_character":15},"in_reply_to":"9fdfeff1_749a5914","updated":"2019-02-18 18:13:59.000000000","message":"Done","commit_id":"ff21e7108393512925bd3124fb0e1a392e279361"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fc6c2a60226159eb9b3d91d6ef4b39741452e61d","unresolved":false,"context_lines":[{"line_number":10521,"context_line":"                self.compute.finish_snapshot_based_resize_at_dest,"},{"line_number":10522,"context_line":"                self.context, self.instance, self.migration, uuids.snapshot_id,"},{"line_number":10523,"context_line":"                request_spec)"},{"line_number":10524,"context_line":"        # Assert the non-decorator mock calls."},{"line_number":10525,"context_line":"        _finish.assert_called_once_with("},{"line_number":10526,"context_line":"            self.context, self.instance, self.migration, uuids.snapshot_id)"},{"line_number":10527,"context_line":"        # Assert _error_out_instance_on_exception is called."},{"line_number":10528,"context_line":"        self.assertEqual(vm_states.ERROR, self.instance.vm_state)"},{"line_number":10529,"context_line":"        # Assert wrap_instance_fault is called."},{"line_number":10530,"context_line":"        add_fault.assert_called_once_with("},{"line_number":10531,"context_line":"            self.context, self.instance, ex, mock.ANY)"},{"line_number":10532,"context_line":"        # Assert wrap_exception is called."},{"line_number":10533,"context_line":"        self.assertEqual(1, len(fake_notifier.VERSIONED_NOTIFICATIONS))"},{"line_number":10534,"context_line":"        self.assertEqual("},{"line_number":10535,"context_line":"            \u0027compute.%s\u0027 % fields.NotificationAction.EXCEPTION,"},{"line_number":10536,"context_line":"            fake_notifier.VERSIONED_NOTIFICATIONS[0][\u0027event_type\u0027])"},{"line_number":10537,"context_line":"        # Assert errors_out_migration is called."},{"line_number":10538,"context_line":"        self.assertEqual(\u0027error\u0027, self.migration.status)"},{"line_number":10539,"context_line":"        self.migration.save.assert_called_once_with()"},{"line_number":10540,"context_line":"        # Assert reverts_task_state is called."},{"line_number":10541,"context_line":"        self.assertIsNone(self.instance.task_state)"},{"line_number":10542,"context_line":"        # Instance.save is called twice:"},{"line_number":10543,"context_line":"        # 1. _error_out_instance_on_exception"},{"line_number":10544,"context_line":"        # 2. reverts_task_state"},{"line_number":10545,"context_line":"        self.assertEqual(2, instance_save.call_count)"},{"line_number":10546,"context_line":""},{"line_number":10547,"context_line":"    @mock.patch(\u0027nova.objects.Instance.get_bdms\u0027)"},{"line_number":10548,"context_line":"    @mock.patch(\u0027nova.objects.Instance.apply_migration_context\u0027)"}],"source_content_type":"text/x-python","patch_set":48,"id":"3fa7e38b_fb88456b","line":10545,"range":{"start_line":10524,"start_character":0,"end_line":10545,"end_character":53},"updated":"2019-11-04 16:08:34.000000000","message":"I wish you would make it easier to review these tests.","commit_id":"a2fba47bcf104dd37e30870e2837c4141df6c7a4"}]}
