)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4b1a53f17dbc57474eaa9d86694eb1d222cf8f93","unresolved":false,"context_lines":[{"line_number":43,"context_line":"the NUMATopologyFilter to get the resource limits for the claim"},{"line_number":44,"context_line":"in the compute service (since NUMA is not yet tracked in placement)."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"A possible alternative to this is prior to swapping allocations"},{"line_number":47,"context_line":"in conductor, call the scheduler and force the instance.host but"},{"line_number":48,"context_line":"pass a hint to modify the logic in _move_operation_alloc_request()"},{"line_number":49,"context_line":"to calculate the max allocation rather than the sum. This would"},{"line_number":50,"context_line":"give us the GET /allocation_candidates and filtering as normal but"},{"line_number":51,"context_line":"avoid the summation problem. If that results in a NoValidHost, we"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5fc1f717_abd51cb9","line":48,"range":{"start_line":46,"start_character":0,"end_line":48,"end_character":66},"updated":"2019-03-22 22:53:24.000000000","message":"I tried this here https://review.openstack.org/#/c/645954/ - we don\u0027t even get to _move_operation_alloc_request because GET /allocation_candidates doesn\u0027t return any candidates, because the provider has DISK_GB\u003d1028, the instance old flavor is consuming DISK_GB\u003d1028 so there is no spare capacity on the only provider in the scenario.","commit_id":"8e344cceb0bfe63b40057712d31fbb3fcad8d292"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"171870e0d2b013bc9b92960b12b7df557fdcb62b","unresolved":false,"context_lines":[{"line_number":46,"context_line":"A possible alternative to this is prior to swapping allocations"},{"line_number":47,"context_line":"in conductor, call the scheduler and force the instance.host but"},{"line_number":48,"context_line":"pass a hint to modify the logic in _move_operation_alloc_request()"},{"line_number":49,"context_line":"to calculate the max allocation rather than the sum. This would"},{"line_number":50,"context_line":"give us the GET /allocation_candidates and filtering as normal but"},{"line_number":51,"context_line":"avoid the summation problem. If that results in a NoValidHost, we"},{"line_number":52,"context_line":"would schedule as normal from conductor."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fdfeff1_bb4faebc","line":49,"range":{"start_line":49,"start_character":32,"end_line":49,"end_character":52},"updated":"2019-02-22 23:45:40.000000000","message":"Well, with https://review.openstack.org/#/c/638700/ the summation is gone. But the idea is change how this works in the scheduler if we pass a hint.","commit_id":"8e344cceb0bfe63b40057712d31fbb3fcad8d292"}],"nova/conductor/tasks/migrate.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e8ebee6e9348f5fe2df0ba733e6b05c44ff54bdb","unresolved":false,"context_lines":[{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        # If we are not rescheduling and the instance.host is not being ignored"},{"line_number":216,"context_line":"        # then we can try to resize to the same host."},{"line_number":217,"context_line":"        return True"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    def _get_compute_node_for_instance(self):"},{"line_number":220,"context_line":"        \"\"\"Returns the ComputeNode on which the instance is running"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_9b750acf","line":217,"updated":"2019-02-23 00:05:31.000000000","message":"Did you also intend to add checks for nested \u0026 sharing providers?","commit_id":"8e344cceb0bfe63b40057712d31fbb3fcad8d292"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7961e7e885493edbef9b0d55775ec7ecddff9391","unresolved":false,"context_lines":[{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        # If we are not rescheduling and the instance.host is not being ignored"},{"line_number":216,"context_line":"        # then we can try to resize to the same host."},{"line_number":217,"context_line":"        return True"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    def _get_compute_node_for_instance(self):"},{"line_number":220,"context_line":"        \"\"\"Returns the ComputeNode on which the instance is running"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_5e28eb95","line":217,"in_reply_to":"9fdfeff1_9b750acf","updated":"2019-02-23 20:03:49.000000000","message":"I\u0027d have to dig into how to figure that out, but assume it just means having allocations on more than the compute node resource provider.","commit_id":"8e344cceb0bfe63b40057712d31fbb3fcad8d292"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e8ebee6e9348f5fe2df0ba733e6b05c44ff54bdb","unresolved":false,"context_lines":[{"line_number":246,"context_line":"            self.context, self.instance.uuid)"},{"line_number":247,"context_line":"        # Save the consumer generation for PUTing the allocations."},{"line_number":248,"context_line":"        consumer_generation \u003d current_allocs[\u0027consumer_generation\u0027]"},{"line_number":249,"context_line":"        # TODO(mriedem): Obviously this is not supporting nested resource"},{"line_number":250,"context_line":"        # providers or sharing providers. Maybe we should make those part of"},{"line_number":251,"context_line":"        # the check in _can_try_same_host_resize, i.e. if you have exotic"},{"line_number":252,"context_line":"        # allocations then you need to go through the scheduler."},{"line_number":253,"context_line":"        current_allocs \u003d current_allocs["},{"line_number":254,"context_line":"            \u0027allocations\u0027][compute_node_rp_uuid][\u0027resources\u0027]"},{"line_number":255,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_7b53863a","line":252,"range":{"start_line":249,"start_character":0,"end_line":252,"end_character":64},"updated":"2019-02-23 00:05:31.000000000","message":"yeah, this","commit_id":"8e344cceb0bfe63b40057712d31fbb3fcad8d292"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"85fca00b20d8c6c7659ce224e68b13a7ba1ffa6d","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        # Get the allocations for the incoming flavor (new_flavor)."},{"line_number":257,"context_line":"        # TODO(mriedem): Should scheduler_utils.resources_from_request_spec be"},{"line_number":258,"context_line":"        # used here instead so we can check for things like traits? Maybe we"},{"line_number":259,"context_line":"        # need to be checking GET /allocation_candidates instead of"},{"line_number":260,"context_line":"        # PUT /allocations/{consumer_id}."},{"line_number":261,"context_line":"        new_allocs \u003d scheduler_utils.resources_from_flavor("},{"line_number":262,"context_line":"            self.instance, self.flavor)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_8bf94081","line":259,"updated":"2019-03-22 22:42:05.000000000","message":"I just re-wrote all this code to run through the scheduler, and the first thing that blows up is GET /allocation_candidates with no results because it thinks we\u0027re trying to find a spare capacity for the new request, long before we ever get to claim_resources which does the PUT /allocations...so yeah we\u0027re kind of in a bind here, tons of chicken and egg code.\n\n1. We have to hit the scheduler before swapping the allocations to the migration so we don\u0027t double up.\n\n2. But we still want to claim resources with the max amount between the old/new flavor.\n\n3. And we want to run through the scheduler filters, but also need to filter providers based on things like required/forbidden traits, which is what GET /allocation_candidates is for.\n\nSo far in this hacky change, I\u0027ve done #1 and #2, and I was working on an alternative for #3 but hit the GET /a_c issue.\n\nSo we could maybe:\n\n1. Verify required and forbidden traits on the provider by hitting GET /resource_providers?in_tree\u003d\u003csource node uuid\u003e\u0026required\u003d\u003ctraits from new flavor\u003e from conductor\n\n2. Then do the PUT /allocations on the max\u0027ed resources like in this change.\n\n3. Then run through select_destinations but with a scheduler hint that will bypass GET /a_c like in the rebuild case:\n\nhttps://github.com/openstack/nova/blob/fef4696e005b12c2316e652d17d2310d573dd0e7/nova/scheduler/manager.py#L128\n\nWhich will enable us to run through the scheduler filters, but not attempt to claim any resources in placement:\n\nhttps://github.com/openstack/nova/blob/fef4696e005b12c2316e652d17d2310d573dd0e7/nova/scheduler/filter_scheduler.py#L185\n\nThat is duplicating a lot of scheduler logic here in conductor which is nasty and potentially misses any cases we need for GET /a_c like shared or nested providers.","commit_id":"8e344cceb0bfe63b40057712d31fbb3fcad8d292"}]}
