)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"92baa4beeb790b6a9f1bc2cb64d2eec927d4a88a","unresolved":false,"context_lines":[{"line_number":10,"context_line":"instance\u0027s original allocation twice from placement."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"The _revert_allocation() helper returned True if the instance had a"},{"line_number":13,"context_line":"migration allocation that is reverted. But non of the callers of this"},{"line_number":14,"context_line":"helper used the return value. So this patch changes the signature so"},{"line_number":15,"context_line":"the helper now returns the original allocation which is the instance"},{"line_number":16,"context_line":"allocation _after_ the the revert succeeded. This way the provider"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"5faad753_a823e104","line":13,"range":{"start_line":13,"start_character":43,"end_line":13,"end_character":46},"updated":"2019-09-11 20:15:18.000000000","message":"none","commit_id":"1dc7b2b94524066f54f4dd27c2214ed705a49d76"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"25f0992b5a2762aeaaf02f45b780acb659f221bc","unresolved":false,"context_lines":[{"line_number":10,"context_line":"instance\u0027s original allocation twice from placement."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"The _revert_allocation() helper returned True if the instance had a"},{"line_number":13,"context_line":"migration allocation that is reverted. But non of the callers of this"},{"line_number":14,"context_line":"helper used the return value. So this patch changes the signature so"},{"line_number":15,"context_line":"the helper now returns the original allocation which is the instance"},{"line_number":16,"context_line":"allocation _after_ the the revert succeeded. This way the provider"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"5faad753_7b0cc740","line":13,"range":{"start_line":13,"start_character":43,"end_line":13,"end_character":46},"in_reply_to":"5faad753_a823e104","updated":"2019-09-12 11:47:11.000000000","message":"Done","commit_id":"1dc7b2b94524066f54f4dd27c2214ed705a49d76"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"92baa4beeb790b6a9f1bc2cb64d2eec927d4a88a","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"The _revert_allocation() helper returned True if the instance had a"},{"line_number":13,"context_line":"migration allocation that is reverted. But non of the callers of this"},{"line_number":14,"context_line":"helper used the return value. So this patch changes the signature so"},{"line_number":15,"context_line":"the helper now returns the original allocation which is the instance"},{"line_number":16,"context_line":"allocation _after_ the the revert succeeded. This way the provider"},{"line_number":17,"context_line":"mapping calculation can reuse the allocation information."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"5faad753_287db1e6","line":14,"range":{"start_line":14,"start_character":7,"end_line":14,"end_character":29},"updated":"2019-09-11 20:15:18.000000000","message":"We used to:\n\nhttps://github.com/openstack/nova/blob/stable/rocky/nova/compute/manager.py#L4403\n\nBut that code was removed in Stein when we dropped compat support for not using migration-based allocations.\n\nJust FYI.","commit_id":"1dc7b2b94524066f54f4dd27c2214ed705a49d76"}],"nova/compute/manager.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"fe935b68955225984db54cba18dac5767895ad52","unresolved":false,"context_lines":[{"line_number":4303,"context_line":"                # port mapping as we have to have the neutron ports allocate"},{"line_number":4304,"context_line":"                # from the source compute after revert."},{"line_number":4305,"context_line":"                allocs \u003d self.reportclient.get_allocations_for_consumer("},{"line_number":4306,"context_line":"                    context, instance.uuid)"},{"line_number":4307,"context_line":"                scheduler_utils.fill_provider_mapping_based_on_allocation("},{"line_number":4308,"context_line":"                    context, self.reportclient, request_spec, allocs)"},{"line_number":4309,"context_line":"                provider_mappings \u003d self._get_request_group_mapping("}],"source_content_type":"text/x-python","patch_set":13,"id":"5faad753_0f2a648f","side":"PARENT","line":4306,"updated":"2019-09-10 13:16:54.000000000","message":"YAY","commit_id":"ce75e3cc75bf066398b7c90376f5bdf33233a11d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"966b90e2807683509063f8fcc114a1a6ae0eb161","unresolved":false,"context_lines":[{"line_number":4297,"context_line":"                raise"},{"line_number":4298,"context_line":""},{"line_number":4299,"context_line":"            if request_spec:"},{"line_number":4300,"context_line":"                # TODO(gibi): the _revert_allocation() call above already"},{"line_number":4301,"context_line":"                # fetched the original allocation of the instance so we could"},{"line_number":4302,"context_line":"                # avoid this second call to placement"},{"line_number":4303,"context_line":"                # NOTE(gibi): We need to re-calculate the resource provider -"},{"line_number":4304,"context_line":"                # port mapping as we have to have the neutron ports allocate"},{"line_number":4305,"context_line":"                # from the source compute after revert."}],"source_content_type":"text/x-python","patch_set":13,"id":"5faad753_9e768306","line":4302,"range":{"start_line":4300,"start_character":1,"end_line":4302,"end_character":53},"updated":"2019-09-10 15:52:11.000000000","message":"I need to remove the TODO as it is solved now.","commit_id":"addd637d86a4c19692ec7200b01ad9731d799c55"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4800214dcac3ad57ad9df78a98be4c318b880bf6","unresolved":false,"context_lines":[{"line_number":4297,"context_line":"                raise"},{"line_number":4298,"context_line":""},{"line_number":4299,"context_line":"            if request_spec:"},{"line_number":4300,"context_line":"                # TODO(gibi): the _revert_allocation() call above already"},{"line_number":4301,"context_line":"                # fetched the original allocation of the instance so we could"},{"line_number":4302,"context_line":"                # avoid this second call to placement"},{"line_number":4303,"context_line":"                # NOTE(gibi): We need to re-calculate the resource provider -"},{"line_number":4304,"context_line":"                # port mapping as we have to have the neutron ports allocate"},{"line_number":4305,"context_line":"                # from the source compute after revert."}],"source_content_type":"text/x-python","patch_set":13,"id":"5faad753_d4204eb3","line":4302,"range":{"start_line":4300,"start_character":1,"end_line":4302,"end_character":53},"in_reply_to":"5faad753_9e768306","updated":"2019-09-11 08:53:03.000000000","message":"Done","commit_id":"addd637d86a4c19692ec7200b01ad9731d799c55"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"92baa4beeb790b6a9f1bc2cb64d2eec927d4a88a","unresolved":false,"context_lines":[{"line_number":4284,"context_line":"            instance.save()"},{"line_number":4285,"context_line":""},{"line_number":4286,"context_line":"            try:"},{"line_number":4287,"context_line":"                orig_allocs \u003d self._revert_allocation("},{"line_number":4288,"context_line":"                    context, instance, migration)"},{"line_number":4289,"context_line":"            except exception.AllocationMoveFailed:"},{"line_number":4290,"context_line":"                LOG.error(\u0027Reverting allocation in placement for migration \u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"5faad753_e8ed598b","line":4287,"range":{"start_line":4287,"start_character":16,"end_line":4287,"end_character":27},"updated":"2019-09-11 20:15:18.000000000","message":"nit: I\u0027d maybe call this just \"allocations\" or \"source_allocations\" or \"instance_allocs\" or something since \"orig_allocs\" is a bit tightly coupled and out of context for what we use this variable for.","commit_id":"1dc7b2b94524066f54f4dd27c2214ed705a49d76"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"25f0992b5a2762aeaaf02f45b780acb659f221bc","unresolved":false,"context_lines":[{"line_number":4284,"context_line":"            instance.save()"},{"line_number":4285,"context_line":""},{"line_number":4286,"context_line":"            try:"},{"line_number":4287,"context_line":"                orig_allocs \u003d self._revert_allocation("},{"line_number":4288,"context_line":"                    context, instance, migration)"},{"line_number":4289,"context_line":"            except exception.AllocationMoveFailed:"},{"line_number":4290,"context_line":"                LOG.error(\u0027Reverting allocation in placement for migration \u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"5faad753_fb3d178f","line":4287,"range":{"start_line":4287,"start_character":16,"end_line":4287,"end_character":27},"in_reply_to":"5faad753_e8ed598b","updated":"2019-09-12 11:47:11.000000000","message":"Done","commit_id":"1dc7b2b94524066f54f4dd27c2214ed705a49d76"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"92baa4beeb790b6a9f1bc2cb64d2eec927d4a88a","unresolved":false,"context_lines":[{"line_number":4367,"context_line":""},{"line_number":4368,"context_line":"        # Fetch the original allocation that the instance had on the source"},{"line_number":4369,"context_line":"        # node, which are now held by the migration"},{"line_number":4370,"context_line":"        orig_alloc \u003d self.reportclient.get_allocations_for_consumer("},{"line_number":4371,"context_line":"            context, migration.uuid)"},{"line_number":4372,"context_line":"        if not orig_alloc:"},{"line_number":4373,"context_line":"            LOG.error(\u0027Did not find resource allocations for migration \u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"5faad753_a8d681c2","line":4370,"updated":"2019-09-11 20:15:18.000000000","message":"OK and there is nothing consumer specific about this since it\u0027s just the \"allocations\" dict from the response which is the dict, keyed by resource provider uuid, of resource allocations.","commit_id":"1dc7b2b94524066f54f4dd27c2214ed705a49d76"}],"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":"92baa4beeb790b6a9f1bc2cb64d2eec927d4a88a","unresolved":false,"context_lines":[{"line_number":7591,"context_line":"                \u0027_finish_revert_resize_network_migrate_finish\u0027)"},{"line_number":7592,"context_line":"    @mock.patch(\u0027nova.scheduler.utils.\u0027"},{"line_number":7593,"context_line":"                \u0027fill_provider_mapping_based_on_allocation\u0027)"},{"line_number":7594,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":7595,"context_line":"                \u0027get_allocations_for_consumer\u0027)"},{"line_number":7596,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager._revert_allocation\u0027)"},{"line_number":7597,"context_line":"    @mock.patch.object(objects.Instance, \u0027save\u0027)"},{"line_number":7598,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager.\u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"5faad753_48feed37","line":7595,"range":{"start_line":7594,"start_character":4,"end_line":7595,"end_character":47},"updated":"2019-09-11 20:15:18.000000000","message":"We can remove this mock right?","commit_id":"1dc7b2b94524066f54f4dd27c2214ed705a49d76"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"25f0992b5a2762aeaaf02f45b780acb659f221bc","unresolved":false,"context_lines":[{"line_number":7591,"context_line":"                \u0027_finish_revert_resize_network_migrate_finish\u0027)"},{"line_number":7592,"context_line":"    @mock.patch(\u0027nova.scheduler.utils.\u0027"},{"line_number":7593,"context_line":"                \u0027fill_provider_mapping_based_on_allocation\u0027)"},{"line_number":7594,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":7595,"context_line":"                \u0027get_allocations_for_consumer\u0027)"},{"line_number":7596,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager._revert_allocation\u0027)"},{"line_number":7597,"context_line":"    @mock.patch.object(objects.Instance, \u0027save\u0027)"},{"line_number":7598,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager.\u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"5faad753_9b5743cb","line":7595,"range":{"start_line":7594,"start_character":4,"end_line":7595,"end_character":47},"in_reply_to":"5faad753_48feed37","updated":"2019-09-12 11:47:11.000000000","message":"Done","commit_id":"1dc7b2b94524066f54f4dd27c2214ed705a49d76"}]}
