)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"66fe8f5a3c74dc409844bd74f9cbee8d8f132321","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"This fixes the bug by updating the instance.availability_zone"},{"line_number":21,"context_line":"value in the API (where we have access to the aggregates"},{"line_number":22,"context_line":"table in the API DB) before casting to nova-comptue to"},{"line_number":23,"context_line":"complete the revert. As noted in the comment within, this"},{"line_number":24,"context_line":"is not fail-safe in case the revert fails before the"},{"line_number":25,"context_line":"instance.host is updated in finish_revert_resize, but we"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5fc1f717_8dc4b8f6","line":22,"range":{"start_line":22,"start_character":44,"end_line":22,"end_character":51},"updated":"2019-03-13 20:23:50.000000000","message":"compute","commit_id":"ad11d7959f4da32ae8f44938008a1ee1d7b88f5c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"81b1723556a053f9c7c6f5cbb8527dda6f7d46eb","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"This fixes the bug by updating the instance.availability_zone"},{"line_number":21,"context_line":"value in the API (where we have access to the aggregates"},{"line_number":22,"context_line":"table in the API DB) before casting to nova-comptue to"},{"line_number":23,"context_line":"complete the revert. As noted in the comment within, this"},{"line_number":24,"context_line":"is not fail-safe in case the revert fails before the"},{"line_number":25,"context_line":"instance.host is updated in finish_revert_resize, but we"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5fc1f717_4d16d057","line":22,"range":{"start_line":22,"start_character":44,"end_line":22,"end_character":51},"in_reply_to":"5fc1f717_8dc4b8f6","updated":"2019-03-13 20:32:45.000000000","message":"oh hell no.","commit_id":"ad11d7959f4da32ae8f44938008a1ee1d7b88f5c"}],"nova/compute/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1c1258b1bb109aca6e7e03957c2b1a1654816d37","unresolved":false,"context_lines":[{"line_number":3467,"context_line":"        # RequestSpec to point back at the original flavor, otherwise"},{"line_number":3468,"context_line":"        # subsequent move operations through the scheduler will be using the"},{"line_number":3469,"context_line":"        # wrong flavor."},{"line_number":3470,"context_line":"        reqspec \u003d objects.RequestSpec.get_by_instance_uuid("},{"line_number":3471,"context_line":"            context, instance.uuid)"},{"line_number":3472,"context_line":"        reqspec.flavor \u003d instance.old_flavor"},{"line_number":3473,"context_line":"        reqspec.save()"},{"line_number":3474,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_0db0c889","line":3471,"range":{"start_line":3470,"start_character":8,"end_line":3471,"end_character":35},"updated":"2019-03-13 20:24:47.000000000","message":"Hmm, thinking out loud - we can avoid the AZ call above if RequestSpec.availability_zone is not None - meaning the AZ couldn\u0027t change during the resize, which saves us that call.","commit_id":"ad11d7959f4da32ae8f44938008a1ee1d7b88f5c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6ff599a66f5828aa4a5dcfd46eba7fcdaabc39cf","unresolved":false,"context_lines":[{"line_number":3467,"context_line":"        # RequestSpec to point back at the original flavor, otherwise"},{"line_number":3468,"context_line":"        # subsequent move operations through the scheduler will be using the"},{"line_number":3469,"context_line":"        # wrong flavor."},{"line_number":3470,"context_line":"        reqspec \u003d objects.RequestSpec.get_by_instance_uuid("},{"line_number":3471,"context_line":"            context, instance.uuid)"},{"line_number":3472,"context_line":"        reqspec.flavor \u003d instance.old_flavor"},{"line_number":3473,"context_line":"        reqspec.save()"},{"line_number":3474,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_60295388","line":3471,"range":{"start_line":3470,"start_character":8,"end_line":3471,"end_character":35},"in_reply_to":"5fc1f717_0db0c889","updated":"2019-03-13 20:35:57.000000000","message":"Yeah, but if either host changes AZ in the middle, you could make the wrong decision. We recently merged a change to prevent re-AZ-ing hosts with instances, so that means the target can\u0027t change through the API, but the source could, if it was empty. Since resize is controlled by the user, and could potentially remain unconfirmed for a long period of time, it\u0027s not impossible that we\u0027d do the wrong thing here.\n\nDoesn\u0027t seem like a huge optimization to me, and the resulting bug is way more obscure.","commit_id":"ad11d7959f4da32ae8f44938008a1ee1d7b88f5c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cb5e2c027963e88942f4d940cb8e9dd1911f0e9d","unresolved":false,"context_lines":[{"line_number":3467,"context_line":"        # RequestSpec to point back at the original flavor, otherwise"},{"line_number":3468,"context_line":"        # subsequent move operations through the scheduler will be using the"},{"line_number":3469,"context_line":"        # wrong flavor."},{"line_number":3470,"context_line":"        reqspec \u003d objects.RequestSpec.get_by_instance_uuid("},{"line_number":3471,"context_line":"            context, instance.uuid)"},{"line_number":3472,"context_line":"        reqspec.flavor \u003d instance.old_flavor"},{"line_number":3473,"context_line":"        reqspec.save()"},{"line_number":3474,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_e041c33a","line":3471,"range":{"start_line":3470,"start_character":8,"end_line":3471,"end_character":35},"in_reply_to":"5fc1f717_60295388","updated":"2019-03-13 20:37:42.000000000","message":"Thinking about that more, if the logic is:\n\nif reqspec.availability_zone is None:\n    update instance.availability_zone\n\nThen that should work either way because if the server was created in an explicit AZ, it has to migrate within the AZ meaning the AZ has an instance in it and the admin can\u0027t rename the AZ. If the server was created without an explicit AZ, reqspec.availability_zone is None will evaluate to True and we\u0027ll update anyway.","commit_id":"ad11d7959f4da32ae8f44938008a1ee1d7b88f5c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ee727a950d605871f1d7244538e09011df73a2e0","unresolved":false,"context_lines":[{"line_number":3467,"context_line":"        # RequestSpec to point back at the original flavor, otherwise"},{"line_number":3468,"context_line":"        # subsequent move operations through the scheduler will be using the"},{"line_number":3469,"context_line":"        # wrong flavor."},{"line_number":3470,"context_line":"        reqspec \u003d objects.RequestSpec.get_by_instance_uuid("},{"line_number":3471,"context_line":"            context, instance.uuid)"},{"line_number":3472,"context_line":"        reqspec.flavor \u003d instance.old_flavor"},{"line_number":3473,"context_line":"        reqspec.save()"},{"line_number":3474,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_e06a23b1","line":3471,"range":{"start_line":3470,"start_character":8,"end_line":3471,"end_character":35},"in_reply_to":"5fc1f717_e041c33a","updated":"2019-03-13 20:39:01.000000000","message":"(3:36:13 PM) dansmith: yeah, but what about my CONF-based attack?\n(3:36:41 PM) dansmith: two hosts, both in default_availability_zone\u003dfoo, then I can change that conf to \u003dbar on one and restart it and you\u0027ll do the wrong thing\n(3:36:52 PM) dansmith: (and instance.az will be wrong)\n(3:38:30 PM) mriedem: yeah i suppose\n\nI yield under the weight of the AZ craziness.","commit_id":"ad11d7959f4da32ae8f44938008a1ee1d7b88f5c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8f61843ed2c1cb7d63eb3e54ad295fcb7d3318a2","unresolved":false,"context_lines":[{"line_number":3495,"context_line":"        # fails during revert before the instance.host is updated to the"},{"line_number":3496,"context_line":"        # original source host, but it is good enough for now. Long-term we"},{"line_number":3497,"context_line":"        # could consider passing the AZ down to compute so it can set it when"},{"line_number":3498,"context_line":"        # the instance.host value is set in finish_revert_resize."},{"line_number":3499,"context_line":"        instance.availability_zone \u003d ("},{"line_number":3500,"context_line":"            availability_zones.get_host_availability_zone("},{"line_number":3501,"context_line":"                context, migration.source_compute))"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_f7964b3e","line":3498,"updated":"2019-03-27 09:36:51.000000000","message":"Aren\u0027t AZs mapped to placement aggregates at this point? So we could query placement - from wherever, whenever - to get the proper value?","commit_id":"40f6672f53794b563f4c7e27ede7b59a1d63c14a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c8cc543d325743638a7b45f295b31a232d7e54a9","unresolved":false,"context_lines":[{"line_number":3495,"context_line":"        # fails during revert before the instance.host is updated to the"},{"line_number":3496,"context_line":"        # original source host, but it is good enough for now. Long-term we"},{"line_number":3497,"context_line":"        # could consider passing the AZ down to compute so it can set it when"},{"line_number":3498,"context_line":"        # the instance.host value is set in finish_revert_resize."},{"line_number":3499,"context_line":"        instance.availability_zone \u003d ("},{"line_number":3500,"context_line":"            availability_zones.get_host_availability_zone("},{"line_number":3501,"context_line":"                context, migration.source_compute))"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_7b354644","line":3498,"in_reply_to":"5fc1f717_054dc139","updated":"2019-03-28 14:55:52.000000000","message":"Knowing the (hopefully very short) list of aggregates to which the compute belongs, couldn\u0027t we ask if any of them correspond to an AZ? Assuming a host can\u0027t be in more than one AZ at once, as soon as we find a match, we know that\u0027s the one.\n\nStill requires being able to get at the list of AZs somehow, which I guess is the thing we can\u0027t do from the other side without an up-call?\n\n...but why doesn\u0027t a host know its own AZ? Seems like that\u0027s something we could/should push to it whenever it gets set.","commit_id":"40f6672f53794b563f4c7e27ede7b59a1d63c14a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e13ce766b3658e1804e034548a24b2795408fdb4","unresolved":false,"context_lines":[{"line_number":3495,"context_line":"        # fails during revert before the instance.host is updated to the"},{"line_number":3496,"context_line":"        # original source host, but it is good enough for now. Long-term we"},{"line_number":3497,"context_line":"        # could consider passing the AZ down to compute so it can set it when"},{"line_number":3498,"context_line":"        # the instance.host value is set in finish_revert_resize."},{"line_number":3499,"context_line":"        instance.availability_zone \u003d ("},{"line_number":3500,"context_line":"            availability_zones.get_host_availability_zone("},{"line_number":3501,"context_line":"                context, migration.source_compute))"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_054dc139","line":3498,"in_reply_to":"5fc1f717_f7964b3e","updated":"2019-03-28 13:38:37.000000000","message":"As you know placement doesn\u0027t have any metadata on its aggregates so just asking placement if a compute node resource provider is in an aggregate won\u0027t tell us what AZ that is.","commit_id":"40f6672f53794b563f4c7e27ede7b59a1d63c14a"}],"nova/tests/unit/compute/test_compute_api.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8f61843ed2c1cb7d63eb3e54ad295fcb7d3318a2","unresolved":false,"context_lines":[{"line_number":1847,"context_line":"        self._test_confirm_resize(mig_ref_passed\u003dTrue)"},{"line_number":1848,"context_line":""},{"line_number":1849,"context_line":"    @mock.patch(\u0027nova.availability_zones.get_host_availability_zone\u0027,"},{"line_number":1850,"context_line":"                return_value\u003d\u0027nova\u0027)"},{"line_number":1851,"context_line":"    @mock.patch(\u0027nova.objects.Quotas.check_deltas\u0027)"},{"line_number":1852,"context_line":"    @mock.patch(\u0027nova.objects.Migration.get_by_instance_and_status\u0027)"},{"line_number":1853,"context_line":"    @mock.patch(\u0027nova.context.RequestContext.elevated\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_f7af2b7a","line":1850,"range":{"start_line":1850,"start_character":16,"end_line":1850,"end_character":35},"updated":"2019-03-27 09:36:51.000000000","message":"My usual comment: since the mock is unused, this could be\n\n new\u003dmock.Mock(return_value\u003d\u0027nova\u0027)\n\nand get rid of the generated param.","commit_id":"40f6672f53794b563f4c7e27ede7b59a1d63c14a"}]}
