)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"d65201144c3cbca46461a0473645c86daae43150","unresolved":false,"context_lines":[{"line_number":725,"context_line":""},{"line_number":726,"context_line":"        self._update_resource_tracker(context, instance)"},{"line_number":727,"context_line":""},{"line_number":728,"context_line":"        rt \u003d self._get_resource_tracker()"},{"line_number":729,"context_line":"        rt.reportclient.delete_allocation_for_instance(instance.uuid)"},{"line_number":730,"context_line":""},{"line_number":731,"context_line":"        self._notify_about_instance_usage(context, instance, \"delete.end\","},{"line_number":732,"context_line":"                system_metadata\u003dsystem_meta)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_5db5b230","line":729,"range":{"start_line":728,"start_character":0,"end_line":729,"end_character":69},"updated":"2017-08-23 21:51:55.000000000","message":"It seems like this would make more sense in ResourceTracker._update_usage_from_instance() which is called by _update_resource_tracker() a few lines up. Are there reasons why it doesn\u0027t fit there?","commit_id":"d6de0e57c21472b99cbe71ec62b3967ef7282dec"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"647e4d193fb7d4fb510a56ad50af8673522338a0","unresolved":false,"context_lines":[{"line_number":726,"context_line":"        self._update_resource_tracker(context, instance)"},{"line_number":727,"context_line":""},{"line_number":728,"context_line":"        rt \u003d self._get_resource_tracker()"},{"line_number":729,"context_line":"        rt.reportclient.delete_allocation_for_instance(instance.uuid)"},{"line_number":730,"context_line":""},{"line_number":731,"context_line":"        self._notify_about_instance_usage(context, instance, \"delete.end\","},{"line_number":732,"context_line":"                system_metadata\u003dsystem_meta)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_5b86cfdd","line":729,"in_reply_to":"7f287b81_3b1aee7c","updated":"2017-08-24 10:15:35.000000000","message":"I think we should get in the habit (as here) of using the reportclient directly from compute manager for those requests that can be categorized as synchronous. That is stuff where we are saying \"complete this delete, now\", \"complete this resize, now\", \"fail this move, now\". I think we should be okay with doing that from all three of the scheduler, conductor, compute.\n\nIt will make the code a bit easier to track, and continue the simplification of the resource tracker.","commit_id":"d6de0e57c21472b99cbe71ec62b3967ef7282dec"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5c5ab5b30ff33d66c4af5f35cc687e7806909885","unresolved":false,"context_lines":[{"line_number":725,"context_line":""},{"line_number":726,"context_line":"        self._update_resource_tracker(context, instance)"},{"line_number":727,"context_line":""},{"line_number":728,"context_line":"        rt \u003d self._get_resource_tracker()"},{"line_number":729,"context_line":"        rt.reportclient.delete_allocation_for_instance(instance.uuid)"},{"line_number":730,"context_line":""},{"line_number":731,"context_line":"        self._notify_about_instance_usage(context, instance, \"delete.end\","},{"line_number":732,"context_line":"                system_metadata\u003dsystem_meta)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_6056812c","line":729,"range":{"start_line":728,"start_character":0,"end_line":729,"end_character":69},"in_reply_to":"7f287b81_5db5b230","updated":"2017-08-23 23:59:00.000000000","message":"Well, that\u0027s the flow that used to eventually call self.reportclient.update_instance_allocation with sign\u003d-1 when the instance is being removed which eventually calls delete_allocation_for_instance, so here we\u0027re just cutting out the middleman. That flow through the RT was causing problems for instances that aren\u0027t being deleted but they are no longer tracked on this node, so the RT would say, oh you\u0027re gone so I\u0027ll just delete your allocations, which would also remove allocations for the instance on another node during a move operation.\n\nUltimately we want to get the RT out of the business of dealing with that state management, but given we\u0027re doing this here, I think it\u0027s going to have to happen somewhere in the compute.\n\nIt could be that the RT logic should be more like:\n\nif has_ocata_computes or is_removed_instance:\n   # delete allocations\n\nI think for RC2, we should just get this simple fix in and backport it, and then we could consider moving this into the RT. While writing this, I was thinking that after this change I\u0027d like to at least isolate this common call in _update_resource_tracker so that both _complete_deletion and _shelve_offload_instance can call that and have it handle it the same way.","commit_id":"d6de0e57c21472b99cbe71ec62b3967ef7282dec"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"462635f89459d584aba17a446c279d65939ceae3","unresolved":false,"context_lines":[{"line_number":725,"context_line":""},{"line_number":726,"context_line":"        self._update_resource_tracker(context, instance)"},{"line_number":727,"context_line":""},{"line_number":728,"context_line":"        rt \u003d self._get_resource_tracker()"},{"line_number":729,"context_line":"        rt.reportclient.delete_allocation_for_instance(instance.uuid)"},{"line_number":730,"context_line":""},{"line_number":731,"context_line":"        self._notify_about_instance_usage(context, instance, \"delete.end\","},{"line_number":732,"context_line":"                system_metadata\u003dsystem_meta)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_3b1aee7c","line":729,"range":{"start_line":728,"start_character":0,"end_line":729,"end_character":69},"in_reply_to":"7f287b81_6056812c","updated":"2017-08-24 01:42:56.000000000","message":"My attempt at centralizing a bit:\n\nhttps://review.openstack.org/#/c/496976/","commit_id":"d6de0e57c21472b99cbe71ec62b3967ef7282dec"}]}
