)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9527a71b63ad4345afc0d8d2b22f70a74f5972f3","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"- On SIGHUP to the compute service, we\u0027ll now invalidate the report"},{"line_number":12,"context_line":"  client\u0027s provider tree cache and reset the refresh timers."},{"line_number":13,"context_line":"  TODO: reno for this"},{"line_number":14,"context_line":"- update_from_provider_tree now"},{"line_number":15,"context_line":"  - is stop-on-first-failure, not best-effort"},{"line_number":16,"context_line":"  - invalidates caches for providers in the whole tree surrounding the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3f79a3b5_d72ab395","line":13,"range":{"start_line":13,"start_character":2,"end_line":13,"end_character":21},"updated":"2018-11-02 13:39:22.000000000","message":"yes definitely. :)","commit_id":"5187ea57e9f3b45972813a63fa81323b928b3498"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9527a71b63ad4345afc0d8d2b22f70a74f5972f3","unresolved":false,"context_lines":[{"line_number":19,"context_line":"    justifies this change.)"},{"line_number":20,"context_line":"  ...which means we needed to"},{"line_number":21,"context_line":"- Add a new ProviderTree.remove_tree() method. The remove() method"},{"line_number":22,"context_line":"  removed the specified node and its *sub*tree. In contrast, the"},{"line_number":23,"context_line":"  remove_tree() method removes the entire tree around the specified"},{"line_number":24,"context_line":"  node, and returns the UUIDs of all the removed nodes."},{"line_number":25,"context_line":"- Percolate the is_new_compute_node flag in the resource tracker down"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3f79a3b5_72308deb","line":22,"range":{"start_line":22,"start_character":37,"end_line":22,"end_character":42},"updated":"2018-11-02 13:39:22.000000000","message":"i know your emphasing sub but that took a few reading to parse\n\nhow about *sub-tree* or *sub tree* i think of that as one word even though i know its not unless its hyphenated.\n\nside note when i see * i generally assume there will be an explanation fro the start later e.g. * is indicating a foot note which is why i had to parse this several time to under stand this was trying to \"bold\" the sub to emphasis it so it actually had the opposite effect.","commit_id":"5187ea57e9f3b45972813a63fa81323b928b3498"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9527a71b63ad4345afc0d8d2b22f70a74f5972f3","unresolved":false,"context_lines":[{"line_number":20,"context_line":"  ...which means we needed to"},{"line_number":21,"context_line":"- Add a new ProviderTree.remove_tree() method. The remove() method"},{"line_number":22,"context_line":"  removed the specified node and its *sub*tree. In contrast, the"},{"line_number":23,"context_line":"  remove_tree() method removes the entire tree around the specified"},{"line_number":24,"context_line":"  node, and returns the UUIDs of all the removed nodes."},{"line_number":25,"context_line":"- Percolate the is_new_compute_node flag in the resource tracker down"},{"line_number":26,"context_line":"  into _update_from_placement, and use it as a signal to decide whether"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3f79a3b5_9250c90b","line":23,"range":{"start_line":23,"start_character":2,"end_line":23,"end_character":13},"updated":"2018-11-02 13:39:22.000000000","message":"is there a case where we will use this on aything other the the root node out of interest. i mean in nova i dont think we ever would need to delete a tree by one of its subnode other then the root which corresponds to the compute node record.\n\nmaybe there is one but it would be nice to know why this is needed.","commit_id":"5187ea57e9f3b45972813a63fa81323b928b3498"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"262cb11756f457701dec92154fab77ed2e86cb62","unresolved":false,"context_lines":[{"line_number":20,"context_line":"  ...which means we needed to"},{"line_number":21,"context_line":"- Add a new ProviderTree.remove_tree() method. The remove() method"},{"line_number":22,"context_line":"  removed the specified node and its *sub*tree. In contrast, the"},{"line_number":23,"context_line":"  remove_tree() method removes the entire tree around the specified"},{"line_number":24,"context_line":"  node, and returns the UUIDs of all the removed nodes."},{"line_number":25,"context_line":"- Percolate the is_new_compute_node flag in the resource tracker down"},{"line_number":26,"context_line":"  into _update_from_placement, and use it as a signal to decide whether"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3f79a3b5_d792ac55","line":23,"range":{"start_line":23,"start_character":2,"end_line":23,"end_character":13},"in_reply_to":"3f79a3b5_9250c90b","updated":"2018-11-02 16:12:01.000000000","message":"It\u0027s hypothetically possible to have sharing providers in a tree structure. But no, the immediate need is exclusively for the compute node root provider. The failure could occur on any node in the compute\u0027s tree, or on any sharing provider, so I can\u0027t just always blow away the compute tree.\n\nHowever, it would probably be fine to blow away the whole cache so it gets completely rebuilt the next time. Until we have sharing providers, the effect will be the same. Even then, the only way it saves us anything significant is if we have a big complicated compute tree and the failure happens on the sharing provider.\n\nSo yeah, I think I\u0027ll get rid of the remove_tree business and just invalidate the whole cache on that failure.","commit_id":"5187ea57e9f3b45972813a63fa81323b928b3498"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"361cc2edbf49e17ce2783f2ac522784d2b61af86","unresolved":false,"context_lines":[{"line_number":19,"context_line":"    justifies this change.)"},{"line_number":20,"context_line":"  ...which means we needed to"},{"line_number":21,"context_line":"- Add a new ProviderTree.remove_tree() method. The remove() method"},{"line_number":22,"context_line":"  removed the specified node and its *sub*tree. In contrast, the"},{"line_number":23,"context_line":"  remove_tree() method removes the entire tree around the specified"},{"line_number":24,"context_line":"  node, and returns the UUIDs of all the removed nodes."},{"line_number":25,"context_line":"- Percolate the is_new_compute_node flag in the resource tracker down"},{"line_number":26,"context_line":"  into _update_from_placement, and use it as a signal to decide whether"},{"line_number":27,"context_line":"  to force _get_provider_tree_and_ensure_root to refresh."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3f79a3b5_718e48d8","line":24,"range":{"start_line":22,"start_character":48,"end_line":24,"end_character":6},"updated":"2018-11-02 15:16:46.000000000","message":"I don\u0027t understand what \"removes the entire tree around the specified node\" means.  If I have something like this:\n\n\n                   +-----------------+\n                   | \u003cCOMPUTE_NODE\u003e  |\n                   +-----------------+\n                   /                 \\\n+------------------+                 +-----------------+\n| \u003cNUMA_NODE_O\u003e    |                 | \u003cNUMA_NODE_1\u003e   |\n+------------------+                 +-----------------+\n         |                                 |\n +---------------+                  +--------------------+\n | \u003cPGPU_ID\u003e     |                  | \u003cPHYS_FUNC_PCI_ID\u003e |\n | VGPU: 8       |                  | SRIOV_NET_VF: 8    |\n +---------------+                  +--------------------+\n\nand I call remove_tree(NUMA_NODE_0), what gets removed?","commit_id":"5187ea57e9f3b45972813a63fa81323b928b3498"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"262cb11756f457701dec92154fab77ed2e86cb62","unresolved":false,"context_lines":[{"line_number":19,"context_line":"    justifies this change.)"},{"line_number":20,"context_line":"  ...which means we needed to"},{"line_number":21,"context_line":"- Add a new ProviderTree.remove_tree() method. The remove() method"},{"line_number":22,"context_line":"  removed the specified node and its *sub*tree. In contrast, the"},{"line_number":23,"context_line":"  remove_tree() method removes the entire tree around the specified"},{"line_number":24,"context_line":"  node, and returns the UUIDs of all the removed nodes."},{"line_number":25,"context_line":"- Percolate the is_new_compute_node flag in the resource tracker down"},{"line_number":26,"context_line":"  into _update_from_placement, and use it as a signal to decide whether"},{"line_number":27,"context_line":"  to force _get_provider_tree_and_ensure_root to refresh."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3f79a3b5_d76b8c51","line":24,"range":{"start_line":22,"start_character":48,"end_line":24,"end_character":6},"in_reply_to":"3f79a3b5_718e48d8","updated":"2018-11-02 16:12:01.000000000","message":"All of that. The only thing that would get saved in that scenario is if your ProviderTree had *other* roots (irl that would be sharing providers). But see above - I\u0027m going to get rid of this.","commit_id":"5187ea57e9f3b45972813a63fa81323b928b3498"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7fe34e11d2684686f8fb012103d876eaa3b3d07e","unresolved":false,"context_lines":[{"line_number":42,"context_line":"  to allow zero, meaning we *never* refresh (except on SIGHUP - see"},{"line_number":43,"context_line":"  above)."},{"line_number":44,"context_line":"  TODO: reno for this"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"TODO: Tests"},{"line_number":47,"context_line":"TODO: Probably split this into multiple patches"},{"line_number":48,"context_line":"TODO: ML discussion"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3f79a3b5_e290489a","line":45,"updated":"2018-11-02 16:28:17.000000000","message":"Need to mention that this means we would no longer pick up changes to the tree structure performed outside of the compute service. In particular, child providers managed by cyborg/neutron/etc. But we decided that\u0027s okay - that the report client (really, the virt driver) doesn\u0027t need to know about those things.","commit_id":"5187ea57e9f3b45972813a63fa81323b928b3498"}],"nova/compute/provider_tree.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9527a71b63ad4345afc0d8d2b22f70a74f5972f3","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        self.uuid \u003d uuid"},{"line_number":55,"context_line":"        self.name \u003d name"},{"line_number":56,"context_line":"        self.generation \u003d generation"},{"line_number":57,"context_line":"        self.parent_uuid \u003d parent_uuid"},{"line_number":58,"context_line":"        # Contains a dict, keyed by uuid of child resource providers having"},{"line_number":59,"context_line":"        # this provider as a parent"},{"line_number":60,"context_line":"        self.children \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_b2a705bc","line":57,"range":{"start_line":57,"start_character":7,"end_line":57,"end_character":38},"updated":"2018-11-02 13:39:22.000000000","message":"correct me if im wrong but doesnt placement internally keep the route of the tree that a provider is in the provider record in the db\n\nis there any reason we dont store that in the object so we can skip the tree walk later","commit_id":"5187ea57e9f3b45972813a63fa81323b928b3498"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"262cb11756f457701dec92154fab77ed2e86cb62","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        self.uuid \u003d uuid"},{"line_number":55,"context_line":"        self.name \u003d name"},{"line_number":56,"context_line":"        self.generation \u003d generation"},{"line_number":57,"context_line":"        self.parent_uuid \u003d parent_uuid"},{"line_number":58,"context_line":"        # Contains a dict, keyed by uuid of child resource providers having"},{"line_number":59,"context_line":"        # this provider as a parent"},{"line_number":60,"context_line":"        self.children \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_17c58435","line":57,"range":{"start_line":57,"start_character":7,"end_line":57,"end_character":38},"in_reply_to":"3f79a3b5_b2a705bc","updated":"2018-11-02 16:12:01.000000000","message":"We haven\u0027t needed it until now. And given that I\u0027m going to kill this part of the change, we still don\u0027t need it :)","commit_id":"5187ea57e9f3b45972813a63fa81323b928b3498"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9527a71b63ad4345afc0d8d2b22f70a74f5972f3","unresolved":false,"context_lines":[{"line_number":347,"context_line":"        else:"},{"line_number":348,"context_line":"            self.roots.remove(found)"},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"    def remove(self, name_or_uuid):"},{"line_number":351,"context_line":"        \"\"\"Safely removes the provider identified by the supplied name_or_uuid"},{"line_number":352,"context_line":"        parameter and all of its children from the tree."},{"line_number":353,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_fc2eb68b","line":350,"range":{"start_line":350,"start_character":8,"end_line":350,"end_character":14},"updated":"2018-11-02 13:39:22.000000000","message":"i would almost rename this to remove_subtree but that is probably a separate patch.\n\ni get that this is actually removing a node in a tree and the fact that the children of that not is removed is just a  required side effect but with the more explicit naming of remove_tree the symertry would be nice.\n\nthat said that would be noise an obsure what you are actully changing but maybe add a todo?","commit_id":"5187ea57e9f3b45972813a63fa81323b928b3498"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9527a71b63ad4345afc0d8d2b22f70a74f5972f3","unresolved":false,"context_lines":[{"line_number":370,"context_line":"        :return: List of UUIDs of providers that were deleted."},{"line_number":371,"context_line":"        \"\"\""},{"line_number":372,"context_line":"        with self.lock:"},{"line_number":373,"context_line":"            found \u003d self._find_with_lock(name_or_uuid)"},{"line_number":374,"context_line":"            while found.parent_uuid:"},{"line_number":375,"context_line":"                found \u003d self._find_with_lock(found.parent_uuid)"},{"line_number":376,"context_line":"            ret \u003d found.get_provider_uuids()"},{"line_number":377,"context_line":"            self._remove_with_lock(found.uuid)"},{"line_number":378,"context_line":"            return ret"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_b25625cd","line":375,"range":{"start_line":373,"start_character":11,"end_line":375,"end_character":63},"updated":"2018-11-02 13:39:22.000000000","message":"ok so this is doint a tree walk up to the root node of the tree when name_or_uuid is not the root node.\nif it is the route node the while is a noop befaus found.parent_uuid is None so we skip the loop.","commit_id":"5187ea57e9f3b45972813a63fa81323b928b3498"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9527a71b63ad4345afc0d8d2b22f70a74f5972f3","unresolved":false,"context_lines":[{"line_number":373,"context_line":"            found \u003d self._find_with_lock(name_or_uuid)"},{"line_number":374,"context_line":"            while found.parent_uuid:"},{"line_number":375,"context_line":"                found \u003d self._find_with_lock(found.parent_uuid)"},{"line_number":376,"context_line":"            ret \u003d found.get_provider_uuids()"},{"line_number":377,"context_line":"            self._remove_with_lock(found.uuid)"},{"line_number":378,"context_line":"            return ret"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"    def new_root(self, name, uuid, generation\u003dNone):"},{"line_number":381,"context_line":"        \"\"\"Adds a new root provider to the tree, returning its UUID."}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_9221a952","line":378,"range":{"start_line":376,"start_character":12,"end_line":378,"end_character":22},"updated":"2018-11-02 13:39:22.000000000","message":"then we get the list of all the uuid in the tree\nremove the root node and all its children\nand return the uuids of all the resource providers we just removed.","commit_id":"5187ea57e9f3b45972813a63fa81323b928b3498"}],"nova/scheduler/client/report.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9527a71b63ad4345afc0d8d2b22f70a74f5972f3","unresolved":false,"context_lines":[{"line_number":677,"context_line":"        #     return uuid"},{"line_number":678,"context_line":""},{"line_number":679,"context_line":"        # Optimization: If we already have the root provider in the cache, and"},{"line_number":680,"context_line":"        # it\u0027s not stale, short out."},{"line_number":681,"context_line":"        if (self._provider_tree.exists(uuid)"},{"line_number":682,"context_line":"                and not self._associations_stale(uuid)):"},{"line_number":683,"context_line":"            return uuid"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_f75faf49","line":680,"range":{"start_line":680,"start_character":26,"end_line":680,"end_character":35},"updated":"2018-11-02 13:39:22.000000000","message":"nit: this is usually refered to as \"early exit\" but that works too.","commit_id":"5187ea57e9f3b45972813a63fa81323b928b3498"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9527a71b63ad4345afc0d8d2b22f70a74f5972f3","unresolved":false,"context_lines":[{"line_number":867,"context_line":"        rpar \u003d CONF.compute.resource_provider_association_refresh"},{"line_number":868,"context_line":"        # TODO(efried): If refresh is disabled, we could avoid touching the"},{"line_number":869,"context_line":"        # _association_refresh_time dict anywhere, but that would take some"},{"line_number":870,"context_line":"        # nontrivial refactoring."},{"line_number":871,"context_line":"        if rpar \u003d\u003d 0:"},{"line_number":872,"context_line":"            # Refresh disabled (associations \"never\" stale)"},{"line_number":873,"context_line":"            return False"},{"line_number":874,"context_line":"        refresh_time \u003d self._association_refresh_time.get(uuid, 0)"},{"line_number":875,"context_line":"        return (time.time() - refresh_time) \u003e rpar"},{"line_number":876,"context_line":""},{"line_number":877,"context_line":"    def _update_inventory_attempt(self, context, rp_uuid, inv_data):"},{"line_number":878,"context_line":"        \"\"\"Update the inventory for this resource provider if needed."}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_177a6bba","line":875,"range":{"start_line":870,"start_character":7,"end_line":875,"end_character":50},"updated":"2018-11-02 13:39:22.000000000","message":"this works fine.\ni personlly would reorder this to\n\n   if rpar:\n        refresh_time \u003d self._association_refresh_time.get(uuid, 0)\n        return (time.time() - refresh_time) \u003e rpar\n\n  # Refresh disabled (associations \"never\" stale)\n  return False\n\nbut that is just personal preference and is barely \nworthy of a nit let alone a -1","commit_id":"5187ea57e9f3b45972813a63fa81323b928b3498"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9527a71b63ad4345afc0d8d2b22f70a74f5972f3","unresolved":false,"context_lines":[{"line_number":1586,"context_line":"                # failing provider (but leave other trees - e.g. sharing"},{"line_number":1587,"context_line":"                # providers - alone)."},{"line_number":1588,"context_line":"                try:"},{"line_number":1589,"context_line":"                    uuids \u003d self._provider_tree.remove_tree(rp_uuid)"},{"line_number":1590,"context_line":"                    for uuid in uuids:"},{"line_number":1591,"context_line":"                        self._association_refresh_time.pop(uuid, None)"},{"line_number":1592,"context_line":"                except ValueError:"},{"line_number":1593,"context_line":"                    pass"},{"line_number":1594,"context_line":"                raise exception.ResourceProviderSyncFailed()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_922e89f7","line":1591,"range":{"start_line":1589,"start_character":19,"end_line":1591,"end_character":70},"updated":"2018-11-02 13:39:22.000000000","message":"ah os this is why you added remove_tree","commit_id":"5187ea57e9f3b45972813a63fa81323b928b3498"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"262cb11756f457701dec92154fab77ed2e86cb62","unresolved":false,"context_lines":[{"line_number":1586,"context_line":"                # failing provider (but leave other trees - e.g. sharing"},{"line_number":1587,"context_line":"                # providers - alone)."},{"line_number":1588,"context_line":"                try:"},{"line_number":1589,"context_line":"                    uuids \u003d self._provider_tree.remove_tree(rp_uuid)"},{"line_number":1590,"context_line":"                    for uuid in uuids:"},{"line_number":1591,"context_line":"                        self._association_refresh_time.pop(uuid, None)"},{"line_number":1592,"context_line":"                except ValueError:"},{"line_number":1593,"context_line":"                    pass"},{"line_number":1594,"context_line":"                raise exception.ResourceProviderSyncFailed()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_9727541e","line":1591,"range":{"start_line":1589,"start_character":19,"end_line":1591,"end_character":70},"in_reply_to":"3f79a3b5_922e89f7","updated":"2018-11-02 16:12:01.000000000","message":"Yes. But I think I\u0027m going to just call .reset() instead. (Though I think I\u0027ll rename it to clear_cache().)","commit_id":"5187ea57e9f3b45972813a63fa81323b928b3498"}]}
