)]}'
{"nova/scheduler/client/report.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"98e666fe65a8cee66a16063eda894a575ec31b8d","unresolved":false,"context_lines":[{"line_number":2040,"context_line":"        # the \"local\" tree (we use the nodename to figure out which providers"},{"line_number":2041,"context_line":"        # are \"local\")."},{"line_number":2042,"context_line":"        # All we want to do at this point is accumulate the set of consumers we"},{"line_number":2043,"context_line":"        # care about."},{"line_number":2044,"context_line":"        consumers \u003d set()"},{"line_number":2045,"context_line":"        for u in self._provider_tree.get_provider_uuids(name_or_uuid\u003dnodename):"},{"line_number":2046,"context_line":"            alloc_info \u003d self.get_allocations_for_resource_provider(context, u)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_33d791f7","line":2043,"updated":"2018-07-24 17:43:25.000000000","message":"Why aren\u0027t \"the consumers we care about\" the list of instance uuids on this compute node?","commit_id":"6d5eb440153c25fed80a053c11dd248e4e89e358"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"be43366c2119fd19bb194e49e8f8a5d0d649fc1a","unresolved":false,"context_lines":[{"line_number":2040,"context_line":"        # the \"local\" tree (we use the nodename to figure out which providers"},{"line_number":2041,"context_line":"        # are \"local\")."},{"line_number":2042,"context_line":"        # All we want to do at this point is accumulate the set of consumers we"},{"line_number":2043,"context_line":"        # care about."},{"line_number":2044,"context_line":"        consumers \u003d set()"},{"line_number":2045,"context_line":"        for u in self._provider_tree.get_provider_uuids(name_or_uuid\u003dnodename):"},{"line_number":2046,"context_line":"            alloc_info \u003d self.get_allocations_for_resource_provider(context, u)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_c441b10a","line":2043,"in_reply_to":"5f7c97a3_33d791f7","updated":"2018-07-24 19:36:27.000000000","message":"Because migrations?\n\nWe did go over this in the spec, I recall. Will look for that discussion when I\u0027m back at my desk.","commit_id":"6d5eb440153c25fed80a053c11dd248e4e89e358"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c622b6d05dcebacf756bd6e74499835f8168aa00","unresolved":false,"context_lines":[{"line_number":2040,"context_line":"        # the \"local\" tree (we use the nodename to figure out which providers"},{"line_number":2041,"context_line":"        # are \"local\")."},{"line_number":2042,"context_line":"        # All we want to do at this point is accumulate the set of consumers we"},{"line_number":2043,"context_line":"        # care about."},{"line_number":2044,"context_line":"        consumers \u003d set()"},{"line_number":2045,"context_line":"        for u in self._provider_tree.get_provider_uuids(name_or_uuid\u003dnodename):"},{"line_number":2046,"context_line":"            alloc_info \u003d self.get_allocations_for_resource_provider(context, u)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_d592bd4a","line":2043,"in_reply_to":"5f7c97a3_64ea1dda","updated":"2018-07-24 21:18:29.000000000","message":"We have to care, because a reshape is likely to be completely shutting down certain inventories, so we *can\u0027t* leave any allocations in them, or the reshape will bounce 409 InventoryInUse when it tries to remove those inventories.\n\nWhat *would* help is to make \"anchor providers\" a thing. GET /allocations?anchored_at\u003d{compute_node_uuid} and GET /resource_providers?anchored_at\u003d{compute_node_uuid} and GET /resource_providers?anchors_for\u003d{uuid of any rp including sharing} etc.","commit_id":"6d5eb440153c25fed80a053c11dd248e4e89e358"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"b690da0fbfb9cd77072e9f44beb27f6a8ec2ab0c","unresolved":false,"context_lines":[{"line_number":2040,"context_line":"        # the \"local\" tree (we use the nodename to figure out which providers"},{"line_number":2041,"context_line":"        # are \"local\")."},{"line_number":2042,"context_line":"        # All we want to do at this point is accumulate the set of consumers we"},{"line_number":2043,"context_line":"        # care about."},{"line_number":2044,"context_line":"        consumers \u003d set()"},{"line_number":2045,"context_line":"        for u in self._provider_tree.get_provider_uuids(name_or_uuid\u003dnodename):"},{"line_number":2046,"context_line":"            alloc_info \u003d self.get_allocations_for_resource_provider(context, u)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_64ea1dda","line":2043,"in_reply_to":"5f7c97a3_c441b10a","updated":"2018-07-24 19:42:39.000000000","message":"Hmmm, yeah. Makes sense. That raises memories of being grumpus about that choice back then. It both makes great sense the way it is done, and also is a pain in the tookus for just this kind of thing. Of course, at the time we never imagined something like this happening.\n\nIs it fair to ask: should we care about in progress migrations? Won\u0027t they just sort themselves out?","commit_id":"6d5eb440153c25fed80a053c11dd248e4e89e358"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d5d4d08630c8e560c0fd4ef59e0c473fd664a708","unresolved":false,"context_lines":[{"line_number":2023,"context_line":"                  },"},{"line_number":2024,"context_line":"                  ..."},{"line_number":2025,"context_line":"                }"},{"line_number":2026,"context_line":"        :raises: PlacementAPIConnectFailure if @safe_connect fails"},{"line_number":2027,"context_line":"        :raises: ResourceProviderAllocationRetrievalFailed if a placement API"},{"line_number":2028,"context_line":"                 call fails."},{"line_number":2029,"context_line":"        :raises: ValueError if there\u0027s no provider with the specified nodename."}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_1f42ebab","line":2026,"range":{"start_line":2026,"start_character":8,"end_line":2026,"end_character":66},"updated":"2018-08-15 15:48:16.000000000","message":"no longer true, since get_allocations_for_resource_provider() doesn\u0027t use @safe_connect. Change to keystoneauth1.exceptions.base.ClientException","commit_id":"de770c33a06b79e1cee0eb89f3f63a62472b9f92"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b9c1d175229a6589a812e589228d8bcda1a02998","unresolved":false,"context_lines":[{"line_number":2023,"context_line":"                  },"},{"line_number":2024,"context_line":"                  ..."},{"line_number":2025,"context_line":"                }"},{"line_number":2026,"context_line":"        :raises: PlacementAPIConnectFailure if @safe_connect fails"},{"line_number":2027,"context_line":"        :raises: ResourceProviderAllocationRetrievalFailed if a placement API"},{"line_number":2028,"context_line":"                 call fails."},{"line_number":2029,"context_line":"        :raises: ValueError if there\u0027s no provider with the specified nodename."}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_1a41190c","line":2026,"range":{"start_line":2026,"start_character":8,"end_line":2026,"end_character":66},"in_reply_to":"3f79a3b5_1f42ebab","updated":"2018-08-21 17:36:54.000000000","message":"Done","commit_id":"de770c33a06b79e1cee0eb89f3f63a62472b9f92"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d5d4d08630c8e560c0fd4ef59e0c473fd664a708","unresolved":false,"context_lines":[{"line_number":2037,"context_line":"        # care about."},{"line_number":2038,"context_line":"        consumers \u003d set()"},{"line_number":2039,"context_line":"        for u in self._provider_tree.get_provider_uuids(name_or_uuid\u003dnodename):"},{"line_number":2040,"context_line":"            alloc_info \u003d self.get_allocations_for_resource_provider(context, u)"},{"line_number":2041,"context_line":"            # The allocations dict is keyed by consumer UUID"},{"line_number":2042,"context_line":"            consumers.update(alloc_info.allocations)"},{"line_number":2043,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_9f47db77","line":2040,"updated":"2018-08-15 15:48:16.000000000","message":"this is doing a call/query to placement per resource provider. while I understand this is only going to be a small (hopefully) number of providers in the local compute node tree, it would certainly be more efficient to have a placement API call that would return allocations for a list of provider UUIDs.","commit_id":"de770c33a06b79e1cee0eb89f3f63a62472b9f92"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3d89a8bbd55031bd04313f9f0a9c7dd0c900b18a","unresolved":false,"context_lines":[{"line_number":2037,"context_line":"        # care about."},{"line_number":2038,"context_line":"        consumers \u003d set()"},{"line_number":2039,"context_line":"        for u in self._provider_tree.get_provider_uuids(name_or_uuid\u003dnodename):"},{"line_number":2040,"context_line":"            alloc_info \u003d self.get_allocations_for_resource_provider(context, u)"},{"line_number":2041,"context_line":"            # The allocations dict is keyed by consumer UUID"},{"line_number":2042,"context_line":"            consumers.update(alloc_info.allocations)"},{"line_number":2043,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_aa7137aa","line":2040,"in_reply_to":"3f79a3b5_9f47db77","updated":"2018-08-15 15:50:42.000000000","message":"Let\u0027s do that later, please. definitely not block this change on it.","commit_id":"de770c33a06b79e1cee0eb89f3f63a62472b9f92"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b9c1d175229a6589a812e589228d8bcda1a02998","unresolved":false,"context_lines":[{"line_number":2037,"context_line":"        # care about."},{"line_number":2038,"context_line":"        consumers \u003d set()"},{"line_number":2039,"context_line":"        for u in self._provider_tree.get_provider_uuids(name_or_uuid\u003dnodename):"},{"line_number":2040,"context_line":"            alloc_info \u003d self.get_allocations_for_resource_provider(context, u)"},{"line_number":2041,"context_line":"            # The allocations dict is keyed by consumer UUID"},{"line_number":2042,"context_line":"            consumers.update(alloc_info.allocations)"},{"line_number":2043,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_9a1be919","line":2040,"in_reply_to":"3f79a3b5_aa7137aa","updated":"2018-08-21 17:36:54.000000000","message":"Added TODO","commit_id":"de770c33a06b79e1cee0eb89f3f63a62472b9f92"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d5d4d08630c8e560c0fd4ef59e0c473fd664a708","unresolved":false,"context_lines":[{"line_number":2043,"context_line":""},{"line_number":2044,"context_line":"        # Now get all the allocations (which will include allocations on"},{"line_number":2045,"context_line":"        # sharing providers) for each of these consumers to build the result."},{"line_number":2046,"context_line":"        return {consumer: self.get_allocs_for_consumer(context, consumer)"},{"line_number":2047,"context_line":"                for consumer in consumers}"},{"line_number":2048,"context_line":""},{"line_number":2049,"context_line":"    def delete_resource_provider(self, context, compute_node, cascade\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_bf1c1778","line":2046,"updated":"2018-08-15 15:48:16.000000000","message":"same comment here. would be nice to have a single placement API call that gets allocation records for a set of consumer UUIDs instead of doing (potentially hundreds or more) placement calls, one for each consumer.","commit_id":"de770c33a06b79e1cee0eb89f3f63a62472b9f92"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b9c1d175229a6589a812e589228d8bcda1a02998","unresolved":false,"context_lines":[{"line_number":2043,"context_line":""},{"line_number":2044,"context_line":"        # Now get all the allocations (which will include allocations on"},{"line_number":2045,"context_line":"        # sharing providers) for each of these consumers to build the result."},{"line_number":2046,"context_line":"        return {consumer: self.get_allocs_for_consumer(context, consumer)"},{"line_number":2047,"context_line":"                for consumer in consumers}"},{"line_number":2048,"context_line":""},{"line_number":2049,"context_line":"    def delete_resource_provider(self, context, compute_node, cascade\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_ba16e5f0","line":2046,"in_reply_to":"3f79a3b5_bf1c1778","updated":"2018-08-21 17:36:54.000000000","message":"Ditto","commit_id":"de770c33a06b79e1cee0eb89f3f63a62472b9f92"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bb651125a3a32178db52a9ce296a07803bdf6f71","unresolved":false,"context_lines":[{"line_number":1998,"context_line":"        return ProviderAllocInfo(allocations\u003ddata[\u0027allocations\u0027])"},{"line_number":1999,"context_line":""},{"line_number":2000,"context_line":"    def get_allocations_for_provider_tree(self, context, nodename):"},{"line_number":2001,"context_line":"        \"\"\"Retrieve allocation records associated with all providers in the"},{"line_number":2002,"context_line":"        provider tree."},{"line_number":2003,"context_line":""},{"line_number":2004,"context_line":"        This method uses the cache exclusively to discover providers. The"},{"line_number":2005,"context_line":"        caller must ensure that the cache is populated."}],"source_content_type":"text/x-python","patch_set":20,"id":"3f79a3b5_3774d9ce","line":2002,"range":{"start_line":2001,"start_character":0,"end_line":2002,"end_character":22},"updated":"2018-08-24 09:34:46.000000000","message":"So we get consumers that has allocation on this node at L2047 then collect the allocations of these consumers. When we evacuate an instance the instance_uuid as a consumer consumes resources from both the source and the destination host. So this function might return allocations against RPs that does not belong to this compute node.\n\nSo far I don\u0027t see if this will cause a real problem or not but at least it worth to document it.","commit_id":"be62ff14c56ee19bd1c6441af7889768a2a8994d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9b426630128a66b86cd101551c34b94647789633","unresolved":false,"context_lines":[{"line_number":1998,"context_line":"        return ProviderAllocInfo(allocations\u003ddata[\u0027allocations\u0027])"},{"line_number":1999,"context_line":""},{"line_number":2000,"context_line":"    def get_allocations_for_provider_tree(self, context, nodename):"},{"line_number":2001,"context_line":"        \"\"\"Retrieve allocation records associated with all providers in the"},{"line_number":2002,"context_line":"        provider tree."},{"line_number":2003,"context_line":""},{"line_number":2004,"context_line":"        This method uses the cache exclusively to discover providers. The"},{"line_number":2005,"context_line":"        caller must ensure that the cache is populated."}],"source_content_type":"text/x-python","patch_set":20,"id":"3f79a3b5_69c7ca65","line":2002,"range":{"start_line":2001,"start_character":0,"end_line":2002,"end_character":22},"in_reply_to":"3f79a3b5_00362e52","updated":"2018-08-24 20:12:23.000000000","message":"Okay, after discussion I think I understand that there *do* exist scenarios in which one consumer can have allocations across multiple hosts\u0027 RPs. And this algorithm will return all of them. And the appropriate thing for the reshaper path in update_provider_tree to do is *ignore* those allocations. That\u0027s what it should do with any allocations relating to providers it\u0027s not reshaping anyway, so we should be good there. But I\u0027ll add words in places. (One of those places will be in this method; the other will be in the upt docstring addition in the top patch.)","commit_id":"be62ff14c56ee19bd1c6441af7889768a2a8994d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"79fb56f5f1230630ca2a38f50d585e0823066d5c","unresolved":false,"context_lines":[{"line_number":1998,"context_line":"        return ProviderAllocInfo(allocations\u003ddata[\u0027allocations\u0027])"},{"line_number":1999,"context_line":""},{"line_number":2000,"context_line":"    def get_allocations_for_provider_tree(self, context, nodename):"},{"line_number":2001,"context_line":"        \"\"\"Retrieve allocation records associated with all providers in the"},{"line_number":2002,"context_line":"        provider tree."},{"line_number":2003,"context_line":""},{"line_number":2004,"context_line":"        This method uses the cache exclusively to discover providers. The"},{"line_number":2005,"context_line":"        caller must ensure that the cache is populated."}],"source_content_type":"text/x-python","patch_set":20,"id":"3f79a3b5_00362e52","line":2002,"range":{"start_line":2001,"start_character":0,"end_line":2002,"end_character":22},"in_reply_to":"3f79a3b5_00b38eea","updated":"2018-08-24 16:12:44.000000000","message":"\u003e Is this helped by remembering that we should only be doing this as part of the reshaper flow, which should only be happening when $world is shut down?\n\nReally? If we only assume we can do this when *everything* is down you\u0027ve basically said no to rolling upgrades.","commit_id":"be62ff14c56ee19bd1c6441af7889768a2a8994d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d81040b4b1beac908fa2fe6915a0e7fa2a77f68f","unresolved":false,"context_lines":[{"line_number":1998,"context_line":"        return ProviderAllocInfo(allocations\u003ddata[\u0027allocations\u0027])"},{"line_number":1999,"context_line":""},{"line_number":2000,"context_line":"    def get_allocations_for_provider_tree(self, context, nodename):"},{"line_number":2001,"context_line":"        \"\"\"Retrieve allocation records associated with all providers in the"},{"line_number":2002,"context_line":"        provider tree."},{"line_number":2003,"context_line":""},{"line_number":2004,"context_line":"        This method uses the cache exclusively to discover providers. The"},{"line_number":2005,"context_line":"        caller must ensure that the cache is populated."}],"source_content_type":"text/x-python","patch_set":20,"id":"3f79a3b5_00b38eea","line":2002,"range":{"start_line":2001,"start_character":0,"end_line":2002,"end_character":22},"in_reply_to":"3f79a3b5_20300a9f","updated":"2018-08-24 16:10:12.000000000","message":"\u003e \u003e When we evacuate an\n \u003e \u003e instance the instance_uuid as a consumer consumes resources from\n \u003e \u003e both the source and the destination host.\n \u003e \n \u003e It does? We don\u0027t use the migration_uuid in that case? (Perhaps we\n \u003e should...)\n\nYeah see usage of replace_allocation_with_migration which is only used for cold and live migrate. We don\u0027t swap the migrations for evacuate because the source host is supposed to be down and fenced and if it does come back to live after we\u0027ve evacuated instances from it, we delete the allocations at that point:\n\nhttps://github.com/openstack/nova/blob/4d19b1779cca62abbfe259ef184fb7ee4e921225/nova/compute/manager.py#L709","commit_id":"be62ff14c56ee19bd1c6441af7889768a2a8994d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d87ffad0ebc2aae2b675e4fb88f803719c28dfc4","unresolved":false,"context_lines":[{"line_number":1998,"context_line":"        return ProviderAllocInfo(allocations\u003ddata[\u0027allocations\u0027])"},{"line_number":1999,"context_line":""},{"line_number":2000,"context_line":"    def get_allocations_for_provider_tree(self, context, nodename):"},{"line_number":2001,"context_line":"        \"\"\"Retrieve allocation records associated with all providers in the"},{"line_number":2002,"context_line":"        provider tree."},{"line_number":2003,"context_line":""},{"line_number":2004,"context_line":"        This method uses the cache exclusively to discover providers. The"},{"line_number":2005,"context_line":"        caller must ensure that the cache is populated."}],"source_content_type":"text/x-python","patch_set":20,"id":"3f79a3b5_20300a9f","line":2002,"range":{"start_line":2001,"start_character":0,"end_line":2002,"end_character":22},"in_reply_to":"3f79a3b5_3774d9ce","updated":"2018-08-24 16:05:42.000000000","message":"\u003e When we evacuate an\n \u003e instance the instance_uuid as a consumer consumes resources from\n \u003e both the source and the destination host.\n\nIt does? We don\u0027t use the migration_uuid in that case? (Perhaps we should...)\n\n \u003e So this function might\n \u003e return allocations against RPs that does not belong to this compute\n \u003e node.\n\nRight, the already-awkward nature of this algorithm was designed specifically to avoid that, so if you see a way for that to happen, we need to address it.\n\nIs this helped by remembering that we should only be doing this as part of the reshaper flow, which should only be happening when $world is shut down?\n\n \u003e So far I don\u0027t see if this will cause a real problem or not but at\n \u003e least it worth to document it.\n\nOkay, I may need some help wording that. I\u0027ve never been particularly well-versed on what really happens on evacuate.","commit_id":"be62ff14c56ee19bd1c6441af7889768a2a8994d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e33e7156b3677527254734642449357771cbb6e5","unresolved":false,"context_lines":[{"line_number":2034,"context_line":"        :raises: ValueError if there\u0027s no provider with the specified nodename."},{"line_number":2035,"context_line":"        \"\"\""},{"line_number":2036,"context_line":"        # We can\u0027t get *all* allocations for associated sharing providers"},{"line_number":2037,"context_line":"        # because some of those will belong to consumers on other hosts. So we"},{"line_number":2038,"context_line":"        # have to discover all the consumers associated with the providers in"},{"line_number":2039,"context_line":"        # the \"local\" tree (we use the nodename to figure out which providers"},{"line_number":2040,"context_line":"        # are \"local\")."},{"line_number":2041,"context_line":"        # All we want to do at this point is accumulate the set of consumers we"},{"line_number":2042,"context_line":"        # care about."},{"line_number":2043,"context_line":"        consumers \u003d set()"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f79a3b5_20c9ea24","line":2040,"range":{"start_line":2037,"start_character":73,"end_line":2040,"end_character":23},"updated":"2018-08-24 16:18:16.000000000","message":"Wouldn\u0027t this cover the evacuate case? If I\u0027m on the dest node of an evacuate, then I shouldn\u0027t get any consumers from the source node of the evacuated host, right? Although the consumer in this case (the instance uuid) would be the same, but we shouldn\u0027t return the source node provider (the evacuated host).","commit_id":"be62ff14c56ee19bd1c6441af7889768a2a8994d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e33e7156b3677527254734642449357771cbb6e5","unresolved":false,"context_lines":[{"line_number":2052,"context_line":"        # sharing providers) for each of these consumers to build the result."},{"line_number":2053,"context_line":"        # TODO(efried): This could be more efficient if placement offered an"},{"line_number":2054,"context_line":"        # operation like GET /allocations?consumer_uuid\u003din:\u003clist\u003e"},{"line_number":2055,"context_line":"        return {consumer: self.get_allocs_for_consumer(context, consumer)"},{"line_number":2056,"context_line":"                for consumer in consumers}"},{"line_number":2057,"context_line":""},{"line_number":2058,"context_line":"    def delete_resource_provider(self, context, compute_node, cascade\u003dFalse):"},{"line_number":2059,"context_line":"        \"\"\"Deletes the ResourceProvider record for the compute_node."}],"source_content_type":"text/x-python","patch_set":20,"id":"3f79a3b5_409ae613","line":2056,"range":{"start_line":2055,"start_character":8,"end_line":2056,"end_character":42},"updated":"2018-08-24 16:18:16.000000000","message":"OK this is where gibi is saying we could be returning source node allocations from evacuated computes right? As he said, maybe it doesn\u0027t matter...when the evacuated-from-host comes back up, if it does, it will remove it\u0027s allocations for each evacuated instance anyway.","commit_id":"be62ff14c56ee19bd1c6441af7889768a2a8994d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9b426630128a66b86cd101551c34b94647789633","unresolved":false,"context_lines":[{"line_number":2052,"context_line":"        # sharing providers) for each of these consumers to build the result."},{"line_number":2053,"context_line":"        # TODO(efried): This could be more efficient if placement offered an"},{"line_number":2054,"context_line":"        # operation like GET /allocations?consumer_uuid\u003din:\u003clist\u003e"},{"line_number":2055,"context_line":"        return {consumer: self.get_allocs_for_consumer(context, consumer)"},{"line_number":2056,"context_line":"                for consumer in consumers}"},{"line_number":2057,"context_line":""},{"line_number":2058,"context_line":"    def delete_resource_provider(self, context, compute_node, cascade\u003dFalse):"},{"line_number":2059,"context_line":"        \"\"\"Deletes the ResourceProvider record for the compute_node."}],"source_content_type":"text/x-python","patch_set":20,"id":"3f79a3b5_490bee8c","line":2056,"range":{"start_line":2055,"start_character":8,"end_line":2056,"end_character":42},"in_reply_to":"3f79a3b5_409ae613","updated":"2018-08-24 20:12:23.000000000","message":"Right; the important thing is for update_provider_tree to ignore those allocations when it does its reshape thang.","commit_id":"be62ff14c56ee19bd1c6441af7889768a2a8994d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f1126cd846624e478c4aad134a10d17759221902","unresolved":false,"context_lines":[{"line_number":2052,"context_line":"        # sharing providers) for each of these consumers to build the result."},{"line_number":2053,"context_line":"        # TODO(efried): This could be more efficient if placement offered an"},{"line_number":2054,"context_line":"        # operation like GET /allocations?consumer_uuid\u003din:\u003clist\u003e"},{"line_number":2055,"context_line":"        return {consumer: self.get_allocs_for_consumer(context, consumer)"},{"line_number":2056,"context_line":"                for consumer in consumers}"},{"line_number":2057,"context_line":""},{"line_number":2058,"context_line":"    def delete_resource_provider(self, context, compute_node, cascade\u003dFalse):"},{"line_number":2059,"context_line":"        \"\"\"Deletes the ResourceProvider record for the compute_node."}],"source_content_type":"text/x-python","patch_set":20,"id":"3f79a3b5_e2d76fbe","line":2056,"range":{"start_line":2055,"start_character":8,"end_line":2056,"end_character":42},"in_reply_to":"3f79a3b5_490bee8c","updated":"2018-08-24 21:56:45.000000000","message":"As noted in IRC, I\u0027m not exactly sure how the driver is going to correlate that stuff, but maybe we can punt for now? Looking at how update_provider_tree is called from the RT, the nodename is passed in and the ProviderTree methods work on name or uuid, and the compute node RP name is based on the nodename, so I guess it should just say, anything that\u0027s not rooted in the tree to that given nodename is something I don\u0027t care about, right?","commit_id":"be62ff14c56ee19bd1c6441af7889768a2a8994d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fdfda56f0e11dcd9d6fe4d57860971e6fbc15975","unresolved":false,"context_lines":[{"line_number":2052,"context_line":"        # sharing providers) for each of these consumers to build the result."},{"line_number":2053,"context_line":"        # TODO(efried): This could be more efficient if placement offered an"},{"line_number":2054,"context_line":"        # operation like GET /allocations?consumer_uuid\u003din:\u003clist\u003e"},{"line_number":2055,"context_line":"        return {consumer: self.get_allocs_for_consumer(context, consumer)"},{"line_number":2056,"context_line":"                for consumer in consumers}"},{"line_number":2057,"context_line":""},{"line_number":2058,"context_line":"    def delete_resource_provider(self, context, compute_node, cascade\u003dFalse):"},{"line_number":2059,"context_line":"        \"\"\"Deletes the ResourceProvider record for the compute_node."}],"source_content_type":"text/x-python","patch_set":20,"id":"3f79a3b5_fddab048","line":2056,"range":{"start_line":2055,"start_character":8,"end_line":2056,"end_character":42},"in_reply_to":"3f79a3b5_e2d76fbe","updated":"2018-08-24 22:43:22.000000000","message":"\u003e As noted in IRC, I\u0027m not exactly sure how the driver is going to\n \u003e correlate that stuff, but maybe we can punt for now?\n\nYeah. Trust me. What could possibly go wrong.\n\n \u003e Looking at how\n \u003e update_provider_tree is called from the RT, the nodename is passed\n \u003e in and the ProviderTree methods work on name or uuid, and the\n \u003e compute node RP name is based on the nodename, so I guess it should\n \u003e just say, anything that\u0027s not rooted in the tree to that given\n \u003e nodename is something I don\u0027t care about, right?\n\nNot quite. I have to care about sharing providers, which are outside of that set. Having thought through this already for things like the xen nrp impl, it\u0027s going to be easiest to do with namespacing. That is, providers whose names have a certain prefix can be assured to be of certain types; so if I find one that\u0027s a compute node RP but doesn\u0027t match the one for my nodename, I know to ignore it, etc.","commit_id":"be62ff14c56ee19bd1c6441af7889768a2a8994d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f283ec439d05597a33b894dfc4e1cfbdbc6f559f","unresolved":false,"context_lines":[{"line_number":2052,"context_line":"        # sharing providers) for each of these consumers to build the result."},{"line_number":2053,"context_line":"        # TODO(efried): This could be more efficient if placement offered an"},{"line_number":2054,"context_line":"        # operation like GET /allocations?consumer_uuid\u003din:\u003clist\u003e"},{"line_number":2055,"context_line":"        return {consumer: self.get_allocs_for_consumer(context, consumer)"},{"line_number":2056,"context_line":"                for consumer in consumers}"},{"line_number":2057,"context_line":""},{"line_number":2058,"context_line":"    def delete_resource_provider(self, context, compute_node, cascade\u003dFalse):"},{"line_number":2059,"context_line":"        \"\"\"Deletes the ResourceProvider record for the compute_node."}],"source_content_type":"text/x-python","patch_set":20,"id":"3f79a3b5_ffe36f32","line":2056,"range":{"start_line":2055,"start_character":8,"end_line":2056,"end_character":42},"in_reply_to":"3f79a3b5_fddab048","updated":"2018-08-27 14:07:25.000000000","message":"Hmm, so the xen driver is naming child RPs using the root node name as a prefix? I guess that works for the xenapi driver, and maybe for the libvirt driver if it does the same thing, but it seems a bit hacky.","commit_id":"be62ff14c56ee19bd1c6441af7889768a2a8994d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8f6863541498dd0047c8cfdb4a9de0610774f25c","unresolved":false,"context_lines":[{"line_number":2052,"context_line":"        # sharing providers) for each of these consumers to build the result."},{"line_number":2053,"context_line":"        # TODO(efried): This could be more efficient if placement offered an"},{"line_number":2054,"context_line":"        # operation like GET /allocations?consumer_uuid\u003din:\u003clist\u003e"},{"line_number":2055,"context_line":"        return {consumer: self.get_allocs_for_consumer(context, consumer)"},{"line_number":2056,"context_line":"                for consumer in consumers}"},{"line_number":2057,"context_line":""},{"line_number":2058,"context_line":"    def delete_resource_provider(self, context, compute_node, cascade\u003dFalse):"},{"line_number":2059,"context_line":"        \"\"\"Deletes the ResourceProvider record for the compute_node."}],"source_content_type":"text/x-python","patch_set":20,"id":"3f79a3b5_45b3b498","line":2056,"range":{"start_line":2055,"start_character":8,"end_line":2056,"end_character":42},"in_reply_to":"3f79a3b5_ffe36f32","updated":"2018-08-27 15:25:14.000000000","message":"I think it was more like naming their PGPUs with a particular prefix so they could recognize them even if they had disappeared. And yeah, it\u0027s a bit hacky, but the alternative would be something like maintaining a data file or database, which IMO is ickier.","commit_id":"be62ff14c56ee19bd1c6441af7889768a2a8994d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"27c39c16e09ab09ca2a5a1fe2e464b35aca2e924","unresolved":false,"context_lines":[{"line_number":2059,"context_line":"            # The allocations dict is keyed by consumer UUID"},{"line_number":2060,"context_line":"            consumers.update(alloc_info.allocations)"},{"line_number":2061,"context_line":""},{"line_number":2062,"context_line":"        # Now get all the allocations (which will include allocations on"},{"line_number":2063,"context_line":"        # sharing providers) for each of these consumers to build the result."},{"line_number":2064,"context_line":"        # TODO(efried): This could be more efficient if placement offered an"},{"line_number":2065,"context_line":"        # operation like GET /allocations?consumer_uuid\u003din:\u003clist\u003e"},{"line_number":2066,"context_line":"        return {consumer: self.get_allocs_for_consumer(context, consumer)"}],"source_content_type":"text/x-python","patch_set":21,"id":"3f79a3b5_02e86b79","line":2063,"range":{"start_line":2062,"start_character":39,"end_line":2063,"end_character":27},"updated":"2018-08-24 22:00:52.000000000","message":"nit: \"and potentially other providers, e.g. the source node for an evacuated instance\".","commit_id":"25b852efd79bb782ec0af51f27848c38b26c2597"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"17789965a1803441cfaa453dc9a80e6ceaa08701","unresolved":false,"context_lines":[{"line_number":2059,"context_line":"            # The allocations dict is keyed by consumer UUID"},{"line_number":2060,"context_line":"            consumers.update(alloc_info.allocations)"},{"line_number":2061,"context_line":""},{"line_number":2062,"context_line":"        # Now get all the allocations (which will include allocations on"},{"line_number":2063,"context_line":"        # sharing providers) for each of these consumers to build the result."},{"line_number":2064,"context_line":"        # TODO(efried): This could be more efficient if placement offered an"},{"line_number":2065,"context_line":"        # operation like GET /allocations?consumer_uuid\u003din:\u003clist\u003e"},{"line_number":2066,"context_line":"        return {consumer: self.get_allocs_for_consumer(context, consumer)"}],"source_content_type":"text/x-python","patch_set":21,"id":"3f79a3b5_7d974bed","line":2063,"range":{"start_line":2062,"start_character":39,"end_line":2063,"end_character":27},"in_reply_to":"3f79a3b5_02e86b79","updated":"2018-08-28 15:28:17.000000000","message":"+1. please mention in a fup that it could return other cn RPs in case of evacuation","commit_id":"25b852efd79bb782ec0af51f27848c38b26c2597"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d365bb2ce46de08fa5ebccae88657298f90b3656","unresolved":false,"context_lines":[{"line_number":2059,"context_line":"            # The allocations dict is keyed by consumer UUID"},{"line_number":2060,"context_line":"            consumers.update(alloc_info.allocations)"},{"line_number":2061,"context_line":""},{"line_number":2062,"context_line":"        # Now get all the allocations (which will include allocations on"},{"line_number":2063,"context_line":"        # sharing providers) for each of these consumers to build the result."},{"line_number":2064,"context_line":"        # TODO(efried): This could be more efficient if placement offered an"},{"line_number":2065,"context_line":"        # operation like GET /allocations?consumer_uuid\u003din:\u003clist\u003e"},{"line_number":2066,"context_line":"        return {consumer: self.get_allocs_for_consumer(context, consumer)"}],"source_content_type":"text/x-python","patch_set":21,"id":"3f79a3b5_0aafe42b","line":2063,"range":{"start_line":2062,"start_character":39,"end_line":2063,"end_character":27},"in_reply_to":"3f79a3b5_7d974bed","updated":"2018-08-28 22:28:01.000000000","message":"https://review.openstack.org/597301","commit_id":"25b852efd79bb782ec0af51f27848c38b26c2597"}],"nova/tests/functional/test_report_client.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2de7a43c6bc5932a4e865e4a4f708d760310b309","unresolved":false,"context_lines":[{"line_number":1065,"context_line":""},{"line_number":1066,"context_line":"            self.client.update_from_provider_tree(self.context, ptree)"},{"line_number":1067,"context_line":""},{"line_number":1068,"context_line":"            # Another unrelated compute node. We don\u0027t use the report client\u0027s"},{"line_number":1069,"context_line":"            # convenience methods because we don\u0027t want this guy in the cache."},{"line_number":1070,"context_line":"            resp \u003d self.client.post("},{"line_number":1071,"context_line":"                \u0027/resource_providers\u0027,"},{"line_number":1072,"context_line":"                {\u0027uuid\u0027: uuids.othercn, \u0027name\u0027: \u0027othercn\u0027}, version\u003d\u00271.20\u0027)"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f79a3b5_f9918453","line":1069,"range":{"start_line":1068,"start_character":46,"end_line":1069,"end_character":78},"updated":"2018-08-23 20:15:30.000000000","message":"I\u0027m curious why you didn\u0027t create the shared storage provider without the client convenience methods.\n\nI think it would be worth testing the scenario where the shared storage pool provider was *not* actually in the report client\u0027s cache and then gets pulled into the cache when allocations that mention the sharing provider are retrieved via get_allocations_for_provider_tree() below. Thoughts?","commit_id":"be62ff14c56ee19bd1c6441af7889768a2a8994d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9640232c19748a24880f3138e477b2e53c56cc19","unresolved":false,"context_lines":[{"line_number":1065,"context_line":""},{"line_number":1066,"context_line":"            self.client.update_from_provider_tree(self.context, ptree)"},{"line_number":1067,"context_line":""},{"line_number":1068,"context_line":"            # Another unrelated compute node. We don\u0027t use the report client\u0027s"},{"line_number":1069,"context_line":"            # convenience methods because we don\u0027t want this guy in the cache."},{"line_number":1070,"context_line":"            resp \u003d self.client.post("},{"line_number":1071,"context_line":"                \u0027/resource_providers\u0027,"},{"line_number":1072,"context_line":"                {\u0027uuid\u0027: uuids.othercn, \u0027name\u0027: \u0027othercn\u0027}, version\u003d\u00271.20\u0027)"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f79a3b5_5bb65740","line":1069,"range":{"start_line":1068,"start_character":46,"end_line":1069,"end_character":78},"in_reply_to":"3f79a3b5_00238ea8","updated":"2018-08-24 16:28:48.000000000","message":"Sorry, I was misreading the context. I see what you\u0027re saying now. Will change.","commit_id":"be62ff14c56ee19bd1c6441af7889768a2a8994d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9b426630128a66b86cd101551c34b94647789633","unresolved":false,"context_lines":[{"line_number":1065,"context_line":""},{"line_number":1066,"context_line":"            self.client.update_from_provider_tree(self.context, ptree)"},{"line_number":1067,"context_line":""},{"line_number":1068,"context_line":"            # Another unrelated compute node. We don\u0027t use the report client\u0027s"},{"line_number":1069,"context_line":"            # convenience methods because we don\u0027t want this guy in the cache."},{"line_number":1070,"context_line":"            resp \u003d self.client.post("},{"line_number":1071,"context_line":"                \u0027/resource_providers\u0027,"},{"line_number":1072,"context_line":"                {\u0027uuid\u0027: uuids.othercn, \u0027name\u0027: \u0027othercn\u0027}, version\u003d\u00271.20\u0027)"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f79a3b5_09473679","line":1069,"range":{"start_line":1068,"start_character":46,"end_line":1069,"end_character":78},"in_reply_to":"3f79a3b5_5bb65740","updated":"2018-08-24 20:12:23.000000000","message":"Ah - I remember why I didn\u0027t do this. See the docstring in get_allocations_for_provider_tree:\n\n This method uses the cache exclusively to discover providers. The\n caller must ensure that the cache is populated.\n\nIn the normal flow, that would happen as part of get_provider_tree_and_ensure_root. In the context of this test, that would mean it should exist prior to L1046.\n\nExcept I think update_from_provider_tree ought to pick it up as well...\n\n[Later] Yup. Done.","commit_id":"be62ff14c56ee19bd1c6441af7889768a2a8994d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d87ffad0ebc2aae2b675e4fb88f803719c28dfc4","unresolved":false,"context_lines":[{"line_number":1065,"context_line":""},{"line_number":1066,"context_line":"            self.client.update_from_provider_tree(self.context, ptree)"},{"line_number":1067,"context_line":""},{"line_number":1068,"context_line":"            # Another unrelated compute node. We don\u0027t use the report client\u0027s"},{"line_number":1069,"context_line":"            # convenience methods because we don\u0027t want this guy in the cache."},{"line_number":1070,"context_line":"            resp \u003d self.client.post("},{"line_number":1071,"context_line":"                \u0027/resource_providers\u0027,"},{"line_number":1072,"context_line":"                {\u0027uuid\u0027: uuids.othercn, \u0027name\u0027: \u0027othercn\u0027}, version\u003d\u00271.20\u0027)"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f79a3b5_00238ea8","line":1069,"range":{"start_line":1068,"start_character":46,"end_line":1069,"end_character":78},"in_reply_to":"3f79a3b5_f9918453","updated":"2018-08-24 16:05:42.000000000","message":"I\u0027m confused, because I think that\u0027s exactly what I\u0027m doing and why I\u0027m doing it. Am I missing something?","commit_id":"be62ff14c56ee19bd1c6441af7889768a2a8994d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9b426630128a66b86cd101551c34b94647789633","unresolved":false,"context_lines":[{"line_number":1078,"context_line":"            # Part of the shared storage aggregate"},{"line_number":1079,"context_line":"            self.client.put("},{"line_number":1080,"context_line":"                \u0027/resource_providers/%s/aggregates\u0027 % uuids.othercn,"},{"line_number":1081,"context_line":"                {\u0027aggregates\u0027: [uuids.ssp],"},{"line_number":1082,"context_line":"                 \u0027resource_provider_generation\u0027:"},{"line_number":1083,"context_line":"                     resp.json()[\u0027resource_provider_generation\u0027]},"},{"line_number":1084,"context_line":"                version\u003d\u00271.19\u0027)"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f79a3b5_c95cde4c","line":1081,"range":{"start_line":1081,"start_character":38,"end_line":1081,"end_character":41},"updated":"2018-08-24 20:12:23.000000000","message":"agg1!","commit_id":"be62ff14c56ee19bd1c6441af7889768a2a8994d"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"d84e13e7ee59977ff246ace834914cc9f66f9df3","unresolved":false,"context_lines":[{"line_number":1141,"context_line":"                })"},{"line_number":1142,"context_line":""},{"line_number":1143,"context_line":"            # And now we should get all the right allocations. Note that we see"},{"line_number":1144,"context_line":"            # nothing from othercn_inst."},{"line_number":1145,"context_line":"            expected \u003d {"},{"line_number":1146,"context_line":"                uuids.cn_inst1: cn_inst1_allocs,"},{"line_number":1147,"context_line":"                uuids.cn_inst2: cn_inst2_allocs,"}],"source_content_type":"text/x-python","patch_set":21,"id":"3f79a3b5_f3083c2e","line":1144,"range":{"start_line":1144,"start_character":27,"end_line":1144,"end_character":39},"updated":"2018-08-30 07:56:38.000000000","message":"Needs a space?","commit_id":"25b852efd79bb782ec0af51f27848c38b26c2597"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"f5a7641e2dccbad86fa2174767bc47cd1c2c86e6","unresolved":false,"context_lines":[{"line_number":1141,"context_line":"                })"},{"line_number":1142,"context_line":""},{"line_number":1143,"context_line":"            # And now we should get all the right allocations. Note that we see"},{"line_number":1144,"context_line":"            # nothing from othercn_inst."},{"line_number":1145,"context_line":"            expected \u003d {"},{"line_number":1146,"context_line":"                uuids.cn_inst1: cn_inst1_allocs,"},{"line_number":1147,"context_line":"                uuids.cn_inst2: cn_inst2_allocs,"}],"source_content_type":"text/x-python","patch_set":21,"id":"3f79a3b5_f1da7149","line":1144,"range":{"start_line":1144,"start_character":27,"end_line":1144,"end_character":39},"in_reply_to":"3f79a3b5_f3083c2e","updated":"2018-08-30 11:27:36.000000000","message":"Naw, it\u0027s the name of the instance (created on L1133).","commit_id":"25b852efd79bb782ec0af51f27848c38b26c2597"}]}
