)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0132eba2b9085d3a3e869827147e665f8f2e6c00","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make live migration hold resources with a migration allocation"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Note this also includes a fix for the fake virt driver as it was"},{"line_number":10,"context_line":"not adhering to the requried API and returning migrate_data from"},{"line_number":11,"context_line":"pre_live_migration()."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I9068a5a5b47cef565802a6d58f37777464644100"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"ff82abbf_49df8e39","line":11,"range":{"start_line":9,"start_character":0,"end_line":11,"end_character":21},"updated":"2017-11-27 16:55:10.000000000","message":"This must have been fixed already since it\u0027s no longer in this change.","commit_id":"c44c54d32483cb5e0372ae1f239dabc627848074"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9ec5bdf91d12c787781d05f0e4d576fdf8e73bee","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make live migration hold resources with a migration allocation"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Note this also includes a fix for the fake virt driver as it was"},{"line_number":10,"context_line":"not adhering to the requried API and returning migrate_data from"},{"line_number":11,"context_line":"pre_live_migration()."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I9068a5a5b47cef565802a6d58f37777464644100"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"ff82abbf_dfd03022","line":11,"range":{"start_line":9,"start_character":0,"end_line":11,"end_character":21},"in_reply_to":"ff82abbf_49df8e39","updated":"2017-11-28 20:27:27.000000000","message":"Yep, this was the merge conflict.","commit_id":"c44c54d32483cb5e0372ae1f239dabc627848074"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0132eba2b9085d3a3e869827147e665f8f2e6c00","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Note this also includes a fix for the fake virt driver as it was"},{"line_number":10,"context_line":"not adhering to the requried API and returning migrate_data from"},{"line_number":11,"context_line":"pre_live_migration()."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I9068a5a5b47cef565802a6d58f37777464644100"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"ff82abbf_a9edfaf0","line":12,"updated":"2017-11-27 16:55:10.000000000","message":"Implements blueprint migration-allocations","commit_id":"c44c54d32483cb5e0372ae1f239dabc627848074"}],"nova/compute/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"de7189dbb2d6c53d2bbb2483dad5b4e41c02aae4","unresolved":false,"context_lines":[{"line_number":6123,"context_line":"        # host even before next periodic task."},{"line_number":6124,"context_line":"        self.update_available_resource(ctxt)"},{"line_number":6125,"context_line":""},{"line_number":6126,"context_line":"        rt \u003d self._get_resource_tracker()"},{"line_number":6127,"context_line":"        rt.delete_allocation_for_migrated_instance("},{"line_number":6128,"context_line":"            instance, source_node)"},{"line_number":6129,"context_line":""},{"line_number":6130,"context_line":"        self._update_scheduler_instance_info(ctxt, instance)"},{"line_number":6131,"context_line":"        self._notify_about_instance_usage(ctxt, instance,"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff82abbf_64b957ca","side":"PARENT","line":6128,"range":{"start_line":6126,"start_character":8,"end_line":6128,"end_character":34},"updated":"2017-11-27 17:26:12.000000000","message":"Shouldn\u0027t we have a nova-compute service version bump for this and check that in the live migrate task before doing the swap of the allocation? We currently only do the swap if the nova-compute minimum service version is 23, but we could have computes at version 23 which don\u0027t have this code, correct? Which means conductor is going to swap the allocations from the instance to the migration on the source node, and in post live migration (with old code before this change) we\u0027d try to remove allocations for the instance on the source node, which won\u0027t exist, but the allocations won\u0027t get cleaned up from the source node which are tracked by the migration.","commit_id":"2c7302e33e14bb43b629b40e0933d413dd2d54ed"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f4de9047d935116104204744c01134316efc257e","unresolved":false,"context_lines":[{"line_number":6123,"context_line":"        # host even before next periodic task."},{"line_number":6124,"context_line":"        self.update_available_resource(ctxt)"},{"line_number":6125,"context_line":""},{"line_number":6126,"context_line":"        rt \u003d self._get_resource_tracker()"},{"line_number":6127,"context_line":"        rt.delete_allocation_for_migrated_instance("},{"line_number":6128,"context_line":"            instance, source_node)"},{"line_number":6129,"context_line":""},{"line_number":6130,"context_line":"        self._update_scheduler_instance_info(ctxt, instance)"},{"line_number":6131,"context_line":"        self._notify_about_instance_usage(ctxt, instance,"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff82abbf_7765481d","side":"PARENT","line":6128,"range":{"start_line":6126,"start_character":8,"end_line":6128,"end_character":34},"in_reply_to":"ff82abbf_1b1a0916","updated":"2017-11-29 19:57:06.000000000","message":"\u003e Since we could be migrating from an old node to a new one, I\u0027m not sure what the right behavior is here.\n\nConductor is checking should_do_migration_allocation which is checking for the minimum version for all computes, so I think once we bump the compute version, we don\u0027t hit the new flow until all computes are upgraded to handle it, right?","commit_id":"2c7302e33e14bb43b629b40e0933d413dd2d54ed"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9ec5bdf91d12c787781d05f0e4d576fdf8e73bee","unresolved":false,"context_lines":[{"line_number":6123,"context_line":"        # host even before next periodic task."},{"line_number":6124,"context_line":"        self.update_available_resource(ctxt)"},{"line_number":6125,"context_line":""},{"line_number":6126,"context_line":"        rt \u003d self._get_resource_tracker()"},{"line_number":6127,"context_line":"        rt.delete_allocation_for_migrated_instance("},{"line_number":6128,"context_line":"            instance, source_node)"},{"line_number":6129,"context_line":""},{"line_number":6130,"context_line":"        self._update_scheduler_instance_info(ctxt, instance)"},{"line_number":6131,"context_line":"        self._notify_about_instance_usage(ctxt, instance,"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff82abbf_1b1a0916","side":"PARENT","line":6128,"range":{"start_line":6126,"start_character":8,"end_line":6128,"end_character":34},"in_reply_to":"ff82abbf_64b957ca","updated":"2017-11-28 20:27:27.000000000","message":"Ugh, I guess so. The bump to 23 was supposed to be all of this, but I guess that\u0027s been merged for a long time now and this hasn\u0027t...just, ugh. Since we could be migrating from an old node to a new one, I\u0027m not sure what the right behavior is here. We\u0027d have to hit placement to figure out if allocations were made for the migration I guess?","commit_id":"2c7302e33e14bb43b629b40e0933d413dd2d54ed"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"de7189dbb2d6c53d2bbb2483dad5b4e41c02aae4","unresolved":false,"context_lines":[{"line_number":6138,"context_line":"            migrate_data.migration.status \u003d \u0027completed\u0027"},{"line_number":6139,"context_line":"            migrate_data.migration.save()"},{"line_number":6140,"context_line":""},{"line_number":6141,"context_line":"        self._delete_allocation_after_move(instance, migrate_data.migration,"},{"line_number":6142,"context_line":"                                           instance.flavor,"},{"line_number":6143,"context_line":"                                           source_node)"},{"line_number":6144,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"ff82abbf_6485d759","line":6141,"range":{"start_line":6141,"start_character":53,"end_line":6141,"end_character":75},"updated":"2017-11-27 17:26:12.000000000","message":"This bypasses the check above on L6137, so migrate_data could be None or \u0027migration\u0027 might not be set.","commit_id":"c44c54d32483cb5e0372ae1f239dabc627848074"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9ec5bdf91d12c787781d05f0e4d576fdf8e73bee","unresolved":false,"context_lines":[{"line_number":6138,"context_line":"            migrate_data.migration.status \u003d \u0027completed\u0027"},{"line_number":6139,"context_line":"            migrate_data.migration.save()"},{"line_number":6140,"context_line":""},{"line_number":6141,"context_line":"        self._delete_allocation_after_move(instance, migrate_data.migration,"},{"line_number":6142,"context_line":"                                           instance.flavor,"},{"line_number":6143,"context_line":"                                           source_node)"},{"line_number":6144,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"ff82abbf_fb3c0594","line":6141,"range":{"start_line":6141,"start_character":53,"end_line":6141,"end_character":75},"in_reply_to":"ff82abbf_6485d759","updated":"2017-11-28 20:27:27.000000000","message":"True, we shouldn\u0027t be able to get here anymore with the actual support window, but this shouldn\u0027t be called unless we got migrate_data either so I\u0027ll move it under.","commit_id":"c44c54d32483cb5e0372ae1f239dabc627848074"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"de7189dbb2d6c53d2bbb2483dad5b4e41c02aae4","unresolved":false,"context_lines":[{"line_number":6249,"context_line":"        else:"},{"line_number":6250,"context_line":"            migration \u003d None"},{"line_number":6251,"context_line":""},{"line_number":6252,"context_line":"        if migration:"},{"line_number":6253,"context_line":"            # Remove allocations created in Placement for the dest node."},{"line_number":6254,"context_line":"            # If migration is None, we must be so old we don\u0027t have placement,"},{"line_number":6255,"context_line":"            # so no need to do something else."}],"source_content_type":"text/x-python","patch_set":25,"id":"ff82abbf_64d39761","line":6252,"updated":"2017-11-27 17:26:12.000000000","message":"So if we don\u0027t find a migration, we don\u0027t cleanup allocations, which is what the old code was doing - shouldn\u0027t we have an else here for the fallback? Especially because it\u0027s up to the virt driver to pass migrate_data and not all of them do:\n\nhttps://review.openstack.org/#/c/507874/","commit_id":"c44c54d32483cb5e0372ae1f239dabc627848074"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"463500e44c9db94df75a137e830e42f0fbeb0eaf","unresolved":false,"context_lines":[{"line_number":6249,"context_line":"        else:"},{"line_number":6250,"context_line":"            migration \u003d None"},{"line_number":6251,"context_line":""},{"line_number":6252,"context_line":"        if migration:"},{"line_number":6253,"context_line":"            # Remove allocations created in Placement for the dest node."},{"line_number":6254,"context_line":"            # If migration is None, we must be so old we don\u0027t have placement,"},{"line_number":6255,"context_line":"            # so no need to do something else."}],"source_content_type":"text/x-python","patch_set":25,"id":"df87a7cf_aaf3059e","line":6252,"in_reply_to":"ff82abbf_17863cba","updated":"2017-12-05 14:42:42.000000000","message":"Right, if we don\u0027t get the migration here, barring a custom broken virt driver, we must be suuuper old and not doing allocations at all. So I could do the old thing, but it\u0027ll either be broken for the super old case, or broken for the new migration-based case.\n\nMaybe just log an error?","commit_id":"c44c54d32483cb5e0372ae1f239dabc627848074"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9ec5bdf91d12c787781d05f0e4d576fdf8e73bee","unresolved":false,"context_lines":[{"line_number":6249,"context_line":"        else:"},{"line_number":6250,"context_line":"            migration \u003d None"},{"line_number":6251,"context_line":""},{"line_number":6252,"context_line":"        if migration:"},{"line_number":6253,"context_line":"            # Remove allocations created in Placement for the dest node."},{"line_number":6254,"context_line":"            # If migration is None, we must be so old we don\u0027t have placement,"},{"line_number":6255,"context_line":"            # so no need to do something else."}],"source_content_type":"text/x-python","patch_set":25,"id":"ff82abbf_9b0db9e9","line":6252,"in_reply_to":"ff82abbf_64d39761","updated":"2017-11-28 20:27:27.000000000","message":"They really have to or we\u0027re screwed here, which is why I had to patch up the fake driver. What do you want the else to do?","commit_id":"c44c54d32483cb5e0372ae1f239dabc627848074"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f4de9047d935116104204744c01134316efc257e","unresolved":false,"context_lines":[{"line_number":6249,"context_line":"        else:"},{"line_number":6250,"context_line":"            migration \u003d None"},{"line_number":6251,"context_line":""},{"line_number":6252,"context_line":"        if migration:"},{"line_number":6253,"context_line":"            # Remove allocations created in Placement for the dest node."},{"line_number":6254,"context_line":"            # If migration is None, we must be so old we don\u0027t have placement,"},{"line_number":6255,"context_line":"            # so no need to do something else."}],"source_content_type":"text/x-python","patch_set":25,"id":"ff82abbf_17863cba","line":6252,"in_reply_to":"ff82abbf_9b0db9e9","updated":"2017-11-29 19:57:06.000000000","message":"I figured the else would do the stuff that this was doing before which you removed, but that likely won\u0027t do anything because the allocation is no longer on the instance, it\u0027s on the migration.","commit_id":"c44c54d32483cb5e0372ae1f239dabc627848074"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"25e1187fdf3fb9e2258b6e2aefed9111d11a20b7","unresolved":false,"context_lines":[{"line_number":6279,"context_line":"            # so no need to do something else."},{"line_number":6280,"context_line":"            self._revert_allocation(context, instance, migration)"},{"line_number":6281,"context_line":"        else:"},{"line_number":6282,"context_line":"            LOG.error(\u0027Unable to revert allocations during live migration \u0027"},{"line_number":6283,"context_line":"                      \u0027rollback\u0027,"},{"line_number":6284,"context_line":"                      instance\u003dinstance)"},{"line_number":6285,"context_line":""},{"line_number":6286,"context_line":"        instance.task_state \u003d None"}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_5b4d1298","line":6283,"range":{"start_line":6282,"start_character":22,"end_line":6283,"end_character":32},"updated":"2017-12-08 15:47:00.000000000","message":"nit: this could probably provide a bit more detail, something about unable to find a migration record but the compute driver didn\u0027t pass migrate_data to _rollback_live_migration. That\u0027s pretty detailed, but would be more info in a bug report if needed.\n\nAlso, we need to rebase on top of this change otherwise this is always going to be the case for xen:\n\nhttps://review.openstack.org/#/c/507874/","commit_id":"5f842e9842a17df930283d7263a63703d28b8f51"}],"nova/conductor/tasks/live_migrate.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"753b4724ff715a11c5c08a0a0f6020181a30a7eb","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        self._check_instance_is_active()"},{"line_number":52,"context_line":"        self._check_host_is_up(self.source)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        if migrate.should_do_migration_allocation:"},{"line_number":55,"context_line":"            self._source_cn, self._held_allocations \u003d ("},{"line_number":56,"context_line":"                migrate.replace_allocation_with_migration(self.context,"},{"line_number":57,"context_line":"                                                          self.instance,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_3abbd70e","line":54,"updated":"2017-09-26 18:31:57.000000000","message":"this is a function taking context in migrate.py line 147","commit_id":"f60597b3f5a60580e039f9f7027cefa2a7664915"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"8f1bdeb9177621172200a8af8444d7b6d3fbd5ac","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        self._check_instance_is_active()"},{"line_number":52,"context_line":"        self._check_host_is_up(self.source)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        if migrate.should_do_migration_allocation:"},{"line_number":55,"context_line":"            self._source_cn, self._held_allocations \u003d ("},{"line_number":56,"context_line":"                migrate.replace_allocation_with_migration(self.context,"},{"line_number":57,"context_line":"                                                          self.instance,"}],"source_content_type":"text/x-python","patch_set":24,"id":"3f4b6375_3420d1f7","line":54,"updated":"2017-10-30 18:05:24.000000000","message":"Doesn\u0027t appear to be a negative test for this conditional but I don\u0027t reckon we need to care about that.","commit_id":"c1a38f00280275d3eeead5240e96783b10791a21"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d084b7e29c8f33a601ecfa551ebde9746880c1e4","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        self._check_instance_is_active()"},{"line_number":52,"context_line":"        self._check_host_is_up(self.source)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        if migrate.should_do_migration_allocation:"},{"line_number":55,"context_line":"            self._source_cn, self._held_allocations \u003d ("},{"line_number":56,"context_line":"                migrate.replace_allocation_with_migration(self.context,"},{"line_number":57,"context_line":"                                                          self.instance,"}],"source_content_type":"text/x-python","patch_set":24,"id":"ff82abbf_0949862f","line":54,"in_reply_to":"3f4b6375_3420d1f7","updated":"2017-11-27 16:52:58.000000000","message":"But, it\u0027s obviously wrong because should_do_migration_allocation is a function which takes a parameter, and that\u0027s not passed in here.","commit_id":"c1a38f00280275d3eeead5240e96783b10791a21"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"58b898f8b356ed062bad8e457ddb3106fb32ccee","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        self.servicegroup_api \u003d servicegroup_api"},{"line_number":45,"context_line":"        self.scheduler_client \u003d scheduler_client"},{"line_number":46,"context_line":"        self.request_spec \u003d request_spec"},{"line_number":47,"context_line":"        self._source_cn \u003d None"},{"line_number":48,"context_line":"        self._held_allocations \u003d None"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def _execute(self):"},{"line_number":51,"context_line":"        self._check_instance_is_active()"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff82abbf_29a80a8a","line":48,"range":{"start_line":47,"start_character":8,"end_line":48,"end_character":37},"updated":"2017-11-27 17:13:33.000000000","message":"nit: might be nice to copy the same comment from the cold migrate task for these variables:\n\n# Persist things from the happy path so we don\u0027t have to look\n# them up if we need to roll back","commit_id":"c44c54d32483cb5e0372ae1f239dabc627848074"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b4f8ecc98679384e923d7297ea7baf5e1967ff86","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        self._check_instance_is_active()"},{"line_number":52,"context_line":"        self._check_host_is_up(self.source)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        if migrate.should_do_migration_allocation:"},{"line_number":55,"context_line":"            self._source_cn, self._held_allocations \u003d ("},{"line_number":56,"context_line":"                migrate.replace_allocation_with_migration(self.context,"},{"line_number":57,"context_line":"                                                          self.instance,"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff82abbf_c9671eb7","line":54,"range":{"start_line":54,"start_character":19,"end_line":54,"end_character":49},"updated":"2017-11-27 16:54:17.000000000","message":"This is a function which takes a context so something is obviously wrong in testing this.","commit_id":"c44c54d32483cb5e0372ae1f239dabc627848074"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"de7189dbb2d6c53d2bbb2483dad5b4e41c02aae4","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        self._check_instance_is_active()"},{"line_number":52,"context_line":"        self._check_host_is_up(self.source)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        if migrate.should_do_migration_allocation:"},{"line_number":55,"context_line":"            self._source_cn, self._held_allocations \u003d ("},{"line_number":56,"context_line":"                migrate.replace_allocation_with_migration(self.context,"},{"line_number":57,"context_line":"                                                          self.instance,"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff82abbf_04cacb4c","line":54,"range":{"start_line":54,"start_character":19,"end_line":54,"end_character":49},"in_reply_to":"ff82abbf_c9671eb7","updated":"2017-11-27 17:26:12.000000000","message":"Also, see my comments in the compute code, I think we need a service version bump for the live migration case to know this is safe.","commit_id":"c44c54d32483cb5e0372ae1f239dabc627848074"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"58b898f8b356ed062bad8e457ddb3106fb32ccee","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        if migrate.should_do_migration_allocation:"},{"line_number":55,"context_line":"            self._source_cn, self._held_allocations \u003d ("},{"line_number":56,"context_line":"                migrate.replace_allocation_with_migration(self.context,"},{"line_number":57,"context_line":"                                                          self.instance,"},{"line_number":58,"context_line":"                                                          self.migration))"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"ff82abbf_c9de3ed9","line":56,"range":{"start_line":56,"start_character":24,"end_line":56,"end_character":57},"updated":"2017-11-27 17:13:33.000000000","message":"This currently raises InstanceUnacceptable which needs to be handled in the conductor task manager code:\n\nhttps://github.com/openstack/nova/blob/efce0ea78e050c3238340c9ea1fce68d651f0dd9/nova/conductor/manager.py#L419\n\nHowever, you probably want to rebase on this since we shouldn\u0027t use InstanceUnacceptable:\n\nhttps://review.openstack.org/#/c/517004/","commit_id":"c44c54d32483cb5e0372ae1f239dabc627848074"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f4de9047d935116104204744c01134316efc257e","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        if migrate.should_do_migration_allocation:"},{"line_number":55,"context_line":"            self._source_cn, self._held_allocations \u003d ("},{"line_number":56,"context_line":"                migrate.replace_allocation_with_migration(self.context,"},{"line_number":57,"context_line":"                                                          self.instance,"},{"line_number":58,"context_line":"                                                          self.migration))"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"ff82abbf_f72638ce","line":56,"range":{"start_line":56,"start_character":24,"end_line":56,"end_character":57},"in_reply_to":"ff82abbf_7b3c752e","updated":"2017-11-29 19:57:06.000000000","message":"It matters because this gets raised back up through the conductor task manager and if we\u0027re in an RPC call from the API it can go back there and leak out. That\u0027s why I had to change it for cold migrate in https://review.openstack.org/#/c/517004/ because it was coming out of the API as a 400 as if the user did something incorrect, it\u0027s really a 500 scenario.","commit_id":"c44c54d32483cb5e0372ae1f239dabc627848074"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9ec5bdf91d12c787781d05f0e4d576fdf8e73bee","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        if migrate.should_do_migration_allocation:"},{"line_number":55,"context_line":"            self._source_cn, self._held_allocations \u003d ("},{"line_number":56,"context_line":"                migrate.replace_allocation_with_migration(self.context,"},{"line_number":57,"context_line":"                                                          self.instance,"},{"line_number":58,"context_line":"                                                          self.migration))"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"ff82abbf_7b3c752e","line":56,"range":{"start_line":56,"start_character":24,"end_line":56,"end_character":57},"in_reply_to":"ff82abbf_c9de3ed9","updated":"2017-11-28 20:27:27.000000000","message":"This triggers the diaper exception handler, same as for the cold migrate one. It doesn\u0027t matter what exception it is.","commit_id":"c44c54d32483cb5e0372ae1f239dabc627848074"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"58b898f8b356ed062bad8e457ddb3106fb32ccee","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            scheduler_utils.claim_resources_on_destination("},{"line_number":84,"context_line":"                self.scheduler_client.reportclient, self.instance,"},{"line_number":85,"context_line":"                source_node, dest_node,"},{"line_number":86,"context_line":"                source_node_allocations\u003dself._held_allocations)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"            # dest_node is a ComputeNode object, so we need to get the actual"},{"line_number":89,"context_line":"            # node name off it to set in the Migration object below."}],"source_content_type":"text/x-python","patch_set":25,"id":"ff82abbf_496f8efb","line":86,"updated":"2017-11-27 17:13:33.000000000","message":"OK we have to do this otherwise claim_resources_on_destination looks up the allocations using the instance which no longer exist as they\u0027ve been swapped to the migration record, which is what _held_allocations contains.","commit_id":"c44c54d32483cb5e0372ae1f239dabc627848074"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"25e1187fdf3fb9e2258b6e2aefed9111d11a20b7","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        if should_do_migration_allocation(self.context):"},{"line_number":61,"context_line":"            self._source_cn, self._held_allocations \u003d ("},{"line_number":62,"context_line":"                migrate.replace_allocation_with_migration(self.context,"},{"line_number":63,"context_line":"                                                          self.instance,"},{"line_number":64,"context_line":"                                                          self.migration))"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_db2e0191","line":62,"range":{"start_line":62,"start_character":24,"end_line":62,"end_character":57},"updated":"2017-12-08 15:47:00.000000000","message":"Per my comment in PS25, if we don\u0027t handle the exception raised out of this here:\n\nhttps://github.com/openstack/nova/blob/efce0ea78e050c3238340c9ea1fce68d651f0dd9/nova/conductor/manager.py#L419\n\nThen it will be handled here:\n\nhttps://github.com/openstack/nova/blob/efce0ea78e050c3238340c9ea1fce68d651f0dd9/nova/conductor/manager.py#L439\n\nAnd raised back up to the API (if we\u0027re synchronous, which we are before microversion 2.34) which isn\u0027t handled:\n\nhttps://github.com/openstack/nova/blob/efce0ea78e050c3238340c9ea1fce68d651f0dd9/nova/api/openstack/compute/migrate_server.py#L99-L124\n\nSo it will result in a 500 - which is OK because that\u0027s what it is, an internal error.\n\nI just wanted to be sure we didn\u0027t have something like https://review.openstack.org/#/c/517004/ where it leaks back up to the API and gets converted to a confusing 400 response.","commit_id":"5f842e9842a17df930283d7263a63703d28b8f51"}],"nova/conductor/tasks/migrate.py":[{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"36010a60079a7302351a65063f3b9c90d8ac7d34","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        source_cn \u003d objects.ComputeNode.get_by_host_and_nodename("},{"line_number":34,"context_line":"            context, instance.host, instance.node)"},{"line_number":35,"context_line":"    except exception.ComputeHostNotFound:"},{"line_number":36,"context_line":"        LOG.error(_(\u0027Unable to find record for source \u0027"},{"line_number":37,"context_line":"                    \u0027node %(node)s on %(host)s\u0027),"},{"line_number":38,"context_line":"                  {\u0027host\u0027: instance.host, \u0027node\u0027: instance.node},"},{"line_number":39,"context_line":"                  instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5f4e5783_77c35858","line":36,"range":{"start_line":36,"start_character":18,"end_line":36,"end_character":20},"updated":"2017-10-17 05:55:34.000000000","message":"It is unnecessary.","commit_id":"c1c2fa1393f978b55cbcdbfabdcfafb3b5acb84a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f08896e83913fe683713eb8f89d77e604fe22e2e","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        source_cn \u003d objects.ComputeNode.get_by_host_and_nodename("},{"line_number":34,"context_line":"            context, instance.host, instance.node)"},{"line_number":35,"context_line":"    except exception.ComputeHostNotFound:"},{"line_number":36,"context_line":"        LOG.error(_(\u0027Unable to find record for source \u0027"},{"line_number":37,"context_line":"                    \u0027node %(node)s on %(host)s\u0027),"},{"line_number":38,"context_line":"                  {\u0027host\u0027: instance.host, \u0027node\u0027: instance.node},"},{"line_number":39,"context_line":"                  instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5f4e5783_54060c22","line":36,"range":{"start_line":36,"start_character":18,"end_line":36,"end_character":20},"in_reply_to":"5f4e5783_77c35858","updated":"2017-10-17 14:31:37.000000000","message":"Unnecessary but also not harmful. Not really worth holding this up over something like this IMHO.","commit_id":"c1c2fa1393f978b55cbcdbfabdcfafb3b5acb84a"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"36010a60079a7302351a65063f3b9c90d8ac7d34","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                                           instance.project_id,"},{"line_number":67,"context_line":"                                           instance.user_id)"},{"line_number":68,"context_line":"    if not success:"},{"line_number":69,"context_line":"        LOG.error(_(\u0027Unable to replace resource claim on source \u0027"},{"line_number":70,"context_line":"                    \u0027host %(host)s node %(node)s for instance\u0027),"},{"line_number":71,"context_line":"                  {\u0027host\u0027: instance.host,"},{"line_number":72,"context_line":"                   \u0027node\u0027: instance.node},"}],"source_content_type":"text/x-python","patch_set":17,"id":"5f4e5783_57a4dcb9","line":69,"range":{"start_line":69,"start_character":18,"end_line":69,"end_character":20},"updated":"2017-10-17 05:55:34.000000000","message":"ditto","commit_id":"c1c2fa1393f978b55cbcdbfabdcfafb3b5acb84a"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"36010a60079a7302351a65063f3b9c90d8ac7d34","unresolved":false,"context_lines":[{"line_number":103,"context_line":"                                           instance.project_id,"},{"line_number":104,"context_line":"                                           instance.user_id)"},{"line_number":105,"context_line":"    if not success:"},{"line_number":106,"context_line":"        LOG.error(_(\u0027Unable to replace resource claim on source \u0027"},{"line_number":107,"context_line":"                    \u0027host %(host)s node %(node)s for instance\u0027),"},{"line_number":108,"context_line":"                  {\u0027host\u0027: instance.host,"},{"line_number":109,"context_line":"                   \u0027node\u0027: instance.node},"}],"source_content_type":"text/x-python","patch_set":17,"id":"5f4e5783_37a720c0","line":106,"range":{"start_line":106,"start_character":18,"end_line":106,"end_character":20},"updated":"2017-10-17 05:55:34.000000000","message":"ditto","commit_id":"c1c2fa1393f978b55cbcdbfabdcfafb3b5acb84a"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"36010a60079a7302351a65063f3b9c90d8ac7d34","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                \u0027Created allocations for instance %(inst)s on %(rp)s\u0027,"},{"line_number":138,"context_line":"                {\u0027inst\u0027: instance.uuid, \u0027rp\u0027: source_cn.uuid})"},{"line_number":139,"context_line":"        else:"},{"line_number":140,"context_line":"            LOG.error(_(\u0027Unable to replace resource claim on source \u0027"},{"line_number":141,"context_line":"                    \u0027host %(host)s node %(node)s for instance\u0027),"},{"line_number":142,"context_line":"                      {\u0027host\u0027: instance.host,"},{"line_number":143,"context_line":"                       \u0027node\u0027: instance.node},"}],"source_content_type":"text/x-python","patch_set":17,"id":"5f4e5783_17aae483","line":140,"range":{"start_line":140,"start_character":22,"end_line":140,"end_character":24},"updated":"2017-10-17 05:55:34.000000000","message":"ditto","commit_id":"c1c2fa1393f978b55cbcdbfabdcfafb3b5acb84a"}],"nova/objects/service.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"92a297aa040f1d3b4870bff3a70c1ecf2ad9108c","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"# NOTE(danms): This is the global service version counter"},{"line_number":34,"context_line":"SERVICE_VERSION \u003d 24"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"# NOTE(danms): This is our SERVICE_VERSION history. The idea is that any"}],"source_content_type":"text/x-python","patch_set":27,"id":"df87a7cf_a37bab25","line":34,"range":{"start_line":34,"start_character":18,"end_line":34,"end_character":20},"updated":"2017-12-11 14:51:30.000000000","message":"25","commit_id":"06ec652a53163cee6044cb56b7a6fed97e06998e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"92a297aa040f1d3b4870bff3a70c1ecf2ad9108c","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    {\u0027compute_rpc\u0027: \u00274.18\u0027},"},{"line_number":118,"context_line":"    # Version 24: Add support for Cinder v3 attach/detach API."},{"line_number":119,"context_line":"    {\u0027compute_rpc\u0027: \u00274.18\u0027},"},{"line_number":120,"context_line":"    # Version 24: Compute hosts allow migration-based allocations"},{"line_number":121,"context_line":"    # for live migration."},{"line_number":122,"context_line":"    {\u0027compute_rpc\u0027: \u00274.18\u0027},"},{"line_number":123,"context_line":")"}],"source_content_type":"text/x-python","patch_set":27,"id":"df87a7cf_a392cb55","line":120,"range":{"start_line":120,"start_character":14,"end_line":120,"end_character":16},"updated":"2017-12-11 14:51:30.000000000","message":"25","commit_id":"06ec652a53163cee6044cb56b7a6fed97e06998e"}],"nova/scheduler/utils.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"8f1bdeb9177621172200a8af8444d7b6d3fbd5ac","unresolved":false,"context_lines":[{"line_number":243,"context_line":"                         node fails."},{"line_number":244,"context_line":"    \"\"\""},{"line_number":245,"context_line":"    # Get the current allocations for the source node and the instance."},{"line_number":246,"context_line":"    if not source_node_allocations:"},{"line_number":247,"context_line":"        source_node_allocations \u003d ("},{"line_number":248,"context_line":"            reportclient.get_allocations_for_consumer_by_provider("},{"line_number":249,"context_line":"                source_node.uuid, instance.uuid))"}],"source_content_type":"text/x-python","patch_set":24,"id":"3f4b6375_14e03596","line":246,"updated":"2017-10-30 18:05:24.000000000","message":"Is this getting tested?","commit_id":"c1a38f00280275d3eeead5240e96783b10791a21"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"58b898f8b356ed062bad8e457ddb3106fb32ccee","unresolved":false,"context_lines":[{"line_number":340,"context_line":"# some sort of skip_filters flag."},{"line_number":341,"context_line":"def claim_resources_on_destination("},{"line_number":342,"context_line":"        reportclient, instance, source_node, dest_node,"},{"line_number":343,"context_line":"        source_node_allocations\u003dNone):"},{"line_number":344,"context_line":"    \"\"\"Copies allocations from source node to dest node in Placement"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"    Normally the scheduler will allocate resources on a chosen destination"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff82abbf_c9a5de48","line":343,"range":{"start_line":343,"start_character":8,"end_line":343,"end_character":31},"updated":"2017-11-27 17:13:33.000000000","message":"nit: document the parameter in the docstring since we have the other parameters documented.","commit_id":"c44c54d32483cb5e0372ae1f239dabc627848074"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"25e1187fdf3fb9e2258b6e2aefed9111d11a20b7","unresolved":false,"context_lines":[{"line_number":6749,"context_line":"            mock_report.get_allocations_for_consumer.return_value \u003d ("},{"line_number":6750,"context_line":"                mock.sentinel.allocs)"},{"line_number":6751,"context_line":"            self._call_post_live_migration(migrate_data\u003dmd)"},{"line_number":6752,"context_line":"            # ...so we shuild have called the new style delete"},{"line_number":6753,"context_line":"            mock_delete.assert_called_once_with(self.instance,"},{"line_number":6754,"context_line":"                                                migration,"},{"line_number":6755,"context_line":"                                                self.instance.flavor,"}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_fb47454b","line":6752,"range":{"start_line":6752,"start_character":23,"end_line":6752,"end_character":29},"updated":"2017-12-08 15:47:00.000000000","message":"should","commit_id":"5f842e9842a17df930283d7263a63703d28b8f51"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"25e1187fdf3fb9e2258b6e2aefed9111d11a20b7","unresolved":false,"context_lines":[{"line_number":6776,"context_line":"            mock_report.get_allocations_for_consumer.return_value \u003d None"},{"line_number":6777,"context_line":"            self._call_post_live_migration(migrate_data\u003dmd)"},{"line_number":6778,"context_line":"            # ...so we should have called the old style delete"},{"line_number":6779,"context_line":"            self.assertFalse(mock_delete.called)"},{"line_number":6780,"context_line":"            fn \u003d mock_rt.return_value.delete_allocation_for_migrated_instance"},{"line_number":6781,"context_line":"            fn.assert_called_once_with(self.instance, self.instance.node)"},{"line_number":6782,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_5b68b1b7","line":6779,"range":{"start_line":6779,"start_character":12,"end_line":6779,"end_character":48},"updated":"2017-12-08 15:47:00.000000000","message":"Could also use mock_delete.assert_not_called() - probably a better error message if it fails.","commit_id":"5f842e9842a17df930283d7263a63703d28b8f51"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ddf5b915819dd0aaab6f390b3aaf217057d7ac64","unresolved":false,"context_lines":[{"line_number":6776,"context_line":"            mock_report.get_allocations_for_consumer.return_value \u003d None"},{"line_number":6777,"context_line":"            self._call_post_live_migration(migrate_data\u003dmd)"},{"line_number":6778,"context_line":"            # ...so we should have called the old style delete"},{"line_number":6779,"context_line":"            self.assertFalse(mock_delete.called)"},{"line_number":6780,"context_line":"            fn \u003d mock_rt.return_value.delete_allocation_for_migrated_instance"},{"line_number":6781,"context_line":"            fn.assert_called_once_with(self.instance, self.instance.node)"},{"line_number":6782,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_a395eb88","line":6779,"range":{"start_line":6779,"start_character":12,"end_line":6779,"end_character":48},"in_reply_to":"df87a7cf_5b68b1b7","updated":"2017-12-11 14:52:00.000000000","message":"TIL","commit_id":"5f842e9842a17df930283d7263a63703d28b8f51"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"25e1187fdf3fb9e2258b6e2aefed9111d11a20b7","unresolved":false,"context_lines":[{"line_number":6798,"context_line":"            ga \u003d mock_report.get_allocations_for_consumer"},{"line_number":6799,"context_line":"            self.assertFalse(ga.called)"},{"line_number":6800,"context_line":"            # ...so we should have called the old style delete"},{"line_number":6801,"context_line":"            self.assertFalse(mock_delete.called)"},{"line_number":6802,"context_line":"            fn \u003d mock_rt.return_value.delete_allocation_for_migrated_instance"},{"line_number":6803,"context_line":"            fn.assert_called_once_with(self.instance, self.instance.node)"},{"line_number":6804,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_1bb3094f","line":6801,"updated":"2017-12-08 15:47:00.000000000","message":"same","commit_id":"5f842e9842a17df930283d7263a63703d28b8f51"}],"nova/tests/unit/conductor/tasks/test_live_migrate.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"25e1187fdf3fb9e2258b6e2aefed9111d11a20b7","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            self.assertEqual(self.task.destination,"},{"line_number":109,"context_line":"                             self.migration.dest_compute)"},{"line_number":110,"context_line":"            if new_mode:"},{"line_number":111,"context_line":"                self.assertTrue(m_alloc.called)"},{"line_number":112,"context_line":"            else:"},{"line_number":113,"context_line":"                self.assertFalse(m_alloc.called)"},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_7bf015fe","line":111,"range":{"start_line":111,"start_character":16,"end_line":111,"end_character":47},"updated":"2017-12-08 15:47:00.000000000","message":"assert_called_once_with","commit_id":"5f842e9842a17df930283d7263a63703d28b8f51"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"25e1187fdf3fb9e2258b6e2aefed9111d11a20b7","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            if new_mode:"},{"line_number":111,"context_line":"                self.assertTrue(m_alloc.called)"},{"line_number":112,"context_line":"            else:"},{"line_number":113,"context_line":"                self.assertFalse(m_alloc.called)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def test_execute_with_destination_old_school(self):"},{"line_number":116,"context_line":"        self.test_execute_with_destination(new_mode\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_9bf5d9ef","line":113,"range":{"start_line":113,"start_character":16,"end_line":113,"end_character":48},"updated":"2017-12-08 15:47:00.000000000","message":"assert_not_called","commit_id":"5f842e9842a17df930283d7263a63703d28b8f51"}]}
