)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2762244fa115c8138f8ad2e6c78fcd59dc8252a3","unresolved":false,"context_lines":[{"line_number":10,"context_line":"But instance_type is not passed to drop_move_claim."},{"line_number":11,"context_line":"So as a result, when revert_resize drop_move_claim will not"},{"line_number":12,"context_line":"update resource usage at all."},{"line_number":13,"context_line":"This problem is similar to bug#1818914"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I80f5d382f467c464b6fcdf89ebbb13d7b245088e"},{"line_number":16,"context_line":"Related-Bug: #1641750"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_7be8eb7a","line":13,"range":{"start_line":13,"start_character":27,"end_line":13,"end_character":38},"updated":"2019-06-13 22:27:41.000000000","message":"nit: put a space in here and it\u0027ll turn into a link in gerrit","commit_id":"5a07440a4a4f9db80234c67db66c61d3f6f7d157"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"33123a14a1017de8fa97a132cb43f5a537358e9a","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When revert_resize self.rt.drop_move_claim is called."},{"line_number":10,"context_line":"But instance_type is not passed to drop_move_claim."},{"line_number":11,"context_line":"So as a result, when revert_resize drop_move_claim will not"},{"line_number":12,"context_line":"update resource usage at all."},{"line_number":13,"context_line":"This problem is similar to bug#1818914"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_fe048580","line":11,"updated":"2019-07-23 18:28:29.000000000","message":"I would like more explanation in this commit message about the problem since you really have to understand the connection between the flow and the RT code to follow this (like I did below). I think the scenario is something like this:\n\nt0: resize the instance from node1 to node2, node2 will be reporting new_flavor usage and the instance uuid is in node2 tracked_migrations\n\nt1: resize finishes and the instance.host points at node2\n\nt2: the update_available_resource periodic task runs on node2 which adds the instance to tracked_instances and clears it from tracked_migrations\n\nt3: the user reverts the resize; the dest host drops the resource claim with the new_flavor but because the instance isn\u0027t in tracked_migrations and the instance_type isn\u0027t passed to drop_move_claim, the new_flavor usage isn\u0027t removed from node2 until the update_available_resource task runs on node2\n\nIf ^ is correct, that could also be the basis of a functional test to recreate the issue and confirm it is fixed with this patch.","commit_id":"bd92b9064521ece5b160eca6ec5b047247e6a2e0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3c9aa275441296cecdf51fb4e135945d10a0dc57","unresolved":false,"context_lines":[{"line_number":10,"context_line":"But instance_type is not passed to drop_move_claim."},{"line_number":11,"context_line":"So as a result, when revert_resize drop_move_claim will not"},{"line_number":12,"context_line":"update resource usage at all."},{"line_number":13,"context_line":"This problem is similar to bug#1818914"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I80f5d382f467c464b6fcdf89ebbb13d7b245088e"},{"line_number":16,"context_line":"Related-Bug: #1641750"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_1e8e412e","line":13,"range":{"start_line":13,"start_character":27,"end_line":13,"end_character":38},"updated":"2019-07-23 18:21:22.000000000","message":"So I guess you\u0027re familiar with Ia6d8a7909081b0b856bd7e290e234af7e42a2b38 and the functional test I wrote for that scenario? It would be nice if we had a functional test like that for this case as well since this is a lot of tightly coupled code and it can be hard to trace through, especially since it can race with whenever the update_available_resource periodic task runs (as noted in the code links below). Though I know writing a functional test to recreate this might not be very easy.","commit_id":"bd92b9064521ece5b160eca6ec5b047247e6a2e0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3c9aa275441296cecdf51fb4e135945d10a0dc57","unresolved":false,"context_lines":[{"line_number":11,"context_line":"So as a result, when revert_resize drop_move_claim will not"},{"line_number":12,"context_line":"update resource usage at all."},{"line_number":13,"context_line":"This problem is similar to bug#1818914"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I80f5d382f467c464b6fcdf89ebbb13d7b245088e"},{"line_number":16,"context_line":"Related-Bug: #1641750"},{"line_number":17,"context_line":"Related-Bug: #1498126"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_9e90f150","line":14,"updated":"2019-07-23 18:21:22.000000000","message":"OK you\u0027re asserting that the instance uuid is not in tracked_migrations in the dest host resource tracker here:\n\nhttps://github.com/openstack/nova/blob/383a4cf3710b5da2fe0b580bc25783ec8fefed48/nova/compute/resource_tracker.py#L463\n\nso we don\u0027t automatically pull the new_flavor off the instance in that code if instance_type isn\u0027t provided, so we get here:\n\nhttps://github.com/openstack/nova/blob/383a4cf3710b5da2fe0b580bc25783ec8fefed48/nova/compute/resource_tracker.py#L475\n\nAnd don\u0027t update resource usage.\n\nSo why wouldn\u0027t the instance.uuid be in tracked_migrations on the dest host when reverting the resize?\n\nWhen updating available resources in the RT, we get all instances on the host (the dest host in this case):\n\nhttps://github.com/openstack/nova/blob/383a4cf3710b5da2fe0b580bc25783ec8fefed48/nova/compute/resource_tracker.py#L768\n\nand we should be tracking it here:\n\nhttps://github.com/openstack/nova/blob/383a4cf3710b5da2fe0b580bc25783ec8fefed48/nova/compute/resource_tracker.py#L1272\n\nnow while the migration status is \u0027finished\u0027 it should still be returned here:\n\nhttps://github.com/openstack/nova/blob/383a4cf3710b5da2fe0b580bc25783ec8fefed48/nova/compute/resource_tracker.py#L779\n\nand I don\u0027t think we\u0027d get here:\n\nhttps://github.com/openstack/nova/blob/383a4cf3710b5da2fe0b580bc25783ec8fefed48/nova/compute/resource_tracker.py#L1196\n\nbecause this should be false (it\u0027s an incoming migration to the dest host but the instance is already tracked):\n\nhttps://github.com/openstack/nova/blob/383a4cf3710b5da2fe0b580bc25783ec8fefed48/nova/compute/resource_tracker.py#L1164\n\nIs that your understanding of the issue as well?","commit_id":"bd92b9064521ece5b160eca6ec5b047247e6a2e0"}],"nova/compute/manager.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"02d14374564730ef29955d06c6d7cd33e977d941","unresolved":false,"context_lines":[{"line_number":4158,"context_line":"            instance.revert_migration_context()"},{"line_number":4159,"context_line":"            instance.save()"},{"line_number":4160,"context_line":""},{"line_number":4161,"context_line":"            self.rt.drop_move_claim(context, instance, instance.node"},{"line_number":4162,"context_line":"                                    instance.new_flavor)"},{"line_number":4163,"context_line":""},{"line_number":4164,"context_line":"            # RPC cast back to the source host to finish the revert there."}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_d5cb6a6f","line":4161,"updated":"2019-07-10 13:26:17.000000000","message":"Let\u0027s get a comma in here so the syntax is valid. If all the tests go green at that point, I\u0027ll dig in further to try and understand what\u0027s going on.","commit_id":"5a07440a4a4f9db80234c67db66c61d3f6f7d157"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2762244fa115c8138f8ad2e6c78fcd59dc8252a3","unresolved":false,"context_lines":[{"line_number":4159,"context_line":"            instance.save()"},{"line_number":4160,"context_line":""},{"line_number":4161,"context_line":"            self.rt.drop_move_claim(context, instance, instance.node"},{"line_number":4162,"context_line":"                                    instance.new_flavor)"},{"line_number":4163,"context_line":""},{"line_number":4164,"context_line":"            # RPC cast back to the source host to finish the revert there."},{"line_number":4165,"context_line":"            self.compute_rpcapi.finish_revert_resize(context, instance,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_5e715575","line":4162,"updated":"2019-06-13 22:27:41.000000000","message":"I know you\u0027re copying the other call, but prefer naming kwargs.","commit_id":"5a07440a4a4f9db80234c67db66c61d3f6f7d157"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"33123a14a1017de8fa97a132cb43f5a537358e9a","unresolved":false,"context_lines":[{"line_number":4159,"context_line":"            instance.save()"},{"line_number":4160,"context_line":""},{"line_number":4161,"context_line":"            self.rt.drop_move_claim(context, instance, instance.node,"},{"line_number":4162,"context_line":"                                    instance.new_flavor)"},{"line_number":4163,"context_line":""},{"line_number":4164,"context_line":"            # RPC cast back to the source host to finish the revert there."},{"line_number":4165,"context_line":"            self.compute_rpcapi.finish_revert_resize(context, instance,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_7ea17595","line":4162,"updated":"2019-07-23 18:28:29.000000000","message":"nit: use a named kwarg here: instance_type\u003dinstance.new_flavor","commit_id":"bd92b9064521ece5b160eca6ec5b047247e6a2e0"}]}
