)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c320f205a37167f1487e735f5b652f28da7e7bbe","unresolved":false,"context_lines":[{"line_number":13,"context_line":"load the new resources to the resource tracker, merges those resources"},{"line_number":14,"context_line":"into the provider tree by way of a new private function, and also"},{"line_number":15,"context_line":"includes the oslo config option required to enable the entire series."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I142a1f24ff2219cf308578f0236259d183785cff"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"7faddb67_9e9ff863","line":16,"updated":"2019-09-03 23:06:35.000000000","message":"and adds documentation including a release note :)","commit_id":"ad56b9f12f3e0b21e80b715da1d11a7d19d907b5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"269a8bc14c814c1b4dcbadda85e7fbb942be6da6","unresolved":false,"context_lines":[{"line_number":14,"context_line":"into the provider tree, and includes the oslo config option required"},{"line_number":15,"context_line":"to enable the entire series."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"TODO: Documentation"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I142a1f24ff2219cf308578f0236259d183785cff"},{"line_number":20,"context_line":"Blueprint: provider-config-file"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":21,"id":"3fa7e38b_ac2b4e31","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":19},"updated":"2019-10-18 22:58:48.000000000","message":"yeah. Ask mriedem or stephenfin where they think this should go.","commit_id":"54ee2f43551696c9fc4edcc613a1e6ba43082e68"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cd6d58358ec57823c4cd359d664067e8c2f93590","unresolved":false,"context_lines":[{"line_number":14,"context_line":"those providers on the provider tree. Those functions are not currently"},{"line_number":15,"context_line":"being called, but will be in a future commit."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"TODO: Minor improvements to unit tests"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I142a1f24ff2219cf308578f0236259d183785cff"},{"line_number":20,"context_line":"Blueprint: provider-config-file"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":34,"id":"3fa7e38b_99725d18","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":38},"updated":"2020-01-13 21:10:24.000000000","message":"still?","commit_id":"a0fe17b3104d016424c1667c49df53a73c8c3f42"}],"nova/compute/resource_tracker.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c320f205a37167f1487e735f5b652f28da7e7bbe","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        self.ram_allocation_ratio \u003d CONF.ram_allocation_ratio"},{"line_number":153,"context_line":"        self.cpu_allocation_ratio \u003d CONF.cpu_allocation_ratio"},{"line_number":154,"context_line":"        self.disk_allocation_ratio \u003d CONF.disk_allocation_ratio"},{"line_number":155,"context_line":"        self.custom_resources \u003d provider_config.get_custom_resources("},{"line_number":156,"context_line":"            CONF.provider_config)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    @utils.synchronized(COMPUTE_RESOURCE_SEMAPHORE)"},{"line_number":159,"context_line":"    def instance_claim(self, context, instance, nodename, limits\u003dNone):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_be92f449","line":156,"range":{"start_line":155,"start_character":8,"end_line":156,"end_character":33},"updated":"2019-09-03 23:06:35.000000000","message":"lead this with a comment noting that this can blow up the RT init (with XXX exception).","commit_id":"ad56b9f12f3e0b21e80b715da1d11a7d19d907b5"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"ee0fd192b902de1c9fb7ef37d2bae9358b1d039b","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        self.ram_allocation_ratio \u003d CONF.ram_allocation_ratio"},{"line_number":153,"context_line":"        self.cpu_allocation_ratio \u003d CONF.cpu_allocation_ratio"},{"line_number":154,"context_line":"        self.disk_allocation_ratio \u003d CONF.disk_allocation_ratio"},{"line_number":155,"context_line":"        self.custom_resources \u003d provider_config.get_custom_resources("},{"line_number":156,"context_line":"            CONF.provider_config)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    @utils.synchronized(COMPUTE_RESOURCE_SEMAPHORE)"},{"line_number":159,"context_line":"    def instance_claim(self, context, instance, nodename, limits\u003dNone):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_0f6982f6","line":156,"range":{"start_line":155,"start_character":8,"end_line":156,"end_character":33},"in_reply_to":"7faddb67_be92f449","updated":"2019-09-05 16:26:46.000000000","message":"Done","commit_id":"ad56b9f12f3e0b21e80b715da1d11a7d19d907b5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c320f205a37167f1487e735f5b652f28da7e7bbe","unresolved":false,"context_lines":[{"line_number":1028,"context_line":"                    compute_node)"},{"line_number":1029,"context_line":""},{"line_number":1030,"context_line":"            prov_tree.update_inventory(nodename, inv_data)"},{"line_number":1031,"context_line":"        prov_tree \u003d self._update_custom_resources(prov_tree)"},{"line_number":1032,"context_line":"        # Flush any changes. If we processed ReshapeNeeded above, allocs is not"},{"line_number":1033,"context_line":"        # None, and this will hit placement\u0027s POST /reshaper route."},{"line_number":1034,"context_line":"        self.reportclient.update_from_provider_tree(context, prov_tree,"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_5e93c04e","line":1031,"range":{"start_line":1031,"start_character":25,"end_line":1031,"end_character":49},"updated":"2019-09-03 23:06:35.000000000","message":"comment above this saying that we\u0027re merging in changes from provider config files","commit_id":"ad56b9f12f3e0b21e80b715da1d11a7d19d907b5"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"ee0fd192b902de1c9fb7ef37d2bae9358b1d039b","unresolved":false,"context_lines":[{"line_number":1028,"context_line":"                    compute_node)"},{"line_number":1029,"context_line":""},{"line_number":1030,"context_line":"            prov_tree.update_inventory(nodename, inv_data)"},{"line_number":1031,"context_line":"        prov_tree \u003d self._update_custom_resources(prov_tree)"},{"line_number":1032,"context_line":"        # Flush any changes. If we processed ReshapeNeeded above, allocs is not"},{"line_number":1033,"context_line":"        # None, and this will hit placement\u0027s POST /reshaper route."},{"line_number":1034,"context_line":"        self.reportclient.update_from_provider_tree(context, prov_tree,"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_af770ed1","line":1031,"range":{"start_line":1031,"start_character":25,"end_line":1031,"end_character":49},"in_reply_to":"7faddb67_5e93c04e","updated":"2019-09-05 16:26:46.000000000","message":"Done","commit_id":"ad56b9f12f3e0b21e80b715da1d11a7d19d907b5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c320f205a37167f1487e735f5b652f28da7e7bbe","unresolved":false,"context_lines":[{"line_number":1571,"context_line":"                usage[key] \u003d updates[key]"},{"line_number":1572,"context_line":"        return usage"},{"line_number":1573,"context_line":""},{"line_number":1574,"context_line":"    def _update_custom_resources(self, provider_tree):"},{"line_number":1575,"context_line":"        \"\"\"Takes a provider tree and merges any custom resources while"},{"line_number":1576,"context_line":"        checking for conflicts. Any providers in the update that are not"},{"line_number":1577,"context_line":"        present in the tree are logged and ignored as are conflicting"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_bec194e6","line":1574,"range":{"start_line":1574,"start_character":8,"end_line":1574,"end_character":32},"updated":"2019-09-03 23:06:35.000000000","message":"I would call this something like _merge_provider_configs.\n\nAlso, consider breaking it down into smaller methods. This is long and deeply nested.","commit_id":"ad56b9f12f3e0b21e80b715da1d11a7d19d907b5"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"ee0fd192b902de1c9fb7ef37d2bae9358b1d039b","unresolved":false,"context_lines":[{"line_number":1571,"context_line":"                usage[key] \u003d updates[key]"},{"line_number":1572,"context_line":"        return usage"},{"line_number":1573,"context_line":""},{"line_number":1574,"context_line":"    def _update_custom_resources(self, provider_tree):"},{"line_number":1575,"context_line":"        \"\"\"Takes a provider tree and merges any custom resources while"},{"line_number":1576,"context_line":"        checking for conflicts. Any providers in the update that are not"},{"line_number":1577,"context_line":"        present in the tree are logged and ignored as are conflicting"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_4ccbec48","line":1574,"range":{"start_line":1574,"start_character":8,"end_line":1574,"end_character":32},"in_reply_to":"7faddb67_bec194e6","updated":"2019-09-05 16:26:46.000000000","message":"Done","commit_id":"ad56b9f12f3e0b21e80b715da1d11a7d19d907b5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c320f205a37167f1487e735f5b652f28da7e7bbe","unresolved":false,"context_lines":[{"line_number":1577,"context_line":"        present in the tree are logged and ignored as are conflicting"},{"line_number":1578,"context_line":"        inventories on present providers."},{"line_number":1579,"context_line":""},{"line_number":1580,"context_line":"        :param provider_tree: A copy of the provider tree to be updated"},{"line_number":1581,"context_line":""},{"line_number":1582,"context_line":"        :return: The updated provider tree"},{"line_number":1583,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_1ed9c8f2","line":1580,"range":{"start_line":1580,"start_character":30,"end_line":1580,"end_character":39},"updated":"2019-09-03 23:06:35.000000000","message":"not a copy","commit_id":"ad56b9f12f3e0b21e80b715da1d11a7d19d907b5"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"ee0fd192b902de1c9fb7ef37d2bae9358b1d039b","unresolved":false,"context_lines":[{"line_number":1577,"context_line":"        present in the tree are logged and ignored as are conflicting"},{"line_number":1578,"context_line":"        inventories on present providers."},{"line_number":1579,"context_line":""},{"line_number":1580,"context_line":"        :param provider_tree: A copy of the provider tree to be updated"},{"line_number":1581,"context_line":""},{"line_number":1582,"context_line":"        :return: The updated provider tree"},{"line_number":1583,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_4f4c5a9d","line":1580,"range":{"start_line":1580,"start_character":30,"end_line":1580,"end_character":39},"in_reply_to":"7faddb67_1ed9c8f2","updated":"2019-09-05 16:26:46.000000000","message":"Done","commit_id":"ad56b9f12f3e0b21e80b715da1d11a7d19d907b5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c320f205a37167f1487e735f5b652f28da7e7bbe","unresolved":false,"context_lines":[{"line_number":1579,"context_line":""},{"line_number":1580,"context_line":"        :param provider_tree: A copy of the provider tree to be updated"},{"line_number":1581,"context_line":""},{"line_number":1582,"context_line":"        :return: The updated provider tree"},{"line_number":1583,"context_line":"        \"\"\""},{"line_number":1584,"context_line":"        for provider_file, provider_data in self.custom_resources.items():"},{"line_number":1585,"context_line":"            for provider in provider_data.get(\"providers\", []):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_fedb8ce6","line":1582,"range":{"start_line":1582,"start_character":8,"end_line":1582,"end_character":42},"updated":"2019-09-03 23:06:35.000000000","message":"Again, don\u0027t bother with this. Own the fact that this method has side effects, like all the ones around it in the _update_to_placement flow.","commit_id":"ad56b9f12f3e0b21e80b715da1d11a7d19d907b5"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"ee0fd192b902de1c9fb7ef37d2bae9358b1d039b","unresolved":false,"context_lines":[{"line_number":1579,"context_line":""},{"line_number":1580,"context_line":"        :param provider_tree: A copy of the provider tree to be updated"},{"line_number":1581,"context_line":""},{"line_number":1582,"context_line":"        :return: The updated provider tree"},{"line_number":1583,"context_line":"        \"\"\""},{"line_number":1584,"context_line":"        for provider_file, provider_data in self.custom_resources.items():"},{"line_number":1585,"context_line":"            for provider in provider_data.get(\"providers\", []):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_2f455e6f","line":1582,"range":{"start_line":1582,"start_character":8,"end_line":1582,"end_character":42},"in_reply_to":"7faddb67_fedb8ce6","updated":"2019-09-05 16:26:46.000000000","message":"Done","commit_id":"ad56b9f12f3e0b21e80b715da1d11a7d19d907b5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c320f205a37167f1487e735f5b652f28da7e7bbe","unresolved":false,"context_lines":[{"line_number":1581,"context_line":""},{"line_number":1582,"context_line":"        :return: The updated provider tree"},{"line_number":1583,"context_line":"        \"\"\""},{"line_number":1584,"context_line":"        for provider_file, provider_data in self.custom_resources.items():"},{"line_number":1585,"context_line":"            for provider in provider_data.get(\"providers\", []):"},{"line_number":1586,"context_line":"                additional_inventories \u003d \\"},{"line_number":1587,"context_line":"                    provider.get(\u0027inventories\u0027, {}).get(\"additional\", [])"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_becaf416","line":1584,"range":{"start_line":1584,"start_character":44,"end_line":1584,"end_character":74},"updated":"2019-09-03 23:06:35.000000000","message":"Despite the fact that you\u0027re not allowed to reference the same provider more than once, we should still process this in lex order of the files, i.e. sort this by provider_file.\n\nOr, as suggested in the previous patch, have it be an ordered list instead of a dict.","commit_id":"ad56b9f12f3e0b21e80b715da1d11a7d19d907b5"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"ee0fd192b902de1c9fb7ef37d2bae9358b1d039b","unresolved":false,"context_lines":[{"line_number":1581,"context_line":""},{"line_number":1582,"context_line":"        :return: The updated provider tree"},{"line_number":1583,"context_line":"        \"\"\""},{"line_number":1584,"context_line":"        for provider_file, provider_data in self.custom_resources.items():"},{"line_number":1585,"context_line":"            for provider in provider_data.get(\"providers\", []):"},{"line_number":1586,"context_line":"                additional_inventories \u003d \\"},{"line_number":1587,"context_line":"                    provider.get(\u0027inventories\u0027, {}).get(\"additional\", [])"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_8f557220","line":1584,"range":{"start_line":1584,"start_character":44,"end_line":1584,"end_character":74},"in_reply_to":"7faddb67_becaf416","updated":"2019-09-05 16:26:46.000000000","message":"Done","commit_id":"ad56b9f12f3e0b21e80b715da1d11a7d19d907b5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c320f205a37167f1487e735f5b652f28da7e7bbe","unresolved":false,"context_lines":[{"line_number":1583,"context_line":"        \"\"\""},{"line_number":1584,"context_line":"        for provider_file, provider_data in self.custom_resources.items():"},{"line_number":1585,"context_line":"            for provider in provider_data.get(\"providers\", []):"},{"line_number":1586,"context_line":"                additional_inventories \u003d \\"},{"line_number":1587,"context_line":"                    provider.get(\u0027inventories\u0027, {}).get(\"additional\", [])"},{"line_number":1588,"context_line":"                additional_traits \u003d \\"},{"line_number":1589,"context_line":"                    provider.get(\"traits\", {}).get(\"additional\", [])"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_7e823cc9","line":1586,"range":{"start_line":1586,"start_character":41,"end_line":1586,"end_character":42},"updated":"2019-09-03 23:06:35.000000000","message":"avoid backslashes","commit_id":"ad56b9f12f3e0b21e80b715da1d11a7d19d907b5"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"ee0fd192b902de1c9fb7ef37d2bae9358b1d039b","unresolved":false,"context_lines":[{"line_number":1583,"context_line":"        \"\"\""},{"line_number":1584,"context_line":"        for provider_file, provider_data in self.custom_resources.items():"},{"line_number":1585,"context_line":"            for provider in provider_data.get(\"providers\", []):"},{"line_number":1586,"context_line":"                additional_inventories \u003d \\"},{"line_number":1587,"context_line":"                    provider.get(\u0027inventories\u0027, {}).get(\"additional\", [])"},{"line_number":1588,"context_line":"                additional_traits \u003d \\"},{"line_number":1589,"context_line":"                    provider.get(\"traits\", {}).get(\"additional\", [])"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_6f34b6fb","line":1586,"range":{"start_line":1586,"start_character":41,"end_line":1586,"end_character":42},"in_reply_to":"7faddb67_7e823cc9","updated":"2019-09-05 16:26:46.000000000","message":"Done","commit_id":"ad56b9f12f3e0b21e80b715da1d11a7d19d907b5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c320f205a37167f1487e735f5b652f28da7e7bbe","unresolved":false,"context_lines":[{"line_number":1590,"context_line":"                pid \u003d provider[\"identification\"]"},{"line_number":1591,"context_line":"                provider_id \u003d pid.get(\"uuid\") or pid.get(\"name\")"},{"line_number":1592,"context_line":""},{"line_number":1593,"context_line":"                if not provider_tree.exists(provider_id) and \\"},{"line_number":1594,"context_line":"                        provider_id !\u003d \"$COMPUTE_NODE\":"},{"line_number":1595,"context_line":"                    LOG.warning(\"Provider %s specified in provider file %s \""},{"line_number":1596,"context_line":"                                \"does not exist on ProviderTree and will be \""},{"line_number":1597,"context_line":"                                \"ignored.\", provider_id, provider_file)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_5e99801b","line":1594,"range":{"start_line":1593,"start_character":16,"end_line":1594,"end_character":55},"updated":"2019-09-03 23:06:35.000000000","message":"Yeah, so somewhere in here you also need to be keeping track of the unique providers you\u0027ve seen so you can blow up if there are duplicates.\n\nNeed test cases for various permutations of name, uuid\u003dreal-uuid, and uuid\u003d$COMPUTE_NODE across one/different file(s) to prove this.","commit_id":"ad56b9f12f3e0b21e80b715da1d11a7d19d907b5"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"ee0fd192b902de1c9fb7ef37d2bae9358b1d039b","unresolved":false,"context_lines":[{"line_number":1590,"context_line":"                pid \u003d provider[\"identification\"]"},{"line_number":1591,"context_line":"                provider_id \u003d pid.get(\"uuid\") or pid.get(\"name\")"},{"line_number":1592,"context_line":""},{"line_number":1593,"context_line":"                if not provider_tree.exists(provider_id) and \\"},{"line_number":1594,"context_line":"                        provider_id !\u003d \"$COMPUTE_NODE\":"},{"line_number":1595,"context_line":"                    LOG.warning(\"Provider %s specified in provider file %s \""},{"line_number":1596,"context_line":"                                \"does not exist on ProviderTree and will be \""},{"line_number":1597,"context_line":"                                \"ignored.\", provider_id, provider_file)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_c10c9694","line":1594,"range":{"start_line":1593,"start_character":16,"end_line":1594,"end_character":55},"in_reply_to":"7faddb67_5e99801b","updated":"2019-09-05 16:26:46.000000000","message":"Done","commit_id":"ad56b9f12f3e0b21e80b715da1d11a7d19d907b5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c320f205a37167f1487e735f5b652f28da7e7bbe","unresolved":false,"context_lines":[{"line_number":1592,"context_line":""},{"line_number":1593,"context_line":"                if not provider_tree.exists(provider_id) and \\"},{"line_number":1594,"context_line":"                        provider_id !\u003d \"$COMPUTE_NODE\":"},{"line_number":1595,"context_line":"                    LOG.warning(\"Provider %s specified in provider file %s \""},{"line_number":1596,"context_line":"                                \"does not exist on ProviderTree and will be \""},{"line_number":1597,"context_line":"                                \"ignored.\", provider_id, provider_file)"},{"line_number":1598,"context_line":"                elif additional_inventories or additional_traits:"},{"line_number":1599,"context_line":"                    if provider_id \u003d\u003d \"$COMPUTE_NODE\":"},{"line_number":1600,"context_line":"                        providers_to_update \u003d [provider.uuid for provider in"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_ded490ec","line":1597,"range":{"start_line":1595,"start_character":0,"end_line":1597,"end_character":71},"updated":"2019-09-03 23:06:35.000000000","message":"I don\u0027t really want to see this every time _update_to_placement runs. We should do some kind of \u0027warn once\u0027 behavior here. But carefully, allowing for providers to reappear/re-disappear on subsequent iterations...","commit_id":"ad56b9f12f3e0b21e80b715da1d11a7d19d907b5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c320f205a37167f1487e735f5b652f28da7e7bbe","unresolved":false,"context_lines":[{"line_number":1598,"context_line":"                elif additional_inventories or additional_traits:"},{"line_number":1599,"context_line":"                    if provider_id \u003d\u003d \"$COMPUTE_NODE\":"},{"line_number":1600,"context_line":"                        providers_to_update \u003d [provider.uuid for provider in"},{"line_number":1601,"context_line":"                                               provider_tree.roots]"},{"line_number":1602,"context_line":"                    else:"},{"line_number":1603,"context_line":"                        providers_to_update \u003d [provider_id]"},{"line_number":1604,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_7ee9dc7c","line":1601,"range":{"start_line":1601,"start_character":61,"end_line":1601,"end_character":66},"updated":"2019-09-03 23:06:35.000000000","message":"only if not sharing","commit_id":"ad56b9f12f3e0b21e80b715da1d11a7d19d907b5"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"ee0fd192b902de1c9fb7ef37d2bae9358b1d039b","unresolved":false,"context_lines":[{"line_number":1598,"context_line":"                elif additional_inventories or additional_traits:"},{"line_number":1599,"context_line":"                    if provider_id \u003d\u003d \"$COMPUTE_NODE\":"},{"line_number":1600,"context_line":"                        providers_to_update \u003d [provider.uuid for provider in"},{"line_number":1601,"context_line":"                                               provider_tree.roots]"},{"line_number":1602,"context_line":"                    else:"},{"line_number":1603,"context_line":"                        providers_to_update \u003d [provider_id]"},{"line_number":1604,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_8ab48037","line":1601,"range":{"start_line":1601,"start_character":61,"end_line":1601,"end_character":66},"in_reply_to":"7faddb67_7ee9dc7c","updated":"2019-09-05 16:26:46.000000000","message":"Done","commit_id":"ad56b9f12f3e0b21e80b715da1d11a7d19d907b5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c320f205a37167f1487e735f5b652f28da7e7bbe","unresolved":false,"context_lines":[{"line_number":1612,"context_line":"                                         existing_data.inventory]"},{"line_number":1613,"context_line":"                            if conflicts:"},{"line_number":1614,"context_line":"                                LOG.error("},{"line_number":1615,"context_line":"                                    \"Resource class [%s] for provider [%s] \""},{"line_number":1616,"context_line":"                                    \"defined in provider file [%s] conflict \""},{"line_number":1617,"context_line":"                                    \"with Nova native resource classes.\","},{"line_number":1618,"context_line":"                                    conflicts, provider_to_update,"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_7e98fc67","line":1615,"range":{"start_line":1615,"start_character":46,"end_line":1615,"end_character":51},"updated":"2019-09-03 23:06:35.000000000","message":"classes","commit_id":"ad56b9f12f3e0b21e80b715da1d11a7d19d907b5"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"ee0fd192b902de1c9fb7ef37d2bae9358b1d039b","unresolved":false,"context_lines":[{"line_number":1612,"context_line":"                                         existing_data.inventory]"},{"line_number":1613,"context_line":"                            if conflicts:"},{"line_number":1614,"context_line":"                                LOG.error("},{"line_number":1615,"context_line":"                                    \"Resource class [%s] for provider [%s] \""},{"line_number":1616,"context_line":"                                    \"defined in provider file [%s] conflict \""},{"line_number":1617,"context_line":"                                    \"with Nova native resource classes.\","},{"line_number":1618,"context_line":"                                    conflicts, provider_to_update,"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_8f2a528e","line":1615,"range":{"start_line":1615,"start_character":46,"end_line":1615,"end_character":51},"in_reply_to":"7faddb67_7e98fc67","updated":"2019-09-05 16:26:46.000000000","message":"Done","commit_id":"ad56b9f12f3e0b21e80b715da1d11a7d19d907b5"},{"author":{"_account_id":29334,"name":"Dakshina Ilangovan","email":"dakshina.ilangovan@intel.com","username":"dakshinai"},"change_message_id":"3c3c8046e61d4eefd3e2cbd48b229a48959fed18","unresolved":false,"context_lines":[{"line_number":1802,"context_line":"    def _get_providers_to_update(self, provider, prov_tree,"},{"line_number":1803,"context_line":"                                 source_file, startup):"},{"line_number":1804,"context_line":"        \"\"\"Identifies the providers to be updated and checks them against"},{"line_number":1805,"context_line":"         self._processed_provider_ids. Intended only to be consumed by"},{"line_number":1806,"context_line":"         _merge_provider_configs()"},{"line_number":1807,"context_line":""},{"line_number":1808,"context_line":"        :param provider: Provider Config data"}],"source_content_type":"text/x-python","patch_set":18,"id":"3fa7e38b_f5697b24","line":1805,"range":{"start_line":1805,"start_character":15,"end_line":1805,"end_character":37},"updated":"2019-10-11 10:28:09.000000000","message":"Can you elaborate on why we need this variable? Once this is clear to me, I can read the code better.","commit_id":"21fd0ba197db03eaa0b830e0380961e2bfa0e82f"},{"author":{"_account_id":29334,"name":"Dakshina Ilangovan","email":"dakshina.ilangovan@intel.com","username":"dakshinai"},"change_message_id":"3c3c8046e61d4eefd3e2cbd48b229a48959fed18","unresolved":false,"context_lines":[{"line_number":1814,"context_line":""},{"line_number":1815,"context_line":"        :returns: list of ProviderData, string with provider uuid or name"},{"line_number":1816,"context_line":"        \"\"\""},{"line_number":1817,"context_line":"        pid \u003d provider[\"identification\"]"},{"line_number":1818,"context_line":"        provider_id \u003d pid.get(\"uuid\") or pid.get(\"name\")"},{"line_number":1819,"context_line":""},{"line_number":1820,"context_line":"        if provider_id \u003d\u003d \"$COMPUTE_NODE\":"}],"source_content_type":"text/x-python","patch_set":18,"id":"3fa7e38b_d54a3f25","line":1817,"range":{"start_line":1817,"start_character":7,"end_line":1817,"end_character":40},"updated":"2019-10-11 10:28:09.000000000","message":"check for null?","commit_id":"21fd0ba197db03eaa0b830e0380961e2bfa0e82f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"356cc53376693c560fda046a9416243fea8ea90e","unresolved":false,"context_lines":[{"line_number":1814,"context_line":""},{"line_number":1815,"context_line":"        :returns: list of ProviderData, string with provider uuid or name"},{"line_number":1816,"context_line":"        \"\"\""},{"line_number":1817,"context_line":"        pid \u003d provider[\"identification\"]"},{"line_number":1818,"context_line":"        provider_id \u003d pid.get(\"uuid\") or pid.get(\"name\")"},{"line_number":1819,"context_line":""},{"line_number":1820,"context_line":"        if provider_id \u003d\u003d \"$COMPUTE_NODE\":"}],"source_content_type":"text/x-python","patch_set":18,"id":"3fa7e38b_79168baa","line":1817,"range":{"start_line":1817,"start_character":7,"end_line":1817,"end_character":40},"in_reply_to":"3fa7e38b_d54a3f25","updated":"2019-10-17 19:32:16.000000000","message":"checked by schema","commit_id":"21fd0ba197db03eaa0b830e0380961e2bfa0e82f"},{"author":{"_account_id":29334,"name":"Dakshina Ilangovan","email":"dakshina.ilangovan@intel.com","username":"dakshinai"},"change_message_id":"3c3c8046e61d4eefd3e2cbd48b229a48959fed18","unresolved":false,"context_lines":[{"line_number":1815,"context_line":"        :returns: list of ProviderData, string with provider uuid or name"},{"line_number":1816,"context_line":"        \"\"\""},{"line_number":1817,"context_line":"        pid \u003d provider[\"identification\"]"},{"line_number":1818,"context_line":"        provider_id \u003d pid.get(\"uuid\") or pid.get(\"name\")"},{"line_number":1819,"context_line":""},{"line_number":1820,"context_line":"        if provider_id \u003d\u003d \"$COMPUTE_NODE\":"},{"line_number":1821,"context_line":"            providers_to_update \u003d [root for root in prov_tree.roots"}],"source_content_type":"text/x-python","patch_set":18,"id":"3fa7e38b_355b93f6","line":1818,"range":{"start_line":1818,"start_character":8,"end_line":1818,"end_character":56},"updated":"2019-10-11 10:28:09.000000000","message":"assuming uuid takes precedence here","commit_id":"21fd0ba197db03eaa0b830e0380961e2bfa0e82f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"356cc53376693c560fda046a9416243fea8ea90e","unresolved":false,"context_lines":[{"line_number":1815,"context_line":"        :returns: list of ProviderData, string with provider uuid or name"},{"line_number":1816,"context_line":"        \"\"\""},{"line_number":1817,"context_line":"        pid \u003d provider[\"identification\"]"},{"line_number":1818,"context_line":"        provider_id \u003d pid.get(\"uuid\") or pid.get(\"name\")"},{"line_number":1819,"context_line":""},{"line_number":1820,"context_line":"        if provider_id \u003d\u003d \"$COMPUTE_NODE\":"},{"line_number":1821,"context_line":"            providers_to_update \u003d [root for root in prov_tree.roots"}],"source_content_type":"text/x-python","patch_set":18,"id":"3fa7e38b_d9245f11","line":1818,"range":{"start_line":1818,"start_character":8,"end_line":1818,"end_character":56},"in_reply_to":"3fa7e38b_355b93f6","updated":"2019-10-17 19:32:16.000000000","message":"Good point, in the previous patch it was the other way around. It doesn\u0027t matter, because the schema won\u0027t allow both to be set, but for consistency it might be better to make them match.","commit_id":"21fd0ba197db03eaa0b830e0380961e2bfa0e82f"},{"author":{"_account_id":29334,"name":"Dakshina Ilangovan","email":"dakshina.ilangovan@intel.com","username":"dakshinai"},"change_message_id":"3c3c8046e61d4eefd3e2cbd48b229a48959fed18","unresolved":false,"context_lines":[{"line_number":1823,"context_line":"                                   not in root.traits]"},{"line_number":1824,"context_line":"        else:"},{"line_number":1825,"context_line":"            try:"},{"line_number":1826,"context_line":"                providers_to_update \u003d [prov_tree.data(provider_id)]"},{"line_number":1827,"context_line":"            except ValueError:"},{"line_number":1828,"context_line":"                providers_to_update \u003d []"},{"line_number":1829,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"3fa7e38b_35107300","line":1826,"range":{"start_line":1826,"start_character":38,"end_line":1826,"end_character":67},"updated":"2019-10-11 10:28:09.000000000","message":"Does this work even with provider_id\u003dname? and should\u0027nt this list be empty since we are not overwriting existing rps form virt driver.\n\nOr are we looking at rewriting changes made by the file and previous steps already check for conflicts","commit_id":"21fd0ba197db03eaa0b830e0380961e2bfa0e82f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"356cc53376693c560fda046a9416243fea8ea90e","unresolved":false,"context_lines":[{"line_number":1823,"context_line":"                                   not in root.traits]"},{"line_number":1824,"context_line":"        else:"},{"line_number":1825,"context_line":"            try:"},{"line_number":1826,"context_line":"                providers_to_update \u003d [prov_tree.data(provider_id)]"},{"line_number":1827,"context_line":"            except ValueError:"},{"line_number":1828,"context_line":"                providers_to_update \u003d []"},{"line_number":1829,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"3fa7e38b_f9591b5b","line":1826,"range":{"start_line":1826,"start_character":38,"end_line":1826,"end_character":67},"in_reply_to":"3fa7e38b_35107300","updated":"2019-10-17 19:32:16.000000000","message":"\u003e Does this work even with provider_id\u003dname?\n\nYes [1].\n\nWe\u0027re only allowing this to update existing providers, not create new ones [2]. But we also need to ignore specified providers that don\u0027t exist here, to account for ironic nodes that got moved to another hash ring -- and that\u0027s what the ValueError below accounts for. Might be worth a debug log at L1828: \"Ignoring %(provider_id)s because it\u0027s not on this host.\" Or if that\u0027s too noisy, at least a comment to that effect.\n\n[1] https://opendev.org/openstack/nova/src/branch/master/nova/compute/provider_tree.py#L445-L446\n[2] https://review.opendev.org/#/c/612497/3/specs/train/approved/provider-config-file.rst@207","commit_id":"21fd0ba197db03eaa0b830e0380961e2bfa0e82f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"356cc53376693c560fda046a9416243fea8ea90e","unresolved":false,"context_lines":[{"line_number":1831,"context_line":"        for provider_to_update in providers_to_update:"},{"line_number":1832,"context_line":"            new_pids.update({provider_to_update.uuid, provider_to_update.name})"},{"line_number":1833,"context_line":""},{"line_number":1834,"context_line":"        # TODO(dustinc): There is still an issue here. If a new provider is"},{"line_number":1835,"context_line":"        #   introduced after the first run and a conflict occurs, it will be"},{"line_number":1836,"context_line":"        #   ignored. This is not desired."},{"line_number":1837,"context_line":"        if self._processed_provider_ids.intersection(new_pids) and startup:"},{"line_number":1838,"context_line":"            message \u003d _(\"Provider %(provider_id)s specified in provider file \""},{"line_number":1839,"context_line":"                        \"%(source_file)s has already been processed.\""}],"source_content_type":"text/x-python","patch_set":18,"id":"3fa7e38b_0b0dbe34","line":1836,"range":{"start_line":1834,"start_character":55,"end_line":1836,"end_character":41},"updated":"2019-10-17 19:32:16.000000000","message":"Yeah, I don\u0027t think you want to be remembering which providers you processed from one run to the next. We want to reassert the file contents if something (human via placement API, or even update_provider_tree) makes a live change to the things the file owns (e.g. removes a trait or removes/changes an inventory).","commit_id":"21fd0ba197db03eaa0b830e0380961e2bfa0e82f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"269a8bc14c814c1b4dcbadda85e7fbb942be6da6","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        # data exists in the provider config files."},{"line_number":164,"context_line":"        self.provider_configs \u003d provider_config.get_provider_configs("},{"line_number":165,"context_line":"            CONF.provider_config_location)"},{"line_number":166,"context_line":"        self._processed_provider_ids \u003d set()"},{"line_number":167,"context_line":"        self._warned_providers \u003d set()"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    @utils.synchronized(COMPUTE_RESOURCE_SEMAPHORE)"}],"source_content_type":"text/x-python","patch_set":21,"id":"3fa7e38b_0c71420d","line":166,"range":{"start_line":166,"start_character":8,"end_line":166,"end_character":44},"updated":"2019-10-18 22:58:48.000000000","message":"As previously mentioned, don\u0027t do this https://review.opendev.org/#/c/676522/18/nova/compute/resource_tracker.py@1834","commit_id":"54ee2f43551696c9fc4edcc613a1e6ba43082e68"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"19ae03d6cf2ece33cdf884cafe6fa901e6b68eac","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        # data exists in the provider config files."},{"line_number":164,"context_line":"        self.provider_configs \u003d provider_config.get_provider_configs("},{"line_number":165,"context_line":"            CONF.provider_config_location)"},{"line_number":166,"context_line":"        self._processed_provider_ids \u003d set()"},{"line_number":167,"context_line":"        self._warned_providers \u003d set()"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    @utils.synchronized(COMPUTE_RESOURCE_SEMAPHORE)"}],"source_content_type":"text/x-python","patch_set":21,"id":"3fa7e38b_ab61fbaa","line":166,"range":{"start_line":166,"start_character":8,"end_line":166,"end_character":44},"in_reply_to":"3fa7e38b_0c71420d","updated":"2019-11-08 14:50:31.000000000","message":"Done","commit_id":"54ee2f43551696c9fc4edcc613a1e6ba43082e68"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"269a8bc14c814c1b4dcbadda85e7fbb942be6da6","unresolved":false,"context_lines":[{"line_number":1768,"context_line":""},{"line_number":1769,"context_line":"        :raises: provider_config.ProviderConfigException"},{"line_number":1770,"context_line":"        \"\"\""},{"line_number":1771,"context_line":"        for provider_data in self.provider_configs:"},{"line_number":1772,"context_line":"            source_file \u003d provider_data[\u0027_source_file\u0027]"},{"line_number":1773,"context_line":""},{"line_number":1774,"context_line":"            additional_traits \u003d provider_data.get(\"traits\", {}"}],"source_content_type":"text/x-python","patch_set":21,"id":"3fa7e38b_0cf86247","line":1771,"range":{"start_line":1771,"start_character":34,"end_line":1771,"end_character":50},"updated":"2019-10-18 22:58:48.000000000","message":"Okay, this is going to be a bit of a ramble...\n\nAs discussed elsewhere, you shouldn\u0027t keep track of which providers you\u0027ve mucked with from one iteration (i.e. RT periodic) to the next, because you need to overwrite every time, in case you\u0027re e.g. editing something update_provider_tree sets up, or \"correcting\" something the admin mucked with out of band via the placement API.\n\nHowever, you *do* need to do the union(provider_configs) duplicate checking that picks up e.g. $name and $uuid of the same provider (which would be missed by your lower-level checks as noted elsewhere).\n\nI was going to say you can do that check just once, on startup... but you really can\u0027t, because we need to account for entire providers appearing/disappearing in prov_tree and even placement between iterations.\n\nSo no, you actually have to do that check once per _merge_provider_configs -- but you have to do it from scratch (not remembering whatever happened on the previous iteration).\n\nBut how do we react if we detect a conflict on not-startup? We can\u0027t blow up the compute process; we either have to ignore that provider *or* use the first one (and the file ordering actually *is* important, as questioned elsewhere). The spec talks vaguely about how to react to this in terms of resource class conflicts [1], but not providers. I\u0027m leaning toward \"sorting is important, use the first one, warn like heck\".\n\nThe logic also needs to account for a \"duplicate\" between $COMPUTE_NODE and $real_name_or_uuid. As discussed elsewhere, such a dup is arguably legit for the ironic driver, but not otherwise. Would it be too much of a hack to detect when we\u0027re using the ironic driver and special-case that? I suspect yes. But perhaps it makes sense to use the same logic of use-the-first-one -- which means an admin using the ironic driver is on the hook to make sure $real_name_or_uuid comes *first* in the processing order if that\u0027s what they meant to do. Yeah, I think that makes sense.\n\nWhatever decisions we make for the above need to be reflected in the spec and docs.\n\n[1] http://specs.openstack.org/openstack/nova-specs/specs/ussuri/approved/provider-config-file.html#provider-config-consumption-from-nova (see Provider Tree Merging)","commit_id":"54ee2f43551696c9fc4edcc613a1e6ba43082e68"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"19ae03d6cf2ece33cdf884cafe6fa901e6b68eac","unresolved":false,"context_lines":[{"line_number":1768,"context_line":""},{"line_number":1769,"context_line":"        :raises: provider_config.ProviderConfigException"},{"line_number":1770,"context_line":"        \"\"\""},{"line_number":1771,"context_line":"        for provider_data in self.provider_configs:"},{"line_number":1772,"context_line":"            source_file \u003d provider_data[\u0027_source_file\u0027]"},{"line_number":1773,"context_line":""},{"line_number":1774,"context_line":"            additional_traits \u003d provider_data.get(\"traits\", {}"}],"source_content_type":"text/x-python","patch_set":21,"id":"3fa7e38b_770f562f","line":1771,"range":{"start_line":1771,"start_character":34,"end_line":1771,"end_character":50},"in_reply_to":"3fa7e38b_0cf86247","updated":"2019-11-08 14:50:31.000000000","message":"Spec update submitted: https://review.opendev.org/#/c/693414/","commit_id":"54ee2f43551696c9fc4edcc613a1e6ba43082e68"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"269a8bc14c814c1b4dcbadda85e7fbb942be6da6","unresolved":false,"context_lines":[{"line_number":1769,"context_line":"        :raises: provider_config.ProviderConfigException"},{"line_number":1770,"context_line":"        \"\"\""},{"line_number":1771,"context_line":"        for provider_data in self.provider_configs:"},{"line_number":1772,"context_line":"            source_file \u003d provider_data[\u0027_source_file\u0027]"},{"line_number":1773,"context_line":""},{"line_number":1774,"context_line":"            additional_traits \u003d provider_data.get(\"traits\", {}"},{"line_number":1775,"context_line":"                                                  ).get(\"additional\", [])"}],"source_content_type":"text/x-python","patch_set":21,"id":"3fa7e38b_acd02e2d","line":1772,"range":{"start_line":1772,"start_character":12,"end_line":1772,"end_character":23},"updated":"2019-10-18 22:58:48.000000000","message":"suggest calling this something more like source_file_name and making it clear in docstrings that its only purpose is to make messages more useful.","commit_id":"54ee2f43551696c9fc4edcc613a1e6ba43082e68"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"19ae03d6cf2ece33cdf884cafe6fa901e6b68eac","unresolved":false,"context_lines":[{"line_number":1769,"context_line":"        :raises: provider_config.ProviderConfigException"},{"line_number":1770,"context_line":"        \"\"\""},{"line_number":1771,"context_line":"        for provider_data in self.provider_configs:"},{"line_number":1772,"context_line":"            source_file \u003d provider_data[\u0027_source_file\u0027]"},{"line_number":1773,"context_line":""},{"line_number":1774,"context_line":"            additional_traits \u003d provider_data.get(\"traits\", {}"},{"line_number":1775,"context_line":"                                                  ).get(\"additional\", [])"}],"source_content_type":"text/x-python","patch_set":21,"id":"3fa7e38b_ae6c9fd0","line":1772,"range":{"start_line":1772,"start_character":12,"end_line":1772,"end_character":23},"in_reply_to":"3fa7e38b_acd02e2d","updated":"2019-11-08 14:50:31.000000000","message":"Done","commit_id":"54ee2f43551696c9fc4edcc613a1e6ba43082e68"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"269a8bc14c814c1b4dcbadda85e7fbb942be6da6","unresolved":false,"context_lines":[{"line_number":1771,"context_line":"        for provider_data in self.provider_configs:"},{"line_number":1772,"context_line":"            source_file \u003d provider_data[\u0027_source_file\u0027]"},{"line_number":1773,"context_line":""},{"line_number":1774,"context_line":"            additional_traits \u003d provider_data.get(\"traits\", {}"},{"line_number":1775,"context_line":"                                                  ).get(\"additional\", [])"},{"line_number":1776,"context_line":"            additional_inventories \u003d provider_data.get(\u0027inventories\u0027, {}"},{"line_number":1777,"context_line":"                                                       ).get(\"additional\", [])"}],"source_content_type":"text/x-python","patch_set":21,"id":"3fa7e38b_4c397a3d","line":1774,"updated":"2019-10-18 22:58:48.000000000","message":"nit, the indent is a bit weird here, suggest putting newline+4space after the (\n\nsimilar below","commit_id":"54ee2f43551696c9fc4edcc613a1e6ba43082e68"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"19ae03d6cf2ece33cdf884cafe6fa901e6b68eac","unresolved":false,"context_lines":[{"line_number":1771,"context_line":"        for provider_data in self.provider_configs:"},{"line_number":1772,"context_line":"            source_file \u003d provider_data[\u0027_source_file\u0027]"},{"line_number":1773,"context_line":""},{"line_number":1774,"context_line":"            additional_traits \u003d provider_data.get(\"traits\", {}"},{"line_number":1775,"context_line":"                                                  ).get(\"additional\", [])"},{"line_number":1776,"context_line":"            additional_inventories \u003d provider_data.get(\u0027inventories\u0027, {}"},{"line_number":1777,"context_line":"                                                       ).get(\"additional\", [])"}],"source_content_type":"text/x-python","patch_set":21,"id":"3fa7e38b_8b5c3ff1","line":1774,"in_reply_to":"3fa7e38b_4c397a3d","updated":"2019-11-08 14:50:31.000000000","message":"Done","commit_id":"54ee2f43551696c9fc4edcc613a1e6ba43082e68"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"269a8bc14c814c1b4dcbadda85e7fbb942be6da6","unresolved":false,"context_lines":[{"line_number":1776,"context_line":"            additional_inventories \u003d provider_data.get(\u0027inventories\u0027, {}"},{"line_number":1777,"context_line":"                                                       ).get(\"additional\", [])"},{"line_number":1778,"context_line":"            providers_to_update \u003d self._get_providers_to_update("},{"line_number":1779,"context_line":"                provider_data, prov_tree, source_file, startup)"},{"line_number":1780,"context_line":""},{"line_number":1781,"context_line":"            updated \u003d False"},{"line_number":1782,"context_line":"            if additional_traits:"}],"source_content_type":"text/x-python","patch_set":21,"id":"3fa7e38b_cc7b2af2","line":1779,"updated":"2019-10-18 22:58:48.000000000","message":"could shortcut here with\n\n if not providers_to_update:\n     continue","commit_id":"54ee2f43551696c9fc4edcc613a1e6ba43082e68"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"19ae03d6cf2ece33cdf884cafe6fa901e6b68eac","unresolved":false,"context_lines":[{"line_number":1776,"context_line":"            additional_inventories \u003d provider_data.get(\u0027inventories\u0027, {}"},{"line_number":1777,"context_line":"                                                       ).get(\"additional\", [])"},{"line_number":1778,"context_line":"            providers_to_update \u003d self._get_providers_to_update("},{"line_number":1779,"context_line":"                provider_data, prov_tree, source_file, startup)"},{"line_number":1780,"context_line":""},{"line_number":1781,"context_line":"            updated \u003d False"},{"line_number":1782,"context_line":"            if additional_traits:"}],"source_content_type":"text/x-python","patch_set":21,"id":"3fa7e38b_2b442b19","line":1779,"in_reply_to":"3fa7e38b_cc7b2af2","updated":"2019-11-08 14:50:31.000000000","message":"Done","commit_id":"54ee2f43551696c9fc4edcc613a1e6ba43082e68"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"269a8bc14c814c1b4dcbadda85e7fbb942be6da6","unresolved":false,"context_lines":[{"line_number":1778,"context_line":"            providers_to_update \u003d self._get_providers_to_update("},{"line_number":1779,"context_line":"                provider_data, prov_tree, source_file, startup)"},{"line_number":1780,"context_line":""},{"line_number":1781,"context_line":"            updated \u003d False"},{"line_number":1782,"context_line":"            if additional_traits:"},{"line_number":1783,"context_line":"                self._merge_traits(providers_to_update,"},{"line_number":1784,"context_line":"                                   additional_traits,"}],"source_content_type":"text/x-python","patch_set":21,"id":"3fa7e38b_6c0b167d","line":1781,"range":{"start_line":1781,"start_character":0,"end_line":1781,"end_character":27},"updated":"2019-10-18 22:58:48.000000000","message":"you don\u0027t really need this...","commit_id":"54ee2f43551696c9fc4edcc613a1e6ba43082e68"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"19ae03d6cf2ece33cdf884cafe6fa901e6b68eac","unresolved":false,"context_lines":[{"line_number":1778,"context_line":"            providers_to_update \u003d self._get_providers_to_update("},{"line_number":1779,"context_line":"                provider_data, prov_tree, source_file, startup)"},{"line_number":1780,"context_line":""},{"line_number":1781,"context_line":"            updated \u003d False"},{"line_number":1782,"context_line":"            if additional_traits:"},{"line_number":1783,"context_line":"                self._merge_traits(providers_to_update,"},{"line_number":1784,"context_line":"                                   additional_traits,"}],"source_content_type":"text/x-python","patch_set":21,"id":"3fa7e38b_eb4db33b","line":1781,"range":{"start_line":1781,"start_character":0,"end_line":1781,"end_character":27},"in_reply_to":"3fa7e38b_6c0b167d","updated":"2019-11-08 14:50:31.000000000","message":"I feel silly now, I knew this was an odd way to do it but was a bit rushed and didn\u0027t think of a better way. Reworked.","commit_id":"54ee2f43551696c9fc4edcc613a1e6ba43082e68"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"269a8bc14c814c1b4dcbadda85e7fbb942be6da6","unresolved":false,"context_lines":[{"line_number":1789,"context_line":"                                        additional_inventories,"},{"line_number":1790,"context_line":"                                        prov_tree, source_file)"},{"line_number":1791,"context_line":"                updated \u003d True"},{"line_number":1792,"context_line":"            if not updated:"},{"line_number":1793,"context_line":"                for provider in providers_to_update:"},{"line_number":1794,"context_line":"                    if provider.uuid not in self._warned_providers:"},{"line_number":1795,"context_line":"                        self._warned_providers.add(provider.uuid)"}],"source_content_type":"text/x-python","patch_set":21,"id":"3fa7e38b_4c22da03","line":1792,"range":{"start_line":1792,"start_character":19,"end_line":1792,"end_character":26},"updated":"2019-10-18 22:58:48.000000000","message":"...you could just say\n\n if not additional_traits and not additional_inventories:","commit_id":"54ee2f43551696c9fc4edcc613a1e6ba43082e68"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"19ae03d6cf2ece33cdf884cafe6fa901e6b68eac","unresolved":false,"context_lines":[{"line_number":1789,"context_line":"                                        additional_inventories,"},{"line_number":1790,"context_line":"                                        prov_tree, source_file)"},{"line_number":1791,"context_line":"                updated \u003d True"},{"line_number":1792,"context_line":"            if not updated:"},{"line_number":1793,"context_line":"                for provider in providers_to_update:"},{"line_number":1794,"context_line":"                    if provider.uuid not in self._warned_providers:"},{"line_number":1795,"context_line":"                        self._warned_providers.add(provider.uuid)"}],"source_content_type":"text/x-python","patch_set":21,"id":"3fa7e38b_6e66a7f1","line":1792,"range":{"start_line":1792,"start_character":19,"end_line":1792,"end_character":26},"in_reply_to":"3fa7e38b_4c22da03","updated":"2019-11-08 14:50:31.000000000","message":"Done","commit_id":"54ee2f43551696c9fc4edcc613a1e6ba43082e68"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fcde36d6713deef1c7ca00e0c93079267a83262d","unresolved":false,"context_lines":[{"line_number":1818,"context_line":"        provider_id \u003d pid.get(\"uuid\") or pid.get(\"name\")"},{"line_number":1819,"context_line":""},{"line_number":1820,"context_line":"        if provider_id \u003d\u003d \"$COMPUTE_NODE\":"},{"line_number":1821,"context_line":"            providers_to_update \u003d [root for root in prov_tree.roots"},{"line_number":1822,"context_line":"                                   if os_traits.MISC_SHARES_VIA_AGGREGATE"},{"line_number":1823,"context_line":"                                   not in root.traits]"},{"line_number":1824,"context_line":"        else:"},{"line_number":1825,"context_line":"            try:"},{"line_number":1826,"context_line":"                providers_to_update \u003d [prov_tree.data(provider_id)]"}],"source_content_type":"text/x-python","patch_set":21,"id":"3fa7e38b_2b599a8d","line":1823,"range":{"start_line":1821,"start_character":35,"end_line":1823,"end_character":53},"updated":"2019-10-17 20:18:02.000000000","message":"Keep an eye on [1] -- once it merges (or you can rebase on top of it) you can just look for roots with the COMPUTE_NODE trait on \u0027em :)\n\n[1] https://review.opendev.org/#/c/688979/","commit_id":"54ee2f43551696c9fc4edcc613a1e6ba43082e68"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"1af6a9f5f108be0c8a4c05e3cfc5b7703c718b79","unresolved":false,"context_lines":[{"line_number":1753,"context_line":""},{"line_number":1754,"context_line":"    def _merge_provider_configs(self, provider_configs, provider_tree):"},{"line_number":1755,"context_line":"        \"\"\"Takes a provider tree and merges any provider configs while"},{"line_number":1756,"context_line":"        checking for conflicts. Any providers in the update that are not"},{"line_number":1757,"context_line":"        present in the tree are logged and ignored as are conflicting"},{"line_number":1758,"context_line":"        inventories on present providers."},{"line_number":1759,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"3fa7e38b_5a8cb734","line":1756,"range":{"start_line":1756,"start_character":8,"end_line":1756,"end_character":30},"updated":"2019-11-08 17:18:49.000000000","message":"No longer true","commit_id":"6d050425f1cef31d59195285acc89a14e8c1972d"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"1af6a9f5f108be0c8a4c05e3cfc5b7703c718b79","unresolved":false,"context_lines":[{"line_number":1783,"context_line":"                                \"%(source_file)s was previously identified, \""},{"line_number":1784,"context_line":"                                \"this entry will be ignored.\""},{"line_number":1785,"context_line":"                                ) % {\"provider_id\": provider.uuid,"},{"line_number":1786,"context_line":"                                     \"source_file\": source_file_name}"},{"line_number":1787,"context_line":"                    LOG.warning(message)"},{"line_number":1788,"context_line":"                    providers_to_update.remove(provider)"},{"line_number":1789,"context_line":"                elif not additional_inventories or additional_traits:"}],"source_content_type":"text/x-python","patch_set":29,"id":"3fa7e38b_da77473b","line":1786,"range":{"start_line":1786,"start_character":52,"end_line":1786,"end_character":68},"updated":"2019-11-08 17:18:49.000000000","message":"mismatched name","commit_id":"6d050425f1cef31d59195285acc89a14e8c1972d"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"1af6a9f5f108be0c8a4c05e3cfc5b7703c718b79","unresolved":false,"context_lines":[{"line_number":1794,"context_line":"                        message \u003d _(\"No updates for provider %(provider_id)s\""},{"line_number":1795,"context_line":"                                    \" from provider file [%(source_file)s].\""},{"line_number":1796,"context_line":"                                    ) % {\"provider_id\": provider.uuid,"},{"line_number":1797,"context_line":"                                         \"source_file\": source_file_name}"},{"line_number":1798,"context_line":"                        LOG.info(message)"},{"line_number":1799,"context_line":"                processed_resource_providers.add(provider.uuid)"},{"line_number":1800,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"3fa7e38b_ba7a8b22","line":1797,"range":{"start_line":1797,"start_character":56,"end_line":1797,"end_character":72},"updated":"2019-11-08 17:18:49.000000000","message":"mismatched name","commit_id":"6d050425f1cef31d59195285acc89a14e8c1972d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cd6d58358ec57823c4cd359d664067e8c2f93590","unresolved":false,"context_lines":[{"line_number":1702,"context_line":"                usage[key] \u003d updates[key]"},{"line_number":1703,"context_line":"        return usage"},{"line_number":1704,"context_line":""},{"line_number":1705,"context_line":"    # TODO(dustinc): This needs more unit test coverage"},{"line_number":1706,"context_line":"    def _merge_provider_configs(self, provider_configs, provider_tree):"},{"line_number":1707,"context_line":"        \"\"\"Takes a provider tree and merges any provider configs. Any"},{"line_number":1708,"context_line":"        providers in the update that are not present in the tree are logged"}],"source_content_type":"text/x-python","patch_set":34,"id":"3fa7e38b_597ce5e9","line":1705,"range":{"start_line":1705,"start_character":0,"end_line":1705,"end_character":55},"updated":"2020-01-13 21:10:24.000000000","message":"?","commit_id":"a0fe17b3104d016424c1667c49df53a73c8c3f42"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"74a28ff102f1e5463526bf8e7bf42be66d17000b","unresolved":false,"context_lines":[{"line_number":1702,"context_line":"                usage[key] \u003d updates[key]"},{"line_number":1703,"context_line":"        return usage"},{"line_number":1704,"context_line":""},{"line_number":1705,"context_line":"    # TODO(dustinc): This needs more unit test coverage"},{"line_number":1706,"context_line":"    def _merge_provider_configs(self, provider_configs, provider_tree):"},{"line_number":1707,"context_line":"        \"\"\"Takes a provider tree and merges any provider configs. Any"},{"line_number":1708,"context_line":"        providers in the update that are not present in the tree are logged"}],"source_content_type":"text/x-python","patch_set":34,"id":"3fa7e38b_857d0e72","line":1705,"range":{"start_line":1705,"start_character":0,"end_line":1705,"end_character":55},"in_reply_to":"3fa7e38b_597ce5e9","updated":"2020-01-14 02:37:38.000000000","message":"Done","commit_id":"a0fe17b3104d016424c1667c49df53a73c8c3f42"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cd6d58358ec57823c4cd359d664067e8c2f93590","unresolved":false,"context_lines":[{"line_number":1714,"context_line":"        :param provider_configs: The provider configs to merge"},{"line_number":1715,"context_line":"        :param provider_tree: The provider tree to be updated in place"},{"line_number":1716,"context_line":"        \"\"\""},{"line_number":1717,"context_line":"        for uuid_or_name in provider_configs:"},{"line_number":1718,"context_line":"            provider_data \u003d provider_configs[uuid_or_name]"},{"line_number":1719,"context_line":"            additional_traits \u003d provider_data.get("},{"line_number":1720,"context_line":"                \"traits\", {}).get(\"additional\", [])"},{"line_number":1721,"context_line":"            additional_inventories \u003d provider_data.get("}],"source_content_type":"text/x-python","patch_set":34,"id":"3fa7e38b_799d2108","line":1718,"range":{"start_line":1717,"start_character":0,"end_line":1718,"end_character":58},"updated":"2020-01-13 21:10:24.000000000","message":"or\n\n for uuid_or_name, provider_data in provider_configs.items():","commit_id":"a0fe17b3104d016424c1667c49df53a73c8c3f42"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"74a28ff102f1e5463526bf8e7bf42be66d17000b","unresolved":false,"context_lines":[{"line_number":1714,"context_line":"        :param provider_configs: The provider configs to merge"},{"line_number":1715,"context_line":"        :param provider_tree: The provider tree to be updated in place"},{"line_number":1716,"context_line":"        \"\"\""},{"line_number":1717,"context_line":"        for uuid_or_name in provider_configs:"},{"line_number":1718,"context_line":"            provider_data \u003d provider_configs[uuid_or_name]"},{"line_number":1719,"context_line":"            additional_traits \u003d provider_data.get("},{"line_number":1720,"context_line":"                \"traits\", {}).get(\"additional\", [])"},{"line_number":1721,"context_line":"            additional_inventories \u003d provider_data.get("}],"source_content_type":"text/x-python","patch_set":34,"id":"3fa7e38b_a5fdaa08","line":1718,"range":{"start_line":1717,"start_character":0,"end_line":1718,"end_character":58},"in_reply_to":"3fa7e38b_799d2108","updated":"2020-01-14 02:37:38.000000000","message":"Done","commit_id":"a0fe17b3104d016424c1667c49df53a73c8c3f42"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cd6d58358ec57823c4cd359d664067e8c2f93590","unresolved":false,"context_lines":[{"line_number":1739,"context_line":"                        continue"},{"line_number":1740,"context_line":""},{"line_number":1741,"context_line":"                # Warn and break out early if there are no updates."},{"line_number":1742,"context_line":"                if not any([additional_inventories, additional_traits]):"},{"line_number":1743,"context_line":"                    # Only warn on first instance of each resource provider"},{"line_number":1744,"context_line":"                    # identified."},{"line_number":1745,"context_line":"                    if provider.uuid not in self._warned_providers:"}],"source_content_type":"text/x-python","patch_set":34,"id":"3fa7e38b_fc401f35","line":1742,"range":{"start_line":1742,"start_character":16,"end_line":1742,"end_character":71},"updated":"2020-01-13 21:10:24.000000000","message":"Hm, why don\u0027t we just do this on initial parsing? The warning would say \u0027$COMPUTE_NODE\u0027 if they had a $COMPUTE_NODE section without any actual changes, which IMO would be clearer than listing the UUID of the provider we inferred from $COMPUTE_NODE. And then we wouldn\u0027t have to keep track of it in self._warned_providers. (We could even omit it from the provider_configs at that time.)","commit_id":"a0fe17b3104d016424c1667c49df53a73c8c3f42"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"74a28ff102f1e5463526bf8e7bf42be66d17000b","unresolved":false,"context_lines":[{"line_number":1739,"context_line":"                        continue"},{"line_number":1740,"context_line":""},{"line_number":1741,"context_line":"                # Warn and break out early if there are no updates."},{"line_number":1742,"context_line":"                if not any([additional_inventories, additional_traits]):"},{"line_number":1743,"context_line":"                    # Only warn on first instance of each resource provider"},{"line_number":1744,"context_line":"                    # identified."},{"line_number":1745,"context_line":"                    if provider.uuid not in self._warned_providers:"}],"source_content_type":"text/x-python","patch_set":34,"id":"3fa7e38b_ff45719c","line":1742,"range":{"start_line":1742,"start_character":16,"end_line":1742,"end_character":71},"in_reply_to":"3fa7e38b_fc401f35","updated":"2020-01-14 02:37:38.000000000","message":"Great suggestion, I will do this.","commit_id":"a0fe17b3104d016424c1667c49df53a73c8c3f42"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cd6d58358ec57823c4cd359d664067e8c2f93590","unresolved":false,"context_lines":[{"line_number":1774,"context_line":"        \"\"\""},{"line_number":1775,"context_line":"        if uuid_or_name \u003d\u003d \"$COMPUTE_NODE\":"},{"line_number":1776,"context_line":"            providers_to_update \u003d [root for root in provider_tree.roots"},{"line_number":1777,"context_line":"                                   if os_traits.MISC_SHARES_VIA_AGGREGATE"},{"line_number":1778,"context_line":"                                   not in root.traits]"},{"line_number":1779,"context_line":"        else:"},{"line_number":1780,"context_line":"            try:"},{"line_number":1781,"context_line":"                providers_to_update \u003d [provider_tree.data(uuid_or_name)]"}],"source_content_type":"text/x-python","patch_set":34,"id":"3fa7e38b_d9521537","line":1778,"range":{"start_line":1777,"start_character":35,"end_line":1778,"end_character":53},"updated":"2020-01-13 21:10:24.000000000","message":"This needs to check for the COMPUTE_NODE trait instead, which is present on compute nodes since [1].\n\n(Even without that, this condition was too broad, as it would pick up child providers for e.g. bandwidth and VGPUs. Those should not be encompassed by $COMPUTE_NODE.)\n\n[1] I4cb9cbe1e02c3f6c6148f73a38d10e8db7e61b1a","commit_id":"a0fe17b3104d016424c1667c49df53a73c8c3f42"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"74a28ff102f1e5463526bf8e7bf42be66d17000b","unresolved":false,"context_lines":[{"line_number":1774,"context_line":"        \"\"\""},{"line_number":1775,"context_line":"        if uuid_or_name \u003d\u003d \"$COMPUTE_NODE\":"},{"line_number":1776,"context_line":"            providers_to_update \u003d [root for root in provider_tree.roots"},{"line_number":1777,"context_line":"                                   if os_traits.MISC_SHARES_VIA_AGGREGATE"},{"line_number":1778,"context_line":"                                   not in root.traits]"},{"line_number":1779,"context_line":"        else:"},{"line_number":1780,"context_line":"            try:"},{"line_number":1781,"context_line":"                providers_to_update \u003d [provider_tree.data(uuid_or_name)]"}],"source_content_type":"text/x-python","patch_set":34,"id":"3fa7e38b_bf605936","line":1778,"range":{"start_line":1777,"start_character":35,"end_line":1778,"end_character":53},"in_reply_to":"3fa7e38b_d9521537","updated":"2020-01-14 02:37:38.000000000","message":"Done","commit_id":"a0fe17b3104d016424c1667c49df53a73c8c3f42"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cd6d58358ec57823c4cd359d664067e8c2f93590","unresolved":false,"context_lines":[{"line_number":1776,"context_line":"            providers_to_update \u003d [root for root in provider_tree.roots"},{"line_number":1777,"context_line":"                                   if os_traits.MISC_SHARES_VIA_AGGREGATE"},{"line_number":1778,"context_line":"                                   not in root.traits]"},{"line_number":1779,"context_line":"        else:"},{"line_number":1780,"context_line":"            try:"},{"line_number":1781,"context_line":"                providers_to_update \u003d [provider_tree.data(uuid_or_name)]"},{"line_number":1782,"context_line":"            except ValueError:"}],"source_content_type":"text/x-python","patch_set":34,"id":"3fa7e38b_b9187983","line":1779,"range":{"start_line":1779,"start_character":8,"end_line":1779,"end_character":12},"updated":"2020-01-13 21:10:24.000000000","message":"You could just `return` above and dedent the rest, since providers_to_update will never be empty for $COMPUTE_NODE. (That would mean the provider tree is empty, which should never happen; if it does it means we called this sucker from the wrong place.)","commit_id":"a0fe17b3104d016424c1667c49df53a73c8c3f42"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"74a28ff102f1e5463526bf8e7bf42be66d17000b","unresolved":false,"context_lines":[{"line_number":1776,"context_line":"            providers_to_update \u003d [root for root in provider_tree.roots"},{"line_number":1777,"context_line":"                                   if os_traits.MISC_SHARES_VIA_AGGREGATE"},{"line_number":1778,"context_line":"                                   not in root.traits]"},{"line_number":1779,"context_line":"        else:"},{"line_number":1780,"context_line":"            try:"},{"line_number":1781,"context_line":"                providers_to_update \u003d [provider_tree.data(uuid_or_name)]"},{"line_number":1782,"context_line":"            except ValueError:"}],"source_content_type":"text/x-python","patch_set":34,"id":"3fa7e38b_5f55a551","line":1779,"range":{"start_line":1779,"start_character":8,"end_line":1779,"end_character":12},"in_reply_to":"3fa7e38b_b9187983","updated":"2020-01-14 02:37:38.000000000","message":"Done","commit_id":"a0fe17b3104d016424c1667c49df53a73c8c3f42"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cd6d58358ec57823c4cd359d664067e8c2f93590","unresolved":false,"context_lines":[{"line_number":1782,"context_line":"            except ValueError:"},{"line_number":1783,"context_line":"                providers_to_update \u003d []"},{"line_number":1784,"context_line":""},{"line_number":1785,"context_line":"        if not providers_to_update:"},{"line_number":1786,"context_line":"            LOG.warning(\"Provider %s specified in provider file %s \""},{"line_number":1787,"context_line":"                        \"does not exist on ProviderTree and will be \""},{"line_number":1788,"context_line":"                        \"ignored.\","}],"source_content_type":"text/x-python","patch_set":34,"id":"3fa7e38b_995c9d59","line":1785,"updated":"2020-01-13 21:10:24.000000000","message":"Should be using _warned_providers here.\n\nBut when we do, we need to be a bit clever about it. Because providers can appear and disappear (in the ironic case, for now; potentially for other cases later), I want to make sure we *also* warn if a previously-absent provider appears, and then *disappears* again later. To be clear:\n\n- provider is absent: warn\n- provider is still absent: don\u0027t warn again\n- provider appears: cool, return it from here\n- provider disappears: *warn again*\n- provider still absent: don\u0027t warn again.\n\netc.\n\nTo make that happen, you\u0027ll want to *remove* it from self._warned_providers (if it was present there) when L1781 succeeds","commit_id":"a0fe17b3104d016424c1667c49df53a73c8c3f42"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"74a28ff102f1e5463526bf8e7bf42be66d17000b","unresolved":false,"context_lines":[{"line_number":1782,"context_line":"            except ValueError:"},{"line_number":1783,"context_line":"                providers_to_update \u003d []"},{"line_number":1784,"context_line":""},{"line_number":1785,"context_line":"        if not providers_to_update:"},{"line_number":1786,"context_line":"            LOG.warning(\"Provider %s specified in provider file %s \""},{"line_number":1787,"context_line":"                        \"does not exist on ProviderTree and will be \""},{"line_number":1788,"context_line":"                        \"ignored.\","}],"source_content_type":"text/x-python","patch_set":34,"id":"3fa7e38b_1f4f2dc0","line":1785,"in_reply_to":"3fa7e38b_995c9d59","updated":"2020-01-14 02:37:38.000000000","message":"Done","commit_id":"a0fe17b3104d016424c1667c49df53a73c8c3f42"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"baf9679acffbcda245bdf666dd1b5781255cc54f","unresolved":false,"context_lines":[{"line_number":1758,"context_line":"        :returns: list of ProviderData"},{"line_number":1759,"context_line":"        \"\"\""},{"line_number":1760,"context_line":"        if uuid_or_name \u003d\u003d \"$COMPUTE_NODE\":"},{"line_number":1761,"context_line":"            return [root for root in provider_tree.roots"},{"line_number":1762,"context_line":"                    if os_traits.COMPUTE_NODE in root.traits]"},{"line_number":1763,"context_line":"        try:"},{"line_number":1764,"context_line":"            providers_to_update \u003d [provider_tree.data(uuid_or_name)]"}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_c8b548f2","line":1761,"range":{"start_line":1761,"start_character":20,"end_line":1761,"end_character":56},"updated":"2020-01-14 22:38:38.000000000","message":"Sorry, just noticed this is returning a list of _Provider rather than ProviderData.\n\n(nts: which probably means the tests are missing/wrong for this case)\n\nI think you can get away with\n\n [root.data() for root in ...]","commit_id":"76f4166c0873d92c575f81fb0e72f612dde650be"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"1c29b855be85e13066022764832c9c95e8859a10","unresolved":false,"context_lines":[{"line_number":1758,"context_line":"        :returns: list of ProviderData"},{"line_number":1759,"context_line":"        \"\"\""},{"line_number":1760,"context_line":"        if uuid_or_name \u003d\u003d \"$COMPUTE_NODE\":"},{"line_number":1761,"context_line":"            return [root for root in provider_tree.roots"},{"line_number":1762,"context_line":"                    if os_traits.COMPUTE_NODE in root.traits]"},{"line_number":1763,"context_line":"        try:"},{"line_number":1764,"context_line":"            providers_to_update \u003d [provider_tree.data(uuid_or_name)]"}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_f961f411","line":1761,"range":{"start_line":1761,"start_character":20,"end_line":1761,"end_character":56},"in_reply_to":"3fa7e38b_c8b548f2","updated":"2020-01-15 06:23:53.000000000","message":"Done","commit_id":"76f4166c0873d92c575f81fb0e72f612dde650be"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"baf9679acffbcda245bdf666dd1b5781255cc54f","unresolved":false,"context_lines":[{"line_number":1762,"context_line":"                    if os_traits.COMPUTE_NODE in root.traits]"},{"line_number":1763,"context_line":"        try:"},{"line_number":1764,"context_line":"            providers_to_update \u003d [provider_tree.data(uuid_or_name)]"},{"line_number":1765,"context_line":"            self._absent_providers.discard(uuid_or_name)"},{"line_number":1766,"context_line":"        except ValueError:"},{"line_number":1767,"context_line":"            providers_to_update \u003d []"},{"line_number":1768,"context_line":"            if uuid_or_name not in self._absent_providers:"}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_08c3605a","line":1765,"range":{"start_line":1765,"start_character":0,"end_line":1765,"end_character":56},"updated":"2020-01-14 22:38:38.000000000","message":"would be worth a NOTE here explaining why we\u0027re doing this (i.e. so we re-warn if this provider disappears again later)","commit_id":"76f4166c0873d92c575f81fb0e72f612dde650be"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"1c29b855be85e13066022764832c9c95e8859a10","unresolved":false,"context_lines":[{"line_number":1762,"context_line":"                    if os_traits.COMPUTE_NODE in root.traits]"},{"line_number":1763,"context_line":"        try:"},{"line_number":1764,"context_line":"            providers_to_update \u003d [provider_tree.data(uuid_or_name)]"},{"line_number":1765,"context_line":"            self._absent_providers.discard(uuid_or_name)"},{"line_number":1766,"context_line":"        except ValueError:"},{"line_number":1767,"context_line":"            providers_to_update \u003d []"},{"line_number":1768,"context_line":"            if uuid_or_name not in self._absent_providers:"}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_d9451874","line":1765,"range":{"start_line":1765,"start_character":0,"end_line":1765,"end_character":56},"in_reply_to":"3fa7e38b_08c3605a","updated":"2020-01-15 06:23:53.000000000","message":"Done","commit_id":"76f4166c0873d92c575f81fb0e72f612dde650be"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"baf9679acffbcda245bdf666dd1b5781255cc54f","unresolved":false,"context_lines":[{"line_number":1766,"context_line":"        except ValueError:"},{"line_number":1767,"context_line":"            providers_to_update \u003d []"},{"line_number":1768,"context_line":"            if uuid_or_name not in self._absent_providers:"},{"line_number":1769,"context_line":"                LOG.warning(\"Provider %s specified in provider file %s \""},{"line_number":1770,"context_line":"                            \"does not exist on ProviderTree and will be \""},{"line_number":1771,"context_line":"                            \"ignored.\","},{"line_number":1772,"context_line":"                            uuid_or_name, source_file)"}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_2895fc3d","line":1769,"range":{"start_line":1769,"start_character":54,"end_line":1769,"end_character":67},"updated":"2020-01-14 22:38:38.000000000","message":"provider config file","commit_id":"76f4166c0873d92c575f81fb0e72f612dde650be"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"1c29b855be85e13066022764832c9c95e8859a10","unresolved":false,"context_lines":[{"line_number":1766,"context_line":"        except ValueError:"},{"line_number":1767,"context_line":"            providers_to_update \u003d []"},{"line_number":1768,"context_line":"            if uuid_or_name not in self._absent_providers:"},{"line_number":1769,"context_line":"                LOG.warning(\"Provider %s specified in provider file %s \""},{"line_number":1770,"context_line":"                            \"does not exist on ProviderTree and will be \""},{"line_number":1771,"context_line":"                            \"ignored.\","},{"line_number":1772,"context_line":"                            uuid_or_name, source_file)"}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_f94a5480","line":1769,"range":{"start_line":1769,"start_character":54,"end_line":1769,"end_character":67},"in_reply_to":"3fa7e38b_2895fc3d","updated":"2020-01-15 06:23:53.000000000","message":"Done","commit_id":"76f4166c0873d92c575f81fb0e72f612dde650be"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"baf9679acffbcda245bdf666dd1b5781255cc54f","unresolved":false,"context_lines":[{"line_number":1767,"context_line":"            providers_to_update \u003d []"},{"line_number":1768,"context_line":"            if uuid_or_name not in self._absent_providers:"},{"line_number":1769,"context_line":"                LOG.warning(\"Provider %s specified in provider file %s \""},{"line_number":1770,"context_line":"                            \"does not exist on ProviderTree and will be \""},{"line_number":1771,"context_line":"                            \"ignored.\","},{"line_number":1772,"context_line":"                            uuid_or_name, source_file)"},{"line_number":1773,"context_line":"                self._absent_providers.add(uuid_or_name)"}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_688bf421","line":1770,"range":{"start_line":1770,"start_character":44,"end_line":1770,"end_character":46},"updated":"2020-01-14 22:38:38.000000000","message":"nit: in","commit_id":"76f4166c0873d92c575f81fb0e72f612dde650be"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"1c29b855be85e13066022764832c9c95e8859a10","unresolved":false,"context_lines":[{"line_number":1767,"context_line":"            providers_to_update \u003d []"},{"line_number":1768,"context_line":"            if uuid_or_name not in self._absent_providers:"},{"line_number":1769,"context_line":"                LOG.warning(\"Provider %s specified in provider file %s \""},{"line_number":1770,"context_line":"                            \"does not exist on ProviderTree and will be \""},{"line_number":1771,"context_line":"                            \"ignored.\","},{"line_number":1772,"context_line":"                            uuid_or_name, source_file)"},{"line_number":1773,"context_line":"                self._absent_providers.add(uuid_or_name)"}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_993fa0de","line":1770,"range":{"start_line":1770,"start_character":44,"end_line":1770,"end_character":46},"in_reply_to":"3fa7e38b_688bf421","updated":"2020-01-15 06:23:53.000000000","message":"Done","commit_id":"76f4166c0873d92c575f81fb0e72f612dde650be"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"dc4aad82dfa595746313a3dcef3da98ba2f00161","unresolved":false,"context_lines":[{"line_number":1712,"context_line":"        :param provider_configs: The provider configs to merge"},{"line_number":1713,"context_line":"        :param provider_tree: The provider tree to be updated in place"},{"line_number":1714,"context_line":"        \"\"\""},{"line_number":1715,"context_line":"        for uuid_or_name, provider_data in provider_configs.items():"},{"line_number":1716,"context_line":"            additional_traits \u003d provider_data.get("},{"line_number":1717,"context_line":"                \"traits\", {}).get(\"additional\", [])"},{"line_number":1718,"context_line":"            additional_inventories \u003d provider_data.get("}],"source_content_type":"text/x-python","patch_set":41,"id":"3fa7e38b_4c6105a8","line":1715,"range":{"start_line":1715,"start_character":8,"end_line":1715,"end_character":68},"updated":"2020-01-21 22:54:26.000000000","message":"Following on from [1], I think we\u0027re missing checks for providers specified explicitly by both UUID and name in the config.\n\nI feel like we\u0027ve talked this through before, and maybe even landed on \"we don\u0027t need that\", but I want to go through it again to make sure.\n\nI think there are three main cases we need to account for:\n- Ironic node (root) providers. We get these for cheap via [2] because name\u003d\u003duuid. But these can appear/disappear from one iteration to the next.\n- The (single) compute node root provider in the non-ironic case. We can\u0027t check this until runtime because there\u0027s no way to predict what name will go with what UUID. However, unlike ironic nodes and child providers (below), this is guaranteed to exist in the provider_tree by the time we get here, and it\u0027s guaranteed never to go away while we\u0027re watching.\n- Non-root providers (bw, pgpu, accel). Also can\u0027t check until runtime; but these *can* appear/disappear (I think -- see comment @L1766).\n\nPretty sure we decided that we would detect conflicts for non-root providers at runtime, warn, and then ignore them. They should be subject to the same warn-once logic as for the no-op entries.\n\nFor non-ironic compute nodes, we want to be able to fail nova-compute startup when we find a name/uuid conflict. I think we can do this by adding a check for the COMPUTE_NODE trait. We can get away with that only because we can rely on the compute node RP not appearing and disappearing on us.\n\nSo in summary, I think we need this method to (locally) track the *UUIDs* of all providers from the config as we find them (by name *or* UUID) in the provider_tree. If we hit a dup, we check whether it\u0027s a COMPUTE_NODE. If it is, fail hard. If it isn\u0027t, warn-once. (That will mean keeping track of providers thus warned in a fashion similar to _absent_providers. You may even be able to combine into a single self._warned_providers. Not sure.)\n\n[1] https://review.opendev.org/#/c/676029/34/nova/compute/provider_config.py@218\n[2] https://review.opendev.org/#/c/676029/34/nova/compute/provider_config.py@218","commit_id":"34318c6b8be57e62147915e67daacc8f848681cb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9b0e050914bb1cc130513b5ec2ce774a921586bb","unresolved":false,"context_lines":[{"line_number":1727,"context_line":"                uuid_or_name, provider_tree, source_file_name)"},{"line_number":1728,"context_line":""},{"line_number":1729,"context_line":"            for provider in providers_to_update:"},{"line_number":1730,"context_line":"                # If this is for UUID\u003d$COMPUTE_NODE, check if provider is also"},{"line_number":1731,"context_line":"                # explicitly identified. If it is, skip updating it with the"},{"line_number":1732,"context_line":"                # $COMPUTE_NODE entry data."},{"line_number":1733,"context_line":"                if uuid_or_name \u003d\u003d \"$COMPUTE_NODE\":"},{"line_number":1734,"context_line":"                    if any(_pid in provider_configs"},{"line_number":1735,"context_line":"                           for _pid in [provider.name, provider.uuid]):"}],"source_content_type":"text/x-python","patch_set":41,"id":"3fa7e38b_b964a7e7","line":1732,"range":{"start_line":1730,"start_character":0,"end_line":1732,"end_character":43},"updated":"2020-01-17 20:57:51.000000000","message":"This semantic is not documented in the schema.","commit_id":"34318c6b8be57e62147915e67daacc8f848681cb"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"97456761e0c64d964b88f785b4e236ad1e8eab3a","unresolved":false,"context_lines":[{"line_number":1727,"context_line":"                uuid_or_name, provider_tree, source_file_name)"},{"line_number":1728,"context_line":""},{"line_number":1729,"context_line":"            for provider in providers_to_update:"},{"line_number":1730,"context_line":"                # If this is for UUID\u003d$COMPUTE_NODE, check if provider is also"},{"line_number":1731,"context_line":"                # explicitly identified. If it is, skip updating it with the"},{"line_number":1732,"context_line":"                # $COMPUTE_NODE entry data."},{"line_number":1733,"context_line":"                if uuid_or_name \u003d\u003d \"$COMPUTE_NODE\":"},{"line_number":1734,"context_line":"                    if any(_pid in provider_configs"},{"line_number":1735,"context_line":"                           for _pid in [provider.name, provider.uuid]):"}],"source_content_type":"text/x-python","patch_set":41,"id":"1fa4df85_32ad77ea","line":1732,"range":{"start_line":1730,"start_character":0,"end_line":1732,"end_character":43},"in_reply_to":"3fa7e38b_89a04f38","updated":"2020-03-12 14:26:10.000000000","message":"i think i have now documented this in the latest revision.","commit_id":"34318c6b8be57e62147915e67daacc8f848681cb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"dc4aad82dfa595746313a3dcef3da98ba2f00161","unresolved":false,"context_lines":[{"line_number":1727,"context_line":"                uuid_or_name, provider_tree, source_file_name)"},{"line_number":1728,"context_line":""},{"line_number":1729,"context_line":"            for provider in providers_to_update:"},{"line_number":1730,"context_line":"                # If this is for UUID\u003d$COMPUTE_NODE, check if provider is also"},{"line_number":1731,"context_line":"                # explicitly identified. If it is, skip updating it with the"},{"line_number":1732,"context_line":"                # $COMPUTE_NODE entry data."},{"line_number":1733,"context_line":"                if uuid_or_name \u003d\u003d \"$COMPUTE_NODE\":"},{"line_number":1734,"context_line":"                    if any(_pid in provider_configs"},{"line_number":1735,"context_line":"                           for _pid in [provider.name, provider.uuid]):"}],"source_content_type":"text/x-python","patch_set":41,"id":"3fa7e38b_89a04f38","line":1732,"range":{"start_line":1730,"start_character":0,"end_line":1732,"end_character":43},"in_reply_to":"3fa7e38b_b964a7e7","updated":"2020-01-21 22:54:26.000000000","message":"nts: gibi means https://review.opendev.org/#/c/673341/37/nova/compute/provider_config_schemas/provider_config_schema_v1.yaml@60","commit_id":"34318c6b8be57e62147915e67daacc8f848681cb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9b0e050914bb1cc130513b5ec2ce774a921586bb","unresolved":false,"context_lines":[{"line_number":1732,"context_line":"                # $COMPUTE_NODE entry data."},{"line_number":1733,"context_line":"                if uuid_or_name \u003d\u003d \"$COMPUTE_NODE\":"},{"line_number":1734,"context_line":"                    if any(_pid in provider_configs"},{"line_number":1735,"context_line":"                           for _pid in [provider.name, provider.uuid]):"},{"line_number":1736,"context_line":"                        continue"},{"line_number":1737,"context_line":""},{"line_number":1738,"context_line":"                if additional_traits:"}],"source_content_type":"text/x-python","patch_set":41,"id":"3fa7e38b_19a37b01","line":1735,"range":{"start_line":1735,"start_character":40,"end_line":1735,"end_character":68},"updated":"2020-01-17 20:57:51.000000000","message":"This kind of ambiguity can be removed by resolving every name to uuid in the config early in the semantic processing.","commit_id":"34318c6b8be57e62147915e67daacc8f848681cb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e9e72499aee89e7b12e54a983198eaca029228d9","unresolved":false,"context_lines":[{"line_number":1732,"context_line":"                # $COMPUTE_NODE entry data."},{"line_number":1733,"context_line":"                if uuid_or_name \u003d\u003d \"$COMPUTE_NODE\":"},{"line_number":1734,"context_line":"                    if any(_pid in provider_configs"},{"line_number":1735,"context_line":"                           for _pid in [provider.name, provider.uuid]):"},{"line_number":1736,"context_line":"                        continue"},{"line_number":1737,"context_line":""},{"line_number":1738,"context_line":"                if additional_traits:"}],"source_content_type":"text/x-python","patch_set":41,"id":"3fa7e38b_dc1a5569","line":1735,"range":{"start_line":1735,"start_character":40,"end_line":1735,"end_character":68},"in_reply_to":"3fa7e38b_0980dfbd","updated":"2020-01-24 15:20:57.000000000","message":"Yeah, now I see that it was a rushed comment from my side. I think I needed my experiment to see that resolving identification methods early is not really possible. See my comment about my experiment in https://review.opendev.org/#/c/676029/34/nova/compute/provider_config.py@218","commit_id":"34318c6b8be57e62147915e67daacc8f848681cb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"dc4aad82dfa595746313a3dcef3da98ba2f00161","unresolved":false,"context_lines":[{"line_number":1732,"context_line":"                # $COMPUTE_NODE entry data."},{"line_number":1733,"context_line":"                if uuid_or_name \u003d\u003d \"$COMPUTE_NODE\":"},{"line_number":1734,"context_line":"                    if any(_pid in provider_configs"},{"line_number":1735,"context_line":"                           for _pid in [provider.name, provider.uuid]):"},{"line_number":1736,"context_line":"                        continue"},{"line_number":1737,"context_line":""},{"line_number":1738,"context_line":"                if additional_traits:"}],"source_content_type":"text/x-python","patch_set":41,"id":"3fa7e38b_0980dfbd","line":1735,"range":{"start_line":1735,"start_character":40,"end_line":1735,"end_character":68},"in_reply_to":"3fa7e38b_19a37b01","updated":"2020-01-21 22:54:26.000000000","message":"Earlier than here? Remember, providers can appear and disappear. The compute node providers are special, but child providers (bw, vgpu, accel, etc.) could conceivably come and go.\n\n[Later] See note at @L1715 above. \"Earlier\" like there.","commit_id":"34318c6b8be57e62147915e67daacc8f848681cb"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"97456761e0c64d964b88f785b4e236ad1e8eab3a","unresolved":false,"context_lines":[{"line_number":1732,"context_line":"                # $COMPUTE_NODE entry data."},{"line_number":1733,"context_line":"                if uuid_or_name \u003d\u003d \"$COMPUTE_NODE\":"},{"line_number":1734,"context_line":"                    if any(_pid in provider_configs"},{"line_number":1735,"context_line":"                           for _pid in [provider.name, provider.uuid]):"},{"line_number":1736,"context_line":"                        continue"},{"line_number":1737,"context_line":""},{"line_number":1738,"context_line":"                if additional_traits:"}],"source_content_type":"text/x-python","patch_set":41,"id":"1fa4df85_f2e4bf3e","line":1735,"range":{"start_line":1735,"start_character":40,"end_line":1735,"end_character":68},"in_reply_to":"3fa7e38b_dc1a5569","updated":"2020-03-12 14:26:10.000000000","message":"im not going to alther this for now.\ni started with creating a name to uuid mapping and a uuid to config file mapping  but if we are processing it at this point i realised we only need the latter.\n\nsince i can exclusively use the uuid at this point if i keep track of every uuid i have already processed.","commit_id":"34318c6b8be57e62147915e67daacc8f848681cb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9b0e050914bb1cc130513b5ec2ce774a921586bb","unresolved":false,"context_lines":[{"line_number":1741,"context_line":"                if additional_inventories:"},{"line_number":1742,"context_line":"                    merged_inventory \u003d provider.inventory"},{"line_number":1743,"context_line":"                    for inventory in additional_inventories:"},{"line_number":1744,"context_line":"                        merged_inventory.update(inventory)"},{"line_number":1745,"context_line":"                    provider_tree.update_inventory(provider.uuid,"},{"line_number":1746,"context_line":"                                                   merged_inventory)"},{"line_number":1747,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"3fa7e38b_d98de37d","line":1744,"updated":"2020-01-17 20:57:51.000000000","message":"Do we want to allow overwriting existing inventory of a resource class from provider config or only allow adding inventories of new resource classes?","commit_id":"34318c6b8be57e62147915e67daacc8f848681cb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e9e72499aee89e7b12e54a983198eaca029228d9","unresolved":false,"context_lines":[{"line_number":1741,"context_line":"                if additional_inventories:"},{"line_number":1742,"context_line":"                    merged_inventory \u003d provider.inventory"},{"line_number":1743,"context_line":"                    for inventory in additional_inventories:"},{"line_number":1744,"context_line":"                        merged_inventory.update(inventory)"},{"line_number":1745,"context_line":"                    provider_tree.update_inventory(provider.uuid,"},{"line_number":1746,"context_line":"                                                   merged_inventory)"},{"line_number":1747,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"3fa7e38b_9c385dd4","line":1744,"in_reply_to":"3fa7e38b_89160fa1","updated":"2020-01-24 15:20:57.000000000","message":"agree with both of your conclusions.","commit_id":"34318c6b8be57e62147915e67daacc8f848681cb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"dc4aad82dfa595746313a3dcef3da98ba2f00161","unresolved":false,"context_lines":[{"line_number":1741,"context_line":"                if additional_inventories:"},{"line_number":1742,"context_line":"                    merged_inventory \u003d provider.inventory"},{"line_number":1743,"context_line":"                    for inventory in additional_inventories:"},{"line_number":1744,"context_line":"                        merged_inventory.update(inventory)"},{"line_number":1745,"context_line":"                    provider_tree.update_inventory(provider.uuid,"},{"line_number":1746,"context_line":"                                                   merged_inventory)"},{"line_number":1747,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"3fa7e38b_89160fa1","line":1744,"in_reply_to":"3fa7e38b_d98de37d","updated":"2020-01-21 22:54:26.000000000","message":"Had to remind myself via the spec: we\u0027re supposed to only allow adding inventories. We\u0027re supposed to be checking the provider tree that comes out of update_provider_tree and punting if any of the resource classes overlap with what\u0027s in the config. That\u0027s repeatable because update_provider_tree is supposed to reset each time to just the inventories the virt driver is responsible for.\n\nAnd indeed, that check isn\u0027t in place yet. Needs to be added.\n\nNot sure whether we need to be as strict about traits. I think we decided we do. At first I was going to say we should be lenient to accommodate admins adding custom traits manually; but I think we ended up deciding that we should force them to do it all one way or the other, not mix and match.","commit_id":"34318c6b8be57e62147915e67daacc8f848681cb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9b0e050914bb1cc130513b5ec2ce774a921586bb","unresolved":false,"context_lines":[{"line_number":1761,"context_line":"                    if os_traits.COMPUTE_NODE in root.traits]"},{"line_number":1762,"context_line":"        try:"},{"line_number":1763,"context_line":"            providers_to_update \u003d [provider_tree.data(uuid_or_name)]"},{"line_number":1764,"context_line":"            # Remove the provider from absent provider list so we can re-warn"},{"line_number":1765,"context_line":"            # if the provider disappears later"},{"line_number":1766,"context_line":"            self._absent_providers.discard(uuid_or_name)"},{"line_number":1767,"context_line":"        except ValueError:"},{"line_number":1768,"context_line":"            providers_to_update \u003d []"},{"line_number":1769,"context_line":"            if uuid_or_name not in self._absent_providers:"}],"source_content_type":"text/x-python","patch_set":41,"id":"3fa7e38b_19ca9b9f","line":1766,"range":{"start_line":1764,"start_character":0,"end_line":1766,"end_character":56},"updated":"2020-01-17 20:57:51.000000000","message":"Does the ResourceTracker re-applies the config periodically? If yes, why? If no then how can this dissappearing can happen?","commit_id":"34318c6b8be57e62147915e67daacc8f848681cb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b3c64c4aef892df16e00c8bbea229869f33faca1","unresolved":false,"context_lines":[{"line_number":1761,"context_line":"                    if os_traits.COMPUTE_NODE in root.traits]"},{"line_number":1762,"context_line":"        try:"},{"line_number":1763,"context_line":"            providers_to_update \u003d [provider_tree.data(uuid_or_name)]"},{"line_number":1764,"context_line":"            # Remove the provider from absent provider list so we can re-warn"},{"line_number":1765,"context_line":"            # if the provider disappears later"},{"line_number":1766,"context_line":"            self._absent_providers.discard(uuid_or_name)"},{"line_number":1767,"context_line":"        except ValueError:"},{"line_number":1768,"context_line":"            providers_to_update \u003d []"},{"line_number":1769,"context_line":"            if uuid_or_name not in self._absent_providers:"}],"source_content_type":"text/x-python","patch_set":41,"id":"1fa4df85_8df449d1","line":1766,"range":{"start_line":1764,"start_character":0,"end_line":1766,"end_character":56},"in_reply_to":"1fa4df85_8dcf6eaf","updated":"2020-03-12 17:50:45.000000000","message":"I\u0027m not sure what you mean by \"modify the providers descriptor\".\n\nIf you want to make RDT-via-child-providers work with the current design, you\u0027re going to have to manage the creation/deletion of the child providers outside of nova, like cyborg is doing for accels. Having done that, the provider config can tweak inventories and traits -- which means your outside agent shouldn\u0027t do those things; else thrashing.\n\nThe point of this chunk of code, though, is that your outside agent can decide to add and remove the child provider on the fly, and nova-compute will handle that gracefully *without* a restart.\n\nNot sure if this addresses your concern...","commit_id":"34318c6b8be57e62147915e67daacc8f848681cb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"dc4aad82dfa595746313a3dcef3da98ba2f00161","unresolved":false,"context_lines":[{"line_number":1761,"context_line":"                    if os_traits.COMPUTE_NODE in root.traits]"},{"line_number":1762,"context_line":"        try:"},{"line_number":1763,"context_line":"            providers_to_update \u003d [provider_tree.data(uuid_or_name)]"},{"line_number":1764,"context_line":"            # Remove the provider from absent provider list so we can re-warn"},{"line_number":1765,"context_line":"            # if the provider disappears later"},{"line_number":1766,"context_line":"            self._absent_providers.discard(uuid_or_name)"},{"line_number":1767,"context_line":"        except ValueError:"},{"line_number":1768,"context_line":"            providers_to_update \u003d []"},{"line_number":1769,"context_line":"            if uuid_or_name not in self._absent_providers:"}],"source_content_type":"text/x-python","patch_set":41,"id":"3fa7e38b_e9a9c377","line":1766,"range":{"start_line":1764,"start_character":0,"end_line":1766,"end_character":56},"in_reply_to":"3fa7e38b_19ca9b9f","updated":"2020-01-21 22:54:26.000000000","message":"Yes, the RT loads the config once, but applies it on every iteration of update_available_resource.\n\nProviders can disappear/reappear in a couple of cases:\n- When the ironic virt driver is in play (e.g. hash ring rebalance)\n- Pretty sure child providers can come and go. For example, aren\u0027t bandwidth providers managed by neutron in such a way that they can appear/disappear with a restart of neutron (but not nova-compute)? Likewise accelerators, soon.","commit_id":"34318c6b8be57e62147915e67daacc8f848681cb"},{"author":{"_account_id":30001,"name":"Ivens Zambrano","email":"ivens.zambrano@intel.com","username":"IvensZambrano"},"change_message_id":"f7a958dabe8840afdcb16d8cf8ca0a7f7c318835","unresolved":false,"context_lines":[{"line_number":1761,"context_line":"                    if os_traits.COMPUTE_NODE in root.traits]"},{"line_number":1762,"context_line":"        try:"},{"line_number":1763,"context_line":"            providers_to_update \u003d [provider_tree.data(uuid_or_name)]"},{"line_number":1764,"context_line":"            # Remove the provider from absent provider list so we can re-warn"},{"line_number":1765,"context_line":"            # if the provider disappears later"},{"line_number":1766,"context_line":"            self._absent_providers.discard(uuid_or_name)"},{"line_number":1767,"context_line":"        except ValueError:"},{"line_number":1768,"context_line":"            providers_to_update \u003d []"},{"line_number":1769,"context_line":"            if uuid_or_name not in self._absent_providers:"}],"source_content_type":"text/x-python","patch_set":41,"id":"3fa7e38b_a4be22cc","line":1766,"range":{"start_line":1764,"start_character":0,"end_line":1766,"end_character":56},"in_reply_to":"3fa7e38b_5c43c540","updated":"2020-01-29 22:46:57.000000000","message":"@Eric, Does cache ways in RDT qualify as \"reconfigurable\" child provider? if we modify the providers descriptor would tat be captured as a change of child provider count/presence?","commit_id":"34318c6b8be57e62147915e67daacc8f848681cb"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"97456761e0c64d964b88f785b4e236ad1e8eab3a","unresolved":false,"context_lines":[{"line_number":1761,"context_line":"                    if os_traits.COMPUTE_NODE in root.traits]"},{"line_number":1762,"context_line":"        try:"},{"line_number":1763,"context_line":"            providers_to_update \u003d [provider_tree.data(uuid_or_name)]"},{"line_number":1764,"context_line":"            # Remove the provider from absent provider list so we can re-warn"},{"line_number":1765,"context_line":"            # if the provider disappears later"},{"line_number":1766,"context_line":"            self._absent_providers.discard(uuid_or_name)"},{"line_number":1767,"context_line":"        except ValueError:"},{"line_number":1768,"context_line":"            providers_to_update \u003d []"},{"line_number":1769,"context_line":"            if uuid_or_name not in self._absent_providers:"}],"source_content_type":"text/x-python","patch_set":41,"id":"1fa4df85_8dcf6eaf","line":1766,"range":{"start_line":1764,"start_character":0,"end_line":1766,"end_character":56},"in_reply_to":"3fa7e38b_a4be22cc","updated":"2020-03-12 14:26:10.000000000","message":"am kind of but it would only be updated after an agent restart.\n\nso its static form the point of view of the resource tracker but you could modify it and then restart the compute service however if you do so you should ensure that that you dont violate any current allcoations.","commit_id":"34318c6b8be57e62147915e67daacc8f848681cb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e9e72499aee89e7b12e54a983198eaca029228d9","unresolved":false,"context_lines":[{"line_number":1761,"context_line":"                    if os_traits.COMPUTE_NODE in root.traits]"},{"line_number":1762,"context_line":"        try:"},{"line_number":1763,"context_line":"            providers_to_update \u003d [provider_tree.data(uuid_or_name)]"},{"line_number":1764,"context_line":"            # Remove the provider from absent provider list so we can re-warn"},{"line_number":1765,"context_line":"            # if the provider disappears later"},{"line_number":1766,"context_line":"            self._absent_providers.discard(uuid_or_name)"},{"line_number":1767,"context_line":"        except ValueError:"},{"line_number":1768,"context_line":"            providers_to_update \u003d []"},{"line_number":1769,"context_line":"            if uuid_or_name not in self._absent_providers:"}],"source_content_type":"text/x-python","patch_set":41,"id":"3fa7e38b_5c43c540","line":1766,"range":{"start_line":1764,"start_character":0,"end_line":1766,"end_character":56},"in_reply_to":"3fa7e38b_e9a9c377","updated":"2020-01-24 15:20:57.000000000","message":"Big thanks for the explanation. I missed these cases. Yes, reconfiguration and restart of neutron-agent can lead to providers appearing disappearing under the root provider. I\u0027m glad you guys thought this through.","commit_id":"34318c6b8be57e62147915e67daacc8f848681cb"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3dddb99186ecbf6fb29b93f8d51836cc8dcb4c49","unresolved":false,"context_lines":[{"line_number":1726,"context_line":"            providers_to_update \u003d self._get_providers_to_update("},{"line_number":1727,"context_line":"                uuid_or_name, provider_tree, source_file_name)"},{"line_number":1728,"context_line":""},{"line_number":1729,"context_line":"            # progressively build a mapping of all provider names to"},{"line_number":1730,"context_line":"            # provider UUIDs."},{"line_number":1731,"context_line":"            for provider in providers_to_update:"},{"line_number":1732,"context_line":"                provider_name_uuid_map[provider.name] \u003d provider.uuid"},{"line_number":1733,"context_line":""},{"line_number":1734,"context_line":"            for provider in providers_to_update:"},{"line_number":1735,"context_line":"                # If this is for UUID\u003d$COMPUTE_NODE, check if provider is also"}],"source_content_type":"text/x-python","patch_set":43,"id":"1fa4df85_ed293df2","line":1732,"range":{"start_line":1729,"start_character":6,"end_line":1732,"end_character":69},"updated":"2020-03-12 18:05:03.000000000","message":"i changed my mind about how to implement this and forgot to remove this.","commit_id":"522ffd013e8089b2d24e2f3d5b9db630f1b4e3f2"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"faed296b1029e22ecf0bc8fd34dab55ed3cd5238","unresolved":false,"context_lines":[{"line_number":1735,"context_line":"                           for _pid in [provider.name, provider.uuid]):"},{"line_number":1736,"context_line":"                        continue"},{"line_number":1737,"context_line":""},{"line_number":1738,"context_line":"                # for each provider specified by name or uuid check that"},{"line_number":1739,"context_line":"                # we have not already processed it to prevent duplicate"},{"line_number":1740,"context_line":"                # declarations of the same provider."},{"line_number":1741,"context_line":"                current_uuid \u003d provider.uuid"},{"line_number":1742,"context_line":"                if current_uuid in processed_providers:"},{"line_number":1743,"context_line":"                    raise ValueError("},{"line_number":1744,"context_line":"                        f\"provider config: {source_file_name} conflicts with \""},{"line_number":1745,"context_line":"                        f\"provider config: {processed_providers[current_uuid]}\""},{"line_number":1746,"context_line":"                        f\".The same provider is specified using both name: \""},{"line_number":1747,"context_line":"                        f\"{uuid_or_name} and uuid: {current_uuid} \")"},{"line_number":1748,"context_line":"                processed_providers[current_uuid] \u003d source_file_name"},{"line_number":1749,"context_line":""},{"line_number":1750,"context_line":"                if additional_traits:"},{"line_number":1751,"context_line":"                    intersect \u003d (set(provider.traits) \u0026 set(additional_traits))"},{"line_number":1752,"context_line":"                    if intersect:"},{"line_number":1753,"context_line":"                        invalid \u003d \u0027,\u0027.join(intersect)"},{"line_number":1754,"context_line":"                        raise ValueError("},{"line_number":1755,"context_line":"                            f\"Provider Config: {source_file_name} attempts \""},{"line_number":1756,"context_line":"                            f\"to define a trait that is owned by the \""},{"line_number":1757,"context_line":"                            f\"virt driver or specified via the placment api.\""},{"line_number":1758,"context_line":"                            f\"Invalid traits: {invalid}  must be removed \""},{"line_number":1759,"context_line":"                            f\"from {source_file_name}.\")"},{"line_number":1760,"context_line":"                    provider_tree.add_traits(provider.uuid,"},{"line_number":1761,"context_line":"                                             *additional_traits)"},{"line_number":1762,"context_line":"                if additional_inventories:"},{"line_number":1763,"context_line":"                    merged_inventory \u003d provider.inventory"},{"line_number":1764,"context_line":"                    intersect \u003d (merged_inventory.keys() \u0026"},{"line_number":1765,"context_line":"                                 {rc for inv_dict in additional_inventories"},{"line_number":1766,"context_line":"                                  for rc in inv_dict})"},{"line_number":1767,"context_line":"                    if intersect:"},{"line_number":1768,"context_line":"                        invalid \u003d \u0027,\u0027.join(intersect)"},{"line_number":1769,"context_line":"                        raise ValueError("},{"line_number":1770,"context_line":"                            f\"Provider Config: {source_file_name} attempts \""},{"line_number":1771,"context_line":"                            f\"to define an inventory that is owned by the \""},{"line_number":1772,"context_line":"                            f\"virt driver. Invalid inventories: {invalid} \""},{"line_number":1773,"context_line":"                            f\"must be removed from {source_file_name}.\")"},{"line_number":1774,"context_line":"                    for inventory in additional_inventories:"},{"line_number":1775,"context_line":"                        merged_inventory.update(inventory)"},{"line_number":1776,"context_line":"                    provider_tree.update_inventory(provider.uuid,"}],"source_content_type":"text/x-python","patch_set":44,"id":"1fa4df85_10be29ff","line":1773,"range":{"start_line":1738,"start_character":16,"end_line":1773,"end_character":72},"updated":"2020-03-13 02:00:36.000000000","message":"if ye are happy with these addtional check i can try and add tests for this in either a follow up patch or in another revision of this after i adress the comments in the last patch.","commit_id":"14689413276466df9dd9e7455e26e018f9c7c51d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"fd5ee03e5eeaa7e5a4e1d7b4fa4853d0be63b20c","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        # Set of ids for providers identified in provider config files that"},{"line_number":116,"context_line":"        # are not found on the provider tree. These are tracked to facilitate"},{"line_number":117,"context_line":"        # smarter logging."},{"line_number":118,"context_line":"        self._absent_providers \u003d set()"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    @utils.synchronized(COMPUTE_RESOURCE_SEMAPHORE, fair\u003dTrue)"},{"line_number":121,"context_line":"    def instance_claim(self, context, instance, nodename, allocations,"}],"source_content_type":"text/x-python","patch_set":52,"id":"bf51134e_d629b137","line":118,"range":{"start_line":118,"start_character":13,"end_line":118,"end_character":30},"updated":"2020-07-22 13:19:17.000000000","message":"Any reason to mark this private. Nothing else is here","commit_id":"f3198c1cd7de86aa62a10bc2ce80dcd1d199d291"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"9a1c579e3652f07a6741c2fcb08828c74a17ba47","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        # Set of ids for providers identified in provider config files that"},{"line_number":116,"context_line":"        # are not found on the provider tree. These are tracked to facilitate"},{"line_number":117,"context_line":"        # smarter logging."},{"line_number":118,"context_line":"        self._absent_providers \u003d set()"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    @utils.synchronized(COMPUTE_RESOURCE_SEMAPHORE, fair\u003dTrue)"},{"line_number":121,"context_line":"    def instance_claim(self, context, instance, nodename, allocations,"}],"source_content_type":"text/x-python","patch_set":52,"id":"9f560f44_04eabb0d","line":118,"range":{"start_line":118,"start_character":13,"end_line":118,"end_character":30},"in_reply_to":"bf51134e_d629b137","updated":"2020-08-03 02:32:06.000000000","message":"I have no idea. my initial impression is that his field are for smarter logging and not for public use.\n\nLet\u0027s still keep it private until we got a reason to make it public.","commit_id":"f3198c1cd7de86aa62a10bc2ce80dcd1d199d291"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"190aa524411ae86ab27deb9b691e4704563f5ea4","unresolved":false,"context_lines":[{"line_number":1703,"context_line":"                usage[key] \u003d updates[key]"},{"line_number":1704,"context_line":"        return usage"},{"line_number":1705,"context_line":""},{"line_number":1706,"context_line":"    def _merge_provider_configs(self, provider_configs, provider_tree):"},{"line_number":1707,"context_line":"        \"\"\"Takes a provider tree and merges any provider configs. Any"},{"line_number":1708,"context_line":"        providers in the update that are not present in the tree are logged"},{"line_number":1709,"context_line":"        and ignored. Providers identified by both $COMPUTE_NODE and explicit"}],"source_content_type":"text/x-python","patch_set":52,"id":"bf51134e_630d9b34","line":1706,"updated":"2020-07-21 15:57:55.000000000","message":"The single unit test in the current patch does not cover this function well enough. I see some functional tests in the next patch but I\u0027m not sure that covers every aspect of this function either.\n\nFor example I don\u0027t see test coverage for L1745, L1757, 1771 in the this or the next patch.","commit_id":"f3198c1cd7de86aa62a10bc2ce80dcd1d199d291"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"9a1c579e3652f07a6741c2fcb08828c74a17ba47","unresolved":false,"context_lines":[{"line_number":1703,"context_line":"                usage[key] \u003d updates[key]"},{"line_number":1704,"context_line":"        return usage"},{"line_number":1705,"context_line":""},{"line_number":1706,"context_line":"    def _merge_provider_configs(self, provider_configs, provider_tree):"},{"line_number":1707,"context_line":"        \"\"\"Takes a provider tree and merges any provider configs. Any"},{"line_number":1708,"context_line":"        providers in the update that are not present in the tree are logged"},{"line_number":1709,"context_line":"        and ignored. Providers identified by both $COMPUTE_NODE and explicit"}],"source_content_type":"text/x-python","patch_set":52,"id":"9f560f44_24f7fff7","line":1706,"in_reply_to":"bf51134e_630d9b34","updated":"2020-08-03 02:32:06.000000000","message":"I tried to add more test cases to cover exception code but it is fairly hard for me to create a test case or abnormal config to raise a ValueError exception... probably I am too naive to Python and lack of advanced unit test skills. \n\nI temporarily leave it be and let\u0027s do a careful code review first; meanwhile I will google for some advanced skills to do unit test.","commit_id":"f3198c1cd7de86aa62a10bc2ce80dcd1d199d291"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"190aa524411ae86ab27deb9b691e4704563f5ea4","unresolved":false,"context_lines":[{"line_number":1706,"context_line":"    def _merge_provider_configs(self, provider_configs, provider_tree):"},{"line_number":1707,"context_line":"        \"\"\"Takes a provider tree and merges any provider configs. Any"},{"line_number":1708,"context_line":"        providers in the update that are not present in the tree are logged"},{"line_number":1709,"context_line":"        and ignored. Providers identified by both $COMPUTE_NODE and explicit"},{"line_number":1710,"context_line":"        UUID/NAME will only be updated with the additional inventories and"},{"line_number":1711,"context_line":"        traits in the explicit provider config entry."},{"line_number":1712,"context_line":""},{"line_number":1713,"context_line":"        :param provider_configs: The provider configs to merge"},{"line_number":1714,"context_line":"        :param provider_tree: The provider tree to be updated in place"}],"source_content_type":"text/x-python","patch_set":52,"id":"bf51134e_b04ff732","line":1711,"range":{"start_line":1709,"start_character":50,"end_line":1711,"end_character":53},"updated":"2020-07-21 15:57:55.000000000","message":"++","commit_id":"f3198c1cd7de86aa62a10bc2ce80dcd1d199d291"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"9a1c579e3652f07a6741c2fcb08828c74a17ba47","unresolved":false,"context_lines":[{"line_number":1706,"context_line":"    def _merge_provider_configs(self, provider_configs, provider_tree):"},{"line_number":1707,"context_line":"        \"\"\"Takes a provider tree and merges any provider configs. Any"},{"line_number":1708,"context_line":"        providers in the update that are not present in the tree are logged"},{"line_number":1709,"context_line":"        and ignored. Providers identified by both $COMPUTE_NODE and explicit"},{"line_number":1710,"context_line":"        UUID/NAME will only be updated with the additional inventories and"},{"line_number":1711,"context_line":"        traits in the explicit provider config entry."},{"line_number":1712,"context_line":""},{"line_number":1713,"context_line":"        :param provider_configs: The provider configs to merge"},{"line_number":1714,"context_line":"        :param provider_tree: The provider tree to be updated in place"}],"source_content_type":"text/x-python","patch_set":52,"id":"9f560f44_84dd2b72","line":1711,"range":{"start_line":1709,"start_character":50,"end_line":1711,"end_character":53},"in_reply_to":"bf51134e_b04ff732","updated":"2020-08-03 02:32:06.000000000","message":"Keep no code change.","commit_id":"f3198c1cd7de86aa62a10bc2ce80dcd1d199d291"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"fd5ee03e5eeaa7e5a4e1d7b4fa4853d0be63b20c","unresolved":false,"context_lines":[{"line_number":1713,"context_line":"        :param provider_configs: The provider configs to merge"},{"line_number":1714,"context_line":"        :param provider_tree: The provider tree to be updated in place"},{"line_number":1715,"context_line":"        \"\"\""},{"line_number":1716,"context_line":"        processed_providers \u003d dict()"},{"line_number":1717,"context_line":"        for uuid_or_name, provider_data in provider_configs.items():"},{"line_number":1718,"context_line":"            additional_traits \u003d provider_data.get("},{"line_number":1719,"context_line":"                \"traits\", {}).get(\"additional\", [])"}],"source_content_type":"text/x-python","patch_set":52,"id":"bf51134e_3620ed49","line":1716,"range":{"start_line":1716,"start_character":30,"end_line":1716,"end_character":36},"updated":"2020-07-22 13:19:17.000000000","message":"{}","commit_id":"f3198c1cd7de86aa62a10bc2ce80dcd1d199d291"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"9a1c579e3652f07a6741c2fcb08828c74a17ba47","unresolved":false,"context_lines":[{"line_number":1713,"context_line":"        :param provider_configs: The provider configs to merge"},{"line_number":1714,"context_line":"        :param provider_tree: The provider tree to be updated in place"},{"line_number":1715,"context_line":"        \"\"\""},{"line_number":1716,"context_line":"        processed_providers \u003d dict()"},{"line_number":1717,"context_line":"        for uuid_or_name, provider_data in provider_configs.items():"},{"line_number":1718,"context_line":"            additional_traits \u003d provider_data.get("},{"line_number":1719,"context_line":"                \"traits\", {}).get(\"additional\", [])"}],"source_content_type":"text/x-python","patch_set":52,"id":"9f560f44_64d8d77e","line":1716,"range":{"start_line":1716,"start_character":30,"end_line":1716,"end_character":36},"in_reply_to":"bf51134e_3620ed49","updated":"2020-08-03 02:32:06.000000000","message":"will fix.","commit_id":"f3198c1cd7de86aa62a10bc2ce80dcd1d199d291"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"fd5ee03e5eeaa7e5a4e1d7b4fa4853d0be63b20c","unresolved":false,"context_lines":[{"line_number":1743,"context_line":"                current_uuid \u003d provider.uuid"},{"line_number":1744,"context_line":"                if current_uuid in processed_providers:"},{"line_number":1745,"context_line":"                    raise ValueError("},{"line_number":1746,"context_line":"                        f\"provider config: {source_file_name} conflicts with \""},{"line_number":1747,"context_line":"                        f\"provider config: {processed_providers[current_uuid]}\""},{"line_number":1748,"context_line":"                        f\".The same provider is specified using both name: \""},{"line_number":1749,"context_line":"                        f\"{uuid_or_name} and uuid: {current_uuid} \")"},{"line_number":1750,"context_line":"                processed_providers[current_uuid] \u003d source_file_name"},{"line_number":1751,"context_line":""},{"line_number":1752,"context_line":"                if additional_traits:"}],"source_content_type":"text/x-python","patch_set":52,"id":"bf51134e_5615a1e4","line":1749,"range":{"start_line":1746,"start_character":23,"end_line":1749,"end_character":67},"updated":"2020-07-22 13:19:17.000000000","message":"This needs to be translated","commit_id":"f3198c1cd7de86aa62a10bc2ce80dcd1d199d291"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"9a1c579e3652f07a6741c2fcb08828c74a17ba47","unresolved":false,"context_lines":[{"line_number":1743,"context_line":"                current_uuid \u003d provider.uuid"},{"line_number":1744,"context_line":"                if current_uuid in processed_providers:"},{"line_number":1745,"context_line":"                    raise ValueError("},{"line_number":1746,"context_line":"                        f\"provider config: {source_file_name} conflicts with \""},{"line_number":1747,"context_line":"                        f\"provider config: {processed_providers[current_uuid]}\""},{"line_number":1748,"context_line":"                        f\".The same provider is specified using both name: \""},{"line_number":1749,"context_line":"                        f\"{uuid_or_name} and uuid: {current_uuid} \")"},{"line_number":1750,"context_line":"                processed_providers[current_uuid] \u003d source_file_name"},{"line_number":1751,"context_line":""},{"line_number":1752,"context_line":"                if additional_traits:"}],"source_content_type":"text/x-python","patch_set":52,"id":"9f560f44_64c1f780","line":1749,"range":{"start_line":1746,"start_character":23,"end_line":1749,"end_character":67},"in_reply_to":"bf51134e_5615a1e4","updated":"2020-08-03 02:32:06.000000000","message":"will translate","commit_id":"f3198c1cd7de86aa62a10bc2ce80dcd1d199d291"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"fd5ee03e5eeaa7e5a4e1d7b4fa4853d0be63b20c","unresolved":false,"context_lines":[{"line_number":1750,"context_line":"                processed_providers[current_uuid] \u003d source_file_name"},{"line_number":1751,"context_line":""},{"line_number":1752,"context_line":"                if additional_traits:"},{"line_number":1753,"context_line":"                    intersect \u003d (set(provider.traits) \u0026 set(additional_traits))"},{"line_number":1754,"context_line":"                    if intersect:"},{"line_number":1755,"context_line":"                        invalid \u003d \u0027,\u0027.join(intersect)"},{"line_number":1756,"context_line":"                        raise ValueError("}],"source_content_type":"text/x-python","patch_set":52,"id":"bf51134e_76ef05e9","line":1753,"range":{"start_line":1753,"start_character":32,"end_line":1753,"end_character":33},"updated":"2020-07-22 13:19:17.000000000","message":"nit: unnecessary brackets","commit_id":"f3198c1cd7de86aa62a10bc2ce80dcd1d199d291"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"9a1c579e3652f07a6741c2fcb08828c74a17ba47","unresolved":false,"context_lines":[{"line_number":1750,"context_line":"                processed_providers[current_uuid] \u003d source_file_name"},{"line_number":1751,"context_line":""},{"line_number":1752,"context_line":"                if additional_traits:"},{"line_number":1753,"context_line":"                    intersect \u003d (set(provider.traits) \u0026 set(additional_traits))"},{"line_number":1754,"context_line":"                    if intersect:"},{"line_number":1755,"context_line":"                        invalid \u003d \u0027,\u0027.join(intersect)"},{"line_number":1756,"context_line":"                        raise ValueError("}],"source_content_type":"text/x-python","patch_set":52,"id":"9f560f44_04063bcf","line":1753,"range":{"start_line":1753,"start_character":32,"end_line":1753,"end_character":33},"in_reply_to":"bf51134e_76ef05e9","updated":"2020-08-03 02:32:06.000000000","message":"will fix","commit_id":"f3198c1cd7de86aa62a10bc2ce80dcd1d199d291"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"fd5ee03e5eeaa7e5a4e1d7b4fa4853d0be63b20c","unresolved":false,"context_lines":[{"line_number":1754,"context_line":"                    if intersect:"},{"line_number":1755,"context_line":"                        invalid \u003d \u0027,\u0027.join(intersect)"},{"line_number":1756,"context_line":"                        raise ValueError("},{"line_number":1757,"context_line":"                            f\"Provider Config: {source_file_name} attempts \""},{"line_number":1758,"context_line":"                            f\"to define a trait that is owned by the \""},{"line_number":1759,"context_line":"                            f\"virt driver or specified via the placment api.\""},{"line_number":1760,"context_line":"                            f\"Invalid traits: {invalid}  must be removed \""},{"line_number":1761,"context_line":"                            f\"from {source_file_name}.\")"},{"line_number":1762,"context_line":"                    provider_tree.add_traits(provider.uuid,"},{"line_number":1763,"context_line":"                                             *additional_traits)"},{"line_number":1764,"context_line":"                if additional_inventories:"}],"source_content_type":"text/x-python","patch_set":52,"id":"bf51134e_f6db154c","line":1761,"range":{"start_line":1757,"start_character":28,"end_line":1761,"end_character":55},"updated":"2020-07-22 13:19:17.000000000","message":"So does this","commit_id":"f3198c1cd7de86aa62a10bc2ce80dcd1d199d291"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"9a1c579e3652f07a6741c2fcb08828c74a17ba47","unresolved":false,"context_lines":[{"line_number":1754,"context_line":"                    if intersect:"},{"line_number":1755,"context_line":"                        invalid \u003d \u0027,\u0027.join(intersect)"},{"line_number":1756,"context_line":"                        raise ValueError("},{"line_number":1757,"context_line":"                            f\"Provider Config: {source_file_name} attempts \""},{"line_number":1758,"context_line":"                            f\"to define a trait that is owned by the \""},{"line_number":1759,"context_line":"                            f\"virt driver or specified via the placment api.\""},{"line_number":1760,"context_line":"                            f\"Invalid traits: {invalid}  must be removed \""},{"line_number":1761,"context_line":"                            f\"from {source_file_name}.\")"},{"line_number":1762,"context_line":"                    provider_tree.add_traits(provider.uuid,"},{"line_number":1763,"context_line":"                                             *additional_traits)"},{"line_number":1764,"context_line":"                if additional_inventories:"}],"source_content_type":"text/x-python","patch_set":52,"id":"9f560f44_a4bb0f0c","line":1761,"range":{"start_line":1757,"start_character":28,"end_line":1761,"end_character":55},"in_reply_to":"bf51134e_f6db154c","updated":"2020-08-03 02:32:06.000000000","message":"will translate","commit_id":"f3198c1cd7de86aa62a10bc2ce80dcd1d199d291"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"9a1c579e3652f07a6741c2fcb08828c74a17ba47","unresolved":false,"context_lines":[{"line_number":1769,"context_line":"                    if intersect:"},{"line_number":1770,"context_line":"                        invalid \u003d \u0027,\u0027.join(intersect)"},{"line_number":1771,"context_line":"                        raise ValueError("},{"line_number":1772,"context_line":"                            f\"Provider Config: {source_file_name} attempts \""},{"line_number":1773,"context_line":"                            f\"to define an inventory that is owned by the \""},{"line_number":1774,"context_line":"                            f\"virt driver. Invalid inventories: {invalid} \""},{"line_number":1775,"context_line":"                            f\"must be removed from {source_file_name}.\")"},{"line_number":1776,"context_line":"                    for inventory in additional_inventories:"},{"line_number":1777,"context_line":"                        merged_inventory.update(inventory)"},{"line_number":1778,"context_line":"                    provider_tree.update_inventory(provider.uuid,"}],"source_content_type":"text/x-python","patch_set":52,"id":"9f560f44_c493a3f9","line":1775,"range":{"start_line":1772,"start_character":0,"end_line":1775,"end_character":72},"updated":"2020-08-03 02:32:06.000000000","message":"will translate","commit_id":"f3198c1cd7de86aa62a10bc2ce80dcd1d199d291"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"62d740cdb22645b5b861f764a55f9f9cade8bf67","unresolved":false,"context_lines":[{"line_number":1772,"context_line":"                        )"},{"line_number":1773,"context_line":"                    provider_tree.add_traits(provider.uuid,"},{"line_number":1774,"context_line":"                                             *additional_traits)"},{"line_number":1775,"context_line":"                    "},{"line_number":1776,"context_line":"                if additional_inventories:"},{"line_number":1777,"context_line":"                    merged_inventory \u003d provider.inventory"},{"line_number":1778,"context_line":"                    intersect \u003d (merged_inventory.keys() \u0026"}],"source_content_type":"text/x-python","patch_set":54,"id":"9f560f44_467817c3","line":1775,"updated":"2020-08-03 11:37:33.000000000","message":"pep8: W293 blank line contains whitespace","commit_id":"13fedf3ebba582c834fe9149e0d18b384846966a"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"93f64a9d85a021b6085774e2899ea7d0d2aee6ae","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        # Set of ids for providers identified in provider config files that"},{"line_number":116,"context_line":"        # are not found on the provider tree. These are tracked to facilitate"},{"line_number":117,"context_line":"        # smarter logging."},{"line_number":118,"context_line":"        self._absent_providers \u003d set()"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    @utils.synchronized(COMPUTE_RESOURCE_SEMAPHORE, fair\u003dTrue)"},{"line_number":121,"context_line":"    def instance_claim(self, context, instance, nodename, allocations,"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_b506401f","line":118,"range":{"start_line":118,"start_character":13,"end_line":118,"end_character":14},"updated":"2020-08-06 09:19:12.000000000","message":"No need to make this private. Nothing else here is","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"d7e26a403993f1377826bac1e6ca375fead96d3d","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        # Set of ids for providers identified in provider config files that"},{"line_number":116,"context_line":"        # are not found on the provider tree. These are tracked to facilitate"},{"line_number":117,"context_line":"        # smarter logging."},{"line_number":118,"context_line":"        self._absent_providers \u003d set()"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    @utils.synchronized(COMPUTE_RESOURCE_SEMAPHORE, fair\u003dTrue)"},{"line_number":121,"context_line":"    def instance_claim(self, context, instance, nodename, allocations,"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_d0ac90a0","line":118,"range":{"start_line":118,"start_character":13,"end_line":118,"end_character":14},"in_reply_to":"9f560f44_b506401f","updated":"2020-08-07 03:16:26.000000000","message":"Done","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"8e9e83d21d412a71111c9e5cd01ed0cd0a2323ed","unresolved":false,"context_lines":[{"line_number":1732,"context_line":"                # If this is for UUID\u003d$COMPUTE_NODE, check if provider is also"},{"line_number":1733,"context_line":"                # explicitly identified. If it is, skip updating it with the"},{"line_number":1734,"context_line":"                # $COMPUTE_NODE entry data."},{"line_number":1735,"context_line":"                if uuid_or_name \u003d\u003d \"$COMPUTE_NODE\":"},{"line_number":1736,"context_line":"                    if any(_pid in provider_configs"},{"line_number":1737,"context_line":"                           for _pid in [provider.name, provider.uuid]):"},{"line_number":1738,"context_line":"                        continue"},{"line_number":1739,"context_line":""},{"line_number":1740,"context_line":"                # for each provider specified by name or uuid check that"},{"line_number":1741,"context_line":"                # we have not already processed it to prevent duplicate"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_f8a0bf92","line":1738,"range":{"start_line":1735,"start_character":16,"end_line":1738,"end_character":32},"updated":"2020-08-05 13:34:46.000000000","message":"After check with Eric, then I know the usecase for this http://eavesdrop.openstack.org/irclogs/%23openstack-nova/%23openstack-nova.2020-08-05.log.html#t2020-08-05T12:43:42\n\nIt is better we document this usecase somewhere, like schema or the code comment. this can be done by an append patch.","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"d7e26a403993f1377826bac1e6ca375fead96d3d","unresolved":false,"context_lines":[{"line_number":1732,"context_line":"                # If this is for UUID\u003d$COMPUTE_NODE, check if provider is also"},{"line_number":1733,"context_line":"                # explicitly identified. If it is, skip updating it with the"},{"line_number":1734,"context_line":"                # $COMPUTE_NODE entry data."},{"line_number":1735,"context_line":"                if uuid_or_name \u003d\u003d \"$COMPUTE_NODE\":"},{"line_number":1736,"context_line":"                    if any(_pid in provider_configs"},{"line_number":1737,"context_line":"                           for _pid in [provider.name, provider.uuid]):"},{"line_number":1738,"context_line":"                        continue"},{"line_number":1739,"context_line":""},{"line_number":1740,"context_line":"                # for each provider specified by name or uuid check that"},{"line_number":1741,"context_line":"                # we have not already processed it to prevent duplicate"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_9094d838","line":1738,"range":{"start_line":1735,"start_character":16,"end_line":1738,"end_character":32},"in_reply_to":"9f560f44_f8a0bf92","updated":"2020-08-07 03:16:26.000000000","message":"add code comment for the usage of $COMPUTE_NODE","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"93f64a9d85a021b6085774e2899ea7d0d2aee6ae","unresolved":false,"context_lines":[{"line_number":1743,"context_line":"                current_uuid \u003d provider.uuid"},{"line_number":1744,"context_line":"                if current_uuid in processed_providers:"},{"line_number":1745,"context_line":"                    raise ValueError(_("},{"line_number":1746,"context_line":"                        \"provider config: %(source_file_name)s conflicts with \""},{"line_number":1747,"context_line":"                        \"provider config: %(processed_providers)s\""},{"line_number":1748,"context_line":"                        \". The same provider is specified using both name: \""},{"line_number":1749,"context_line":"                        \"%(uuid_or_name)s and uuid: %(current_uuid)s.\") % {"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_783e5dc1","line":1746,"range":{"start_line":1746,"start_character":40,"end_line":1746,"end_character":62},"updated":"2020-08-06 09:19:12.000000000","message":"Can you drop the colons and surround the variables with single quotes instead?\n\n  Provider config \u0027%(source_file_name)s\u0027 conflicts ...","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"93f64a9d85a021b6085774e2899ea7d0d2aee6ae","unresolved":false,"context_lines":[{"line_number":1743,"context_line":"                current_uuid \u003d provider.uuid"},{"line_number":1744,"context_line":"                if current_uuid in processed_providers:"},{"line_number":1745,"context_line":"                    raise ValueError(_("},{"line_number":1746,"context_line":"                        \"provider config: %(source_file_name)s conflicts with \""},{"line_number":1747,"context_line":"                        \"provider config: %(processed_providers)s\""},{"line_number":1748,"context_line":"                        \". The same provider is specified using both name: \""},{"line_number":1749,"context_line":"                        \"%(uuid_or_name)s and uuid: %(current_uuid)s.\") % {"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_b81bd570","line":1746,"range":{"start_line":1746,"start_character":25,"end_line":1746,"end_character":26},"updated":"2020-08-06 09:19:12.000000000","message":"P","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"d7e26a403993f1377826bac1e6ca375fead96d3d","unresolved":false,"context_lines":[{"line_number":1743,"context_line":"                current_uuid \u003d provider.uuid"},{"line_number":1744,"context_line":"                if current_uuid in processed_providers:"},{"line_number":1745,"context_line":"                    raise ValueError(_("},{"line_number":1746,"context_line":"                        \"provider config: %(source_file_name)s conflicts with \""},{"line_number":1747,"context_line":"                        \"provider config: %(processed_providers)s\""},{"line_number":1748,"context_line":"                        \". The same provider is specified using both name: \""},{"line_number":1749,"context_line":"                        \"%(uuid_or_name)s and uuid: %(current_uuid)s.\") % {"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_f0b0b4df","line":1746,"range":{"start_line":1746,"start_character":40,"end_line":1746,"end_character":62},"in_reply_to":"9f560f44_783e5dc1","updated":"2020-08-07 03:16:26.000000000","message":"Done","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"d7e26a403993f1377826bac1e6ca375fead96d3d","unresolved":false,"context_lines":[{"line_number":1743,"context_line":"                current_uuid \u003d provider.uuid"},{"line_number":1744,"context_line":"                if current_uuid in processed_providers:"},{"line_number":1745,"context_line":"                    raise ValueError(_("},{"line_number":1746,"context_line":"                        \"provider config: %(source_file_name)s conflicts with \""},{"line_number":1747,"context_line":"                        \"provider config: %(processed_providers)s\""},{"line_number":1748,"context_line":"                        \". The same provider is specified using both name: \""},{"line_number":1749,"context_line":"                        \"%(uuid_or_name)s and uuid: %(current_uuid)s.\") % {"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_90bdf8b8","line":1746,"range":{"start_line":1746,"start_character":25,"end_line":1746,"end_character":26},"in_reply_to":"9f560f44_b81bd570","updated":"2020-08-07 03:16:26.000000000","message":"Done","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"93f64a9d85a021b6085774e2899ea7d0d2aee6ae","unresolved":false,"context_lines":[{"line_number":1745,"context_line":"                    raise ValueError(_("},{"line_number":1746,"context_line":"                        \"provider config: %(source_file_name)s conflicts with \""},{"line_number":1747,"context_line":"                        \"provider config: %(processed_providers)s\""},{"line_number":1748,"context_line":"                        \". The same provider is specified using both name: \""},{"line_number":1749,"context_line":"                        \"%(uuid_or_name)s and uuid: %(current_uuid)s.\") % {"},{"line_number":1750,"context_line":"                            \u0027source_file_name\u0027: source_file_name,"},{"line_number":1751,"context_line":"                            \u0027processed_providers\u0027:"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_7815bd3f","line":1748,"range":{"start_line":1748,"start_character":25,"end_line":1748,"end_character":27},"updated":"2020-08-06 09:19:12.000000000","message":"Put spaces at the end of a line, not the start of the next one","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"d7e26a403993f1377826bac1e6ca375fead96d3d","unresolved":false,"context_lines":[{"line_number":1745,"context_line":"                    raise ValueError(_("},{"line_number":1746,"context_line":"                        \"provider config: %(source_file_name)s conflicts with \""},{"line_number":1747,"context_line":"                        \"provider config: %(processed_providers)s\""},{"line_number":1748,"context_line":"                        \". The same provider is specified using both name: \""},{"line_number":1749,"context_line":"                        \"%(uuid_or_name)s and uuid: %(current_uuid)s.\") % {"},{"line_number":1750,"context_line":"                            \u0027source_file_name\u0027: source_file_name,"},{"line_number":1751,"context_line":"                            \u0027processed_providers\u0027:"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_b0babcbd","line":1748,"range":{"start_line":1748,"start_character":25,"end_line":1748,"end_character":27},"in_reply_to":"9f560f44_7815bd3f","updated":"2020-08-07 03:16:26.000000000","message":"Done","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"93f64a9d85a021b6085774e2899ea7d0d2aee6ae","unresolved":false,"context_lines":[{"line_number":1761,"context_line":"                    if intersect:"},{"line_number":1762,"context_line":"                        invalid \u003d \u0027,\u0027.join(intersect)"},{"line_number":1763,"context_line":"                        raise ValueError(_("},{"line_number":1764,"context_line":"                            \"Provider Config: %(source_file_name)s attempts \""},{"line_number":1765,"context_line":"                            \"to define a trait that is owned by the \""},{"line_number":1766,"context_line":"                            \"virt driver or specified via the placment api. \""},{"line_number":1767,"context_line":"                            \"Invalid traits: %(invalid)s must be removed \""}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_98b25148","line":1764,"range":{"start_line":1764,"start_character":38,"end_line":1764,"end_character":40},"updated":"2020-08-06 09:19:12.000000000","message":"config","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"93f64a9d85a021b6085774e2899ea7d0d2aee6ae","unresolved":false,"context_lines":[{"line_number":1761,"context_line":"                    if intersect:"},{"line_number":1762,"context_line":"                        invalid \u003d \u0027,\u0027.join(intersect)"},{"line_number":1763,"context_line":"                        raise ValueError(_("},{"line_number":1764,"context_line":"                            \"Provider Config: %(source_file_name)s attempts \""},{"line_number":1765,"context_line":"                            \"to define a trait that is owned by the \""},{"line_number":1766,"context_line":"                            \"virt driver or specified via the placment api. \""},{"line_number":1767,"context_line":"                            \"Invalid traits: %(invalid)s must be removed \""}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_387d056e","line":1764,"range":{"start_line":1764,"start_character":44,"end_line":1764,"end_character":66},"updated":"2020-08-06 09:19:12.000000000","message":"same comment about dropping the colons and using quotes instead","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"d7e26a403993f1377826bac1e6ca375fead96d3d","unresolved":false,"context_lines":[{"line_number":1761,"context_line":"                    if intersect:"},{"line_number":1762,"context_line":"                        invalid \u003d \u0027,\u0027.join(intersect)"},{"line_number":1763,"context_line":"                        raise ValueError(_("},{"line_number":1764,"context_line":"                            \"Provider Config: %(source_file_name)s attempts \""},{"line_number":1765,"context_line":"                            \"to define a trait that is owned by the \""},{"line_number":1766,"context_line":"                            \"virt driver or specified via the placment api. \""},{"line_number":1767,"context_line":"                            \"Invalid traits: %(invalid)s must be removed \""}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_1b10e94d","line":1764,"range":{"start_line":1764,"start_character":44,"end_line":1764,"end_character":66},"in_reply_to":"9f560f44_387d056e","updated":"2020-08-07 03:16:26.000000000","message":"Done","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"d7e26a403993f1377826bac1e6ca375fead96d3d","unresolved":false,"context_lines":[{"line_number":1761,"context_line":"                    if intersect:"},{"line_number":1762,"context_line":"                        invalid \u003d \u0027,\u0027.join(intersect)"},{"line_number":1763,"context_line":"                        raise ValueError(_("},{"line_number":1764,"context_line":"                            \"Provider Config: %(source_file_name)s attempts \""},{"line_number":1765,"context_line":"                            \"to define a trait that is owned by the \""},{"line_number":1766,"context_line":"                            \"virt driver or specified via the placment api. \""},{"line_number":1767,"context_line":"                            \"Invalid traits: %(invalid)s must be removed \""}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_10c9e857","line":1764,"range":{"start_line":1764,"start_character":38,"end_line":1764,"end_character":40},"in_reply_to":"9f560f44_98b25148","updated":"2020-08-07 03:16:26.000000000","message":"Done","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"8e9e83d21d412a71111c9e5cd01ed0cd0a2323ed","unresolved":false,"context_lines":[{"line_number":1760,"context_line":"                    intersect \u003d set(provider.traits) \u0026 set(additional_traits)"},{"line_number":1761,"context_line":"                    if intersect:"},{"line_number":1762,"context_line":"                        invalid \u003d \u0027,\u0027.join(intersect)"},{"line_number":1763,"context_line":"                        raise ValueError(_("},{"line_number":1764,"context_line":"                            \"Provider Config: %(source_file_name)s attempts \""},{"line_number":1765,"context_line":"                            \"to define a trait that is owned by the \""},{"line_number":1766,"context_line":"                            \"virt driver or specified via the placment api. \""},{"line_number":1767,"context_line":"                            \"Invalid traits: %(invalid)s must be removed \""},{"line_number":1768,"context_line":"                            \"from %(source_file_name)s.\") % {"},{"line_number":1769,"context_line":"                                \u0027source_file_name\u0027: source_file_name,"},{"line_number":1770,"context_line":"                                \u0027invalid\u0027: invalid"},{"line_number":1771,"context_line":"                            }"},{"line_number":1772,"context_line":"                        )"},{"line_number":1773,"context_line":"                    provider_tree.add_traits(provider.uuid,"},{"line_number":1774,"context_line":"                                             *additional_traits)"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_7b530918","line":1771,"range":{"start_line":1763,"start_character":24,"end_line":1771,"end_character":29},"updated":"2020-08-05 13:34:46.000000000","message":"the spec said we should just log and ignore the conflict. that confuses me. https://specs.openstack.org/openstack/nova-specs/specs/victoria/approved/provider-config-file.html#provider-config-consumption-from-nova\n\nalso talk with Eric, as he said, there should error out on the startup, but ignore after startup.\nhttp://eavesdrop.openstack.org/irclogs/%23openstack-nova/%23openstack-nova.2020-08-05.log.html#t2020-08-05T12:48:37\n\nBut I guess that based on virtdriver.update_provider_tree will merge with existed RP\u0027s inventory. The conflict only can be found on startup. But the virtdriver.update_provider_tree always overwrite exsiting RP. So we always can know the conflict with virt driver. So this code is right.\n\nso maybe to have other reviewer to check this.","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"d7e26a403993f1377826bac1e6ca375fead96d3d","unresolved":false,"context_lines":[{"line_number":1760,"context_line":"                    intersect \u003d set(provider.traits) \u0026 set(additional_traits)"},{"line_number":1761,"context_line":"                    if intersect:"},{"line_number":1762,"context_line":"                        invalid \u003d \u0027,\u0027.join(intersect)"},{"line_number":1763,"context_line":"                        raise ValueError(_("},{"line_number":1764,"context_line":"                            \"Provider Config: %(source_file_name)s attempts \""},{"line_number":1765,"context_line":"                            \"to define a trait that is owned by the \""},{"line_number":1766,"context_line":"                            \"virt driver or specified via the placment api. \""},{"line_number":1767,"context_line":"                            \"Invalid traits: %(invalid)s must be removed \""},{"line_number":1768,"context_line":"                            \"from %(source_file_name)s.\") % {"},{"line_number":1769,"context_line":"                                \u0027source_file_name\u0027: source_file_name,"},{"line_number":1770,"context_line":"                                \u0027invalid\u0027: invalid"},{"line_number":1771,"context_line":"                            }"},{"line_number":1772,"context_line":"                        )"},{"line_number":1773,"context_line":"                    provider_tree.add_traits(provider.uuid,"},{"line_number":1774,"context_line":"                                             *additional_traits)"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_901978d8","line":1771,"range":{"start_line":1763,"start_character":24,"end_line":1771,"end_character":29},"in_reply_to":"9f560f44_7b530918","updated":"2020-08-07 03:16:26.000000000","message":"let\u0027s wait for aother reviewer to check this.","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"93f64a9d85a021b6085774e2899ea7d0d2aee6ae","unresolved":false,"context_lines":[{"line_number":1770,"context_line":"                                \u0027invalid\u0027: invalid"},{"line_number":1771,"context_line":"                            }"},{"line_number":1772,"context_line":"                        )"},{"line_number":1773,"context_line":"                    provider_tree.add_traits(provider.uuid,"},{"line_number":1774,"context_line":"                                             *additional_traits)"},{"line_number":1775,"context_line":""},{"line_number":1776,"context_line":"                if additional_inventories:"},{"line_number":1777,"context_line":"                    merged_inventory \u003d provider.inventory"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_386fc5c5","line":1774,"range":{"start_line":1773,"start_character":0,"end_line":1774,"end_character":64},"updated":"2020-08-06 09:19:12.000000000","message":"would fit on one line","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"d7e26a403993f1377826bac1e6ca375fead96d3d","unresolved":false,"context_lines":[{"line_number":1770,"context_line":"                                \u0027invalid\u0027: invalid"},{"line_number":1771,"context_line":"                            }"},{"line_number":1772,"context_line":"                        )"},{"line_number":1773,"context_line":"                    provider_tree.add_traits(provider.uuid,"},{"line_number":1774,"context_line":"                                             *additional_traits)"},{"line_number":1775,"context_line":""},{"line_number":1776,"context_line":"                if additional_inventories:"},{"line_number":1777,"context_line":"                    merged_inventory \u003d provider.inventory"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_302a2cda","line":1774,"range":{"start_line":1773,"start_character":0,"end_line":1774,"end_character":64},"in_reply_to":"9f560f44_386fc5c5","updated":"2020-08-07 03:16:26.000000000","message":"Done","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"93f64a9d85a021b6085774e2899ea7d0d2aee6ae","unresolved":false,"context_lines":[{"line_number":1781,"context_line":"                    if intersect:"},{"line_number":1782,"context_line":"                        invalid \u003d \u0027,\u0027.join(intersect)"},{"line_number":1783,"context_line":"                        raise ValueError(_("},{"line_number":1784,"context_line":"                            \"Provider Config: %(source_file_name)s attempts \""},{"line_number":1785,"context_line":"                            \"to define an inventory that is owned by the \""},{"line_number":1786,"context_line":"                            \"virt driver. Invalid inventories: %(invalid)s \""},{"line_number":1787,"context_line":"                            \"must be removed from %(source_file_name)s.\") % {"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_18800146","line":1784,"range":{"start_line":1784,"start_character":38,"end_line":1784,"end_character":44},"updated":"2020-08-06 09:19:12.000000000","message":"config","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"93f64a9d85a021b6085774e2899ea7d0d2aee6ae","unresolved":false,"context_lines":[{"line_number":1781,"context_line":"                    if intersect:"},{"line_number":1782,"context_line":"                        invalid \u003d \u0027,\u0027.join(intersect)"},{"line_number":1783,"context_line":"                        raise ValueError(_("},{"line_number":1784,"context_line":"                            \"Provider Config: %(source_file_name)s attempts \""},{"line_number":1785,"context_line":"                            \"to define an inventory that is owned by the \""},{"line_number":1786,"context_line":"                            \"virt driver. Invalid inventories: %(invalid)s \""},{"line_number":1787,"context_line":"                            \"must be removed from %(source_file_name)s.\") % {"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_789addb8","line":1784,"range":{"start_line":1784,"start_character":44,"end_line":1784,"end_character":66},"updated":"2020-08-06 09:19:12.000000000","message":"single quotes instead of colons?","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"d7e26a403993f1377826bac1e6ca375fead96d3d","unresolved":false,"context_lines":[{"line_number":1781,"context_line":"                    if intersect:"},{"line_number":1782,"context_line":"                        invalid \u003d \u0027,\u0027.join(intersect)"},{"line_number":1783,"context_line":"                        raise ValueError(_("},{"line_number":1784,"context_line":"                            \"Provider Config: %(source_file_name)s attempts \""},{"line_number":1785,"context_line":"                            \"to define an inventory that is owned by the \""},{"line_number":1786,"context_line":"                            \"virt driver. Invalid inventories: %(invalid)s \""},{"line_number":1787,"context_line":"                            \"must be removed from %(source_file_name)s.\") % {"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_7b1be571","line":1784,"range":{"start_line":1784,"start_character":38,"end_line":1784,"end_character":44},"in_reply_to":"9f560f44_18800146","updated":"2020-08-07 03:16:26.000000000","message":"Done","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"d7e26a403993f1377826bac1e6ca375fead96d3d","unresolved":false,"context_lines":[{"line_number":1781,"context_line":"                    if intersect:"},{"line_number":1782,"context_line":"                        invalid \u003d \u0027,\u0027.join(intersect)"},{"line_number":1783,"context_line":"                        raise ValueError(_("},{"line_number":1784,"context_line":"                            \"Provider Config: %(source_file_name)s attempts \""},{"line_number":1785,"context_line":"                            \"to define an inventory that is owned by the \""},{"line_number":1786,"context_line":"                            \"virt driver. Invalid inventories: %(invalid)s \""},{"line_number":1787,"context_line":"                            \"must be removed from %(source_file_name)s.\") % {"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_501b60c8","line":1784,"range":{"start_line":1784,"start_character":44,"end_line":1784,"end_character":66},"in_reply_to":"9f560f44_789addb8","updated":"2020-08-07 03:16:26.000000000","message":"Done","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"93f64a9d85a021b6085774e2899ea7d0d2aee6ae","unresolved":false,"context_lines":[{"line_number":1786,"context_line":"                            \"virt driver. Invalid inventories: %(invalid)s \""},{"line_number":1787,"context_line":"                            \"must be removed from %(source_file_name)s.\") % {"},{"line_number":1788,"context_line":"                                \u0027source_file_name\u0027: source_file_name,"},{"line_number":1789,"context_line":"                                \u0027invalid\u0027: invalid"},{"line_number":1790,"context_line":"                            }"},{"line_number":1791,"context_line":"                        )"},{"line_number":1792,"context_line":"                    for inventory in additional_inventories:"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_38a4e507","line":1789,"range":{"start_line":1789,"start_character":43,"end_line":1789,"end_character":50},"updated":"2020-08-06 09:19:12.000000000","message":"nit: replace with\n\n  \u0027,\u0027.join(intersect)\n\ndirectly?","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"d7e26a403993f1377826bac1e6ca375fead96d3d","unresolved":false,"context_lines":[{"line_number":1786,"context_line":"                            \"virt driver. Invalid inventories: %(invalid)s \""},{"line_number":1787,"context_line":"                            \"must be removed from %(source_file_name)s.\") % {"},{"line_number":1788,"context_line":"                                \u0027source_file_name\u0027: source_file_name,"},{"line_number":1789,"context_line":"                                \u0027invalid\u0027: invalid"},{"line_number":1790,"context_line":"                            }"},{"line_number":1791,"context_line":"                        )"},{"line_number":1792,"context_line":"                    for inventory in additional_inventories:"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_306fcc2b","line":1789,"range":{"start_line":1789,"start_character":43,"end_line":1789,"end_character":50},"in_reply_to":"9f560f44_38a4e507","updated":"2020-08-07 03:16:26.000000000","message":"Done","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"93f64a9d85a021b6085774e2899ea7d0d2aee6ae","unresolved":false,"context_lines":[{"line_number":1791,"context_line":"                        )"},{"line_number":1792,"context_line":"                    for inventory in additional_inventories:"},{"line_number":1793,"context_line":"                        merged_inventory.update(inventory)"},{"line_number":1794,"context_line":"                    provider_tree.update_inventory(provider.uuid,"},{"line_number":1795,"context_line":"                                                   merged_inventory)"},{"line_number":1796,"context_line":""},{"line_number":1797,"context_line":"    def _get_providers_to_update(self, uuid_or_name, provider_tree,"},{"line_number":1798,"context_line":"                                 source_file):"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_f8eb8d0f","line":1795,"range":{"start_line":1794,"start_character":0,"end_line":1795,"end_character":68},"updated":"2020-08-06 09:19:12.000000000","message":"nit:\n\n  provider_tree.update_inventory(\n      provider.uuid, merged_inventory)","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"d7e26a403993f1377826bac1e6ca375fead96d3d","unresolved":false,"context_lines":[{"line_number":1791,"context_line":"                        )"},{"line_number":1792,"context_line":"                    for inventory in additional_inventories:"},{"line_number":1793,"context_line":"                        merged_inventory.update(inventory)"},{"line_number":1794,"context_line":"                    provider_tree.update_inventory(provider.uuid,"},{"line_number":1795,"context_line":"                                                   merged_inventory)"},{"line_number":1796,"context_line":""},{"line_number":1797,"context_line":"    def _get_providers_to_update(self, uuid_or_name, provider_tree,"},{"line_number":1798,"context_line":"                                 source_file):"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_7075c4f9","line":1795,"range":{"start_line":1794,"start_character":0,"end_line":1795,"end_character":68},"in_reply_to":"9f560f44_f8eb8d0f","updated":"2020-08-07 03:16:26.000000000","message":"Done","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"93f64a9d85a021b6085774e2899ea7d0d2aee6ae","unresolved":false,"context_lines":[{"line_number":1805,"context_line":""},{"line_number":1806,"context_line":"        :returns: list of ProviderData"},{"line_number":1807,"context_line":"        \"\"\""},{"line_number":1808,"context_line":"        if uuid_or_name \u003d\u003d \"$COMPUTE_NODE\":"},{"line_number":1809,"context_line":"            return [root.data() for root in provider_tree.roots"},{"line_number":1810,"context_line":"                    if os_traits.COMPUTE_NODE in root.traits]"},{"line_number":1811,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_78df7d68","line":1808,"updated":"2020-08-06 09:19:12.000000000","message":"A comment on what this is for would be beneficial here too","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"d7e26a403993f1377826bac1e6ca375fead96d3d","unresolved":false,"context_lines":[{"line_number":1805,"context_line":""},{"line_number":1806,"context_line":"        :returns: list of ProviderData"},{"line_number":1807,"context_line":"        \"\"\""},{"line_number":1808,"context_line":"        if uuid_or_name \u003d\u003d \"$COMPUTE_NODE\":"},{"line_number":1809,"context_line":"            return [root.data() for root in provider_tree.roots"},{"line_number":1810,"context_line":"                    if os_traits.COMPUTE_NODE in root.traits]"},{"line_number":1811,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_1053a86c","line":1808,"in_reply_to":"9f560f44_78df7d68","updated":"2020-08-07 03:16:26.000000000","message":"Done","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"93f64a9d85a021b6085774e2899ea7d0d2aee6ae","unresolved":false,"context_lines":[{"line_number":1810,"context_line":"                    if os_traits.COMPUTE_NODE in root.traits]"},{"line_number":1811,"context_line":"        try:"},{"line_number":1812,"context_line":"            providers_to_update \u003d [provider_tree.data(uuid_or_name)]"},{"line_number":1813,"context_line":"            # Remove the provider from absent provider list so we can re-warn"},{"line_number":1814,"context_line":"            # if the provider disappears later"},{"line_number":1815,"context_line":"            self._absent_providers.discard(uuid_or_name)"},{"line_number":1816,"context_line":"        except ValueError:"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_f8d42d4a","line":1813,"range":{"start_line":1813,"start_character":59,"end_line":1813,"end_character":60},"updated":"2020-08-06 09:19:12.000000000","message":"if present","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"d7e26a403993f1377826bac1e6ca375fead96d3d","unresolved":false,"context_lines":[{"line_number":1810,"context_line":"                    if os_traits.COMPUTE_NODE in root.traits]"},{"line_number":1811,"context_line":"        try:"},{"line_number":1812,"context_line":"            providers_to_update \u003d [provider_tree.data(uuid_or_name)]"},{"line_number":1813,"context_line":"            # Remove the provider from absent provider list so we can re-warn"},{"line_number":1814,"context_line":"            # if the provider disappears later"},{"line_number":1815,"context_line":"            self._absent_providers.discard(uuid_or_name)"},{"line_number":1816,"context_line":"        except ValueError:"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_108608ba","line":1813,"range":{"start_line":1813,"start_character":59,"end_line":1813,"end_character":60},"in_reply_to":"9f560f44_f8d42d4a","updated":"2020-08-07 03:16:26.000000000","message":"Done","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"93f64a9d85a021b6085774e2899ea7d0d2aee6ae","unresolved":false,"context_lines":[{"line_number":1811,"context_line":"        try:"},{"line_number":1812,"context_line":"            providers_to_update \u003d [provider_tree.data(uuid_or_name)]"},{"line_number":1813,"context_line":"            # Remove the provider from absent provider list so we can re-warn"},{"line_number":1814,"context_line":"            # if the provider disappears later"},{"line_number":1815,"context_line":"            self._absent_providers.discard(uuid_or_name)"},{"line_number":1816,"context_line":"        except ValueError:"},{"line_number":1817,"context_line":"            providers_to_update \u003d []"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_d8d7a94a","line":1814,"range":{"start_line":1814,"start_character":40,"end_line":1814,"end_character":41},"updated":"2020-08-06 09:19:12.000000000","message":"again","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"d7e26a403993f1377826bac1e6ca375fead96d3d","unresolved":false,"context_lines":[{"line_number":1811,"context_line":"        try:"},{"line_number":1812,"context_line":"            providers_to_update \u003d [provider_tree.data(uuid_or_name)]"},{"line_number":1813,"context_line":"            # Remove the provider from absent provider list so we can re-warn"},{"line_number":1814,"context_line":"            # if the provider disappears later"},{"line_number":1815,"context_line":"            self._absent_providers.discard(uuid_or_name)"},{"line_number":1816,"context_line":"        except ValueError:"},{"line_number":1817,"context_line":"            providers_to_update \u003d []"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_308b4cc3","line":1814,"range":{"start_line":1814,"start_character":40,"end_line":1814,"end_character":41},"in_reply_to":"9f560f44_d8d7a94a","updated":"2020-08-07 03:16:26.000000000","message":"Done","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"93f64a9d85a021b6085774e2899ea7d0d2aee6ae","unresolved":false,"context_lines":[{"line_number":1816,"context_line":"        except ValueError:"},{"line_number":1817,"context_line":"            providers_to_update \u003d []"},{"line_number":1818,"context_line":"            if uuid_or_name not in self._absent_providers:"},{"line_number":1819,"context_line":"                LOG.warning(\"Provider %(uuid_or_name)s specified in provider \""},{"line_number":1820,"context_line":"                            \"config file %(source_file)s does not exist in the\""},{"line_number":1821,"context_line":"                            \" ProviderTree and will be ignored.\","},{"line_number":1822,"context_line":"                            {\"uuid_or_name\": uuid_or_name,"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_18ce41b3","line":1819,"range":{"start_line":1819,"start_character":38,"end_line":1819,"end_character":54},"updated":"2020-08-06 09:19:12.000000000","message":"can you surround in single quotes\n\nAlso, consider placing content on a new line\n\n  LOG.warning(\n      \"Provider \u0027%(uuid_or_name)s\u0027 specified ...\"\n      ...\n  )","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"d7e26a403993f1377826bac1e6ca375fead96d3d","unresolved":false,"context_lines":[{"line_number":1816,"context_line":"        except ValueError:"},{"line_number":1817,"context_line":"            providers_to_update \u003d []"},{"line_number":1818,"context_line":"            if uuid_or_name not in self._absent_providers:"},{"line_number":1819,"context_line":"                LOG.warning(\"Provider %(uuid_or_name)s specified in provider \""},{"line_number":1820,"context_line":"                            \"config file %(source_file)s does not exist in the\""},{"line_number":1821,"context_line":"                            \" ProviderTree and will be ignored.\","},{"line_number":1822,"context_line":"                            {\"uuid_or_name\": uuid_or_name,"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_50f7e059","line":1819,"range":{"start_line":1819,"start_character":38,"end_line":1819,"end_character":54},"in_reply_to":"9f560f44_18ce41b3","updated":"2020-08-07 03:16:26.000000000","message":"Done","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"93f64a9d85a021b6085774e2899ea7d0d2aee6ae","unresolved":false,"context_lines":[{"line_number":1818,"context_line":"            if uuid_or_name not in self._absent_providers:"},{"line_number":1819,"context_line":"                LOG.warning(\"Provider %(uuid_or_name)s specified in provider \""},{"line_number":1820,"context_line":"                            \"config file %(source_file)s does not exist in the\""},{"line_number":1821,"context_line":"                            \" ProviderTree and will be ignored.\","},{"line_number":1822,"context_line":"                            {\"uuid_or_name\": uuid_or_name,"},{"line_number":1823,"context_line":"                             \"source_file\": source_file})"},{"line_number":1824,"context_line":"                self._absent_providers.add(uuid_or_name)"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_38406507","line":1821,"range":{"start_line":1821,"start_character":29,"end_line":1821,"end_character":30},"updated":"2020-08-06 09:19:12.000000000","message":"spaces at the end of the line, not the start","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"d7e26a403993f1377826bac1e6ca375fead96d3d","unresolved":false,"context_lines":[{"line_number":1818,"context_line":"            if uuid_or_name not in self._absent_providers:"},{"line_number":1819,"context_line":"                LOG.warning(\"Provider %(uuid_or_name)s specified in provider \""},{"line_number":1820,"context_line":"                            \"config file %(source_file)s does not exist in the\""},{"line_number":1821,"context_line":"                            \" ProviderTree and will be ignored.\","},{"line_number":1822,"context_line":"                            {\"uuid_or_name\": uuid_or_name,"},{"line_number":1823,"context_line":"                             \"source_file\": source_file})"},{"line_number":1824,"context_line":"                self._absent_providers.add(uuid_or_name)"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_709144f1","line":1821,"range":{"start_line":1821,"start_character":29,"end_line":1821,"end_character":30},"in_reply_to":"9f560f44_38406507","updated":"2020-08-07 03:16:26.000000000","message":"Done","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"28bec26db3f79e958b90e56ea21f56eab65d2d2e","unresolved":false,"context_lines":[{"line_number":1762,"context_line":""},{"line_number":1763,"context_line":"                if additional_traits:"},{"line_number":1764,"context_line":"                    intersect \u003d set(provider.traits) \u0026 set(additional_traits)"},{"line_number":1765,"context_line":"                    if intersect:"},{"line_number":1766,"context_line":"                        invalid \u003d \u0027,\u0027.join(intersect)"},{"line_number":1767,"context_line":"                        raise ValueError(_("},{"line_number":1768,"context_line":"                            \"Provider config \u0027%(source_file_name)s\u0027 attempts \""}],"source_content_type":"text/x-python","patch_set":57,"id":"9f560f44_1226d017","line":1765,"range":{"start_line":1765,"start_character":20,"end_line":1765,"end_character":33},"updated":"2020-08-12 14:57:48.000000000","message":"If the user adds their own custom trait manually through the placement, then the nova-compute will stop.\n\nI guess this is the case we want to error out at startup, but ignore after startup.","commit_id":"9f112c712613de84d658743dfb16dbeec952dcae"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"7922012162045dc4e1894a5c595259ea9b5f7cd5","unresolved":false,"context_lines":[{"line_number":1762,"context_line":""},{"line_number":1763,"context_line":"                if additional_traits:"},{"line_number":1764,"context_line":"                    intersect \u003d set(provider.traits) \u0026 set(additional_traits)"},{"line_number":1765,"context_line":"                    if intersect:"},{"line_number":1766,"context_line":"                        invalid \u003d \u0027,\u0027.join(intersect)"},{"line_number":1767,"context_line":"                        raise ValueError(_("},{"line_number":1768,"context_line":"                            \"Provider config \u0027%(source_file_name)s\u0027 attempts \""}],"source_content_type":"text/x-python","patch_set":57,"id":"9f560f44_a14fb990","line":1765,"range":{"start_line":1765,"start_character":20,"end_line":1765,"end_character":33},"in_reply_to":"9f560f44_1226d017","updated":"2020-08-14 04:18:58.000000000","message":"I see now, the later patch adds the code to ignore the check","commit_id":"9f112c712613de84d658743dfb16dbeec952dcae"}],"nova/conf/compute.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c320f205a37167f1487e735f5b652f28da7e7bbe","unresolved":false,"context_lines":[{"line_number":303,"context_line":"  agent disabled. When used with libvirt the instance mode should be"},{"line_number":304,"context_line":"  configured as HVM."},{"line_number":305,"context_line":" \"\"\"),"},{"line_number":306,"context_line":"    cfg.StrOpt(\u0027provider_config\u0027,"},{"line_number":307,"context_line":"        default\u003d\u0027/etc/nova/provider_config/\u0027,"},{"line_number":308,"context_line":"        help\u003d\"\"\""},{"line_number":309,"context_line":"Path to a directory of yaml files containing resource provider configuration."}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_9e885822","line":306,"range":{"start_line":306,"start_character":16,"end_line":306,"end_character":31},"updated":"2019-09-03 23:06:35.000000000","message":"This is a weird name for an option whose value is a directory.\n\nI confirmed that this is what\u0027s in the spec.\n\nAnd now I remember the discussion, someone complained that \"..._path\" implies a single file - which I\u0027m not sure I agree with anyway - and \"..._dir\" doesn\u0027t leave us open to allowing it to be e.g. a glob.\n\nBut I still think \"provider_config\" isn\u0027t a good name. Even \"provider_config_location\" would be better.","commit_id":"ad56b9f12f3e0b21e80b715da1d11a7d19d907b5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c320f205a37167f1487e735f5b652f28da7e7bbe","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        default\u003d\u0027/etc/nova/provider_config/\u0027,"},{"line_number":308,"context_line":"        help\u003d\"\"\""},{"line_number":309,"context_line":"Path to a directory of yaml files containing resource provider configuration."},{"line_number":310,"context_line":"Files in this directory will be processed in lexicographic order."},{"line_number":311,"context_line":"\"\"\")"},{"line_number":312,"context_line":"]"},{"line_number":313,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_3e79242e","line":310,"updated":"2019-09-03 23:06:35.000000000","message":"If we\u0027re allowed to reference documentation from conf helps, we should do that here.\n\nCourse, the documentation needs to exist :P","commit_id":"ad56b9f12f3e0b21e80b715da1d11a7d19d907b5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"269a8bc14c814c1b4dcbadda85e7fbb942be6da6","unresolved":false,"context_lines":[{"line_number":303,"context_line":"  agent disabled. When used with libvirt the instance mode should be"},{"line_number":304,"context_line":"  configured as HVM."},{"line_number":305,"context_line":" \"\"\"),"},{"line_number":306,"context_line":"    cfg.StrOpt(\u0027provider_config_location\u0027,"},{"line_number":307,"context_line":"        default\u003d\u0027/etc/nova/provider_config/\u0027,"},{"line_number":308,"context_line":"        help\u003d\"\"\""},{"line_number":309,"context_line":"Location of yaml files containing resource provider configuration."}],"source_content_type":"text/x-python","patch_set":21,"id":"3fa7e38b_0c5e2212","line":306,"updated":"2019-10-18 22:58:48.000000000","message":"spec says this is called [compute]provider_config [1].\n\n- If we decide to call it provider_config_location, we should add that to our spec update bucket.\n- Right now this is in DEFAULT [2]. If you want it in [compute], you should define it in compute_group_opts (L731).\n\n[1] http://specs.openstack.org/openstack/nova-specs/specs/ussuri/approved/provider-config-file.html#provider-config-consumption-from-nova\n[2] https://storage.gra1.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_f99/676522/21/check/openstack-tox-docs/f99abfb/docs/configuration/config.html#DEFAULT.provider_config_location","commit_id":"54ee2f43551696c9fc4edcc613a1e6ba43082e68"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"269a8bc14c814c1b4dcbadda85e7fbb942be6da6","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        default\u003d\u0027/etc/nova/provider_config/\u0027,"},{"line_number":308,"context_line":"        help\u003d\"\"\""},{"line_number":309,"context_line":"Location of yaml files containing resource provider configuration."},{"line_number":310,"context_line":"Files in this directory will be processed in lexicographic order."},{"line_number":311,"context_line":"\"\"\")"},{"line_number":312,"context_line":"]"},{"line_number":313,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"3fa7e38b_8cce92b2","line":310,"range":{"start_line":310,"start_character":42,"end_line":310,"end_character":64},"updated":"2019-10-18 22:58:48.000000000","message":"This is not currently true per the previous patch [1] (but maybe it doesn\u0027t need to be, see again [1]). In any case, we need to make this and the spec and the code agree.\n\n[1] https://review.opendev.org/#/c/676029/19/nova/compute/provider_config.py@197","commit_id":"54ee2f43551696c9fc4edcc613a1e6ba43082e68"}],"nova/tests/unit/compute/test_resource_tracker.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3b44fa2a1637314cbe6287af051442da264f5af3","unresolved":false,"context_lines":[{"line_number":3654,"context_line":"                                        self.TEST_PROVIDER_CFG}"},{"line_number":3655,"context_line":"        compute_node \u003d _COMPUTE_NODE_FIXTURES[0]"},{"line_number":3656,"context_line":"        p_tree \u003d self._setup_ptree(compute_node)"},{"line_number":3657,"context_line":"        mock_update_inventory \u003d mock.Mock()"},{"line_number":3658,"context_line":"        mock_add_traits \u003d mock.Mock()"},{"line_number":3659,"context_line":"        p_tree.update_inventory \u003d mock_update_inventory"},{"line_number":3660,"context_line":"        p_tree.add_traits \u003d mock_add_traits"},{"line_number":3661,"context_line":""},{"line_number":3662,"context_line":"        self.rt._update_custom_resources(p_tree)"},{"line_number":3663,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_bcdbe71e","line":3660,"range":{"start_line":3657,"start_character":0,"end_line":3660,"end_character":43},"updated":"2019-09-03 15:00:28.000000000","message":"This isn\u0027t proper mocking. To mock out a method on an object like this, you should do something more like:\n\n mock_update_inventory \u003d self.useFixture(fixtures.MockPatchObject(\n     p_tree, \u0027update_inventory\u0027)).mock\n\nSame applies in the _setup_ptree helper -- not sure how I let that one slide by before.","commit_id":"1478f02786fb0e22c5feb6baf4d20d905d294962"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3b44fa2a1637314cbe6287af051442da264f5af3","unresolved":false,"context_lines":[{"line_number":3670,"context_line":"    @mock.patch.object(resource_tracker, \u0027LOG\u0027)"},{"line_number":3671,"context_line":"    def test_unknown_resource_provider(self, mock_log):"},{"line_number":3672,"context_line":"        self._setup_rt()"},{"line_number":3673,"context_line":"        p_config \u003d self.TEST_PROVIDER_CFG"},{"line_number":3674,"context_line":"        p_config[\"providers\"][0][\"identification\"][\"uuid\"] \u003d \\"},{"line_number":3675,"context_line":"            uuids.uprovider"},{"line_number":3676,"context_line":"        self.rt.custom_resources \u003d {\"test_provider_config.yaml\": p_config}"},{"line_number":3677,"context_line":"        compute_node \u003d _COMPUTE_NODE_FIXTURES[0]"},{"line_number":3678,"context_line":"        p_tree \u003d self._setup_ptree(compute_node)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_3c6b771f","line":3675,"range":{"start_line":3673,"start_character":8,"end_line":3675,"end_character":27},"updated":"2019-09-03 15:00:28.000000000","message":"I think this kind of thing is what\u0027s causing your test failures. You\u0027re modifying the class-wide TEST_PROVIDER_CFG in one test case (which is running in one instance of the test class) and that modification bleeds into other test cases (running in other instances).\n\nYou could deepcopy the TEST_PROVIDER_CFG in test cases where you\u0027re going to modify it; or you could just define it in setUp so it\u0027s instance-specific.\n\n In [1]: class Foo(object):\n    ...:     D \u003d dict(one\u003d2, three\u003d4)\n    ...:     def a(self, val):\n    ...:         self.D[\u0027one\u0027] \u003d val\n    ...:     def b(self):\n    ...:         print(self.D)\n    ...:         \n\n In [2]: f \u003d Foo()\n\n In [3]: f.b()\n {\u0027three\u0027: 4, \u0027one\u0027: 2}\n\n In [4]: f.a(5)\n\n In [5]: f.b()\n {\u0027three\u0027: 4, \u0027one\u0027: 5}\n\n In [6]: f2 \u003d Foo()\n\n In [7]: f2.b()\n {\u0027three\u0027: 4, \u0027one\u0027: 5}","commit_id":"1478f02786fb0e22c5feb6baf4d20d905d294962"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"baf9679acffbcda245bdf666dd1b5781255cc54f","unresolved":false,"context_lines":[{"line_number":3917,"context_line":"class ProviderConfigTestCases(BaseTestCase):"},{"line_number":3918,"context_line":"    @staticmethod"},{"line_number":3919,"context_line":"    def get_provider_config(uuid\u003duuids.cn1):"},{"line_number":3920,"context_line":"        return copy.deepcopy({"},{"line_number":3921,"context_line":"            \"__source_file\": \"test_provider_config.yaml\","},{"line_number":3922,"context_line":"            \"providers\": ["},{"line_number":3923,"context_line":"                {"}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_08eda0b7","line":3920,"range":{"start_line":3920,"start_character":15,"end_line":3920,"end_character":29},"updated":"2020-01-14 22:38:38.000000000","message":"This shouldn\u0027t be necessary","commit_id":"76f4166c0873d92c575f81fb0e72f612dde650be"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"1c29b855be85e13066022764832c9c95e8859a10","unresolved":false,"context_lines":[{"line_number":3917,"context_line":"class ProviderConfigTestCases(BaseTestCase):"},{"line_number":3918,"context_line":"    @staticmethod"},{"line_number":3919,"context_line":"    def get_provider_config(uuid\u003duuids.cn1):"},{"line_number":3920,"context_line":"        return copy.deepcopy({"},{"line_number":3921,"context_line":"            \"__source_file\": \"test_provider_config.yaml\","},{"line_number":3922,"context_line":"            \"providers\": ["},{"line_number":3923,"context_line":"                {"}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_bd0cc53a","line":3920,"range":{"start_line":3920,"start_character":15,"end_line":3920,"end_character":29},"in_reply_to":"3fa7e38b_08eda0b7","updated":"2020-01-15 06:23:53.000000000","message":"Done","commit_id":"76f4166c0873d92c575f81fb0e72f612dde650be"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"baf9679acffbcda245bdf666dd1b5781255cc54f","unresolved":false,"context_lines":[{"line_number":3918,"context_line":"    @staticmethod"},{"line_number":3919,"context_line":"    def get_provider_config(uuid\u003duuids.cn1):"},{"line_number":3920,"context_line":"        return copy.deepcopy({"},{"line_number":3921,"context_line":"            \"__source_file\": \"test_provider_config.yaml\","},{"line_number":3922,"context_line":"            \"providers\": ["},{"line_number":3923,"context_line":"                {"},{"line_number":3924,"context_line":"                    \"__source_file\": \"test_provider_config.yaml\","}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_882e70f7","line":3921,"range":{"start_line":3921,"start_character":12,"end_line":3921,"end_character":57},"updated":"2020-01-14 22:38:38.000000000","message":"This shouldn\u0027t exist here at the top level, right?","commit_id":"76f4166c0873d92c575f81fb0e72f612dde650be"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"1c29b855be85e13066022764832c9c95e8859a10","unresolved":false,"context_lines":[{"line_number":3918,"context_line":"    @staticmethod"},{"line_number":3919,"context_line":"    def get_provider_config(uuid\u003duuids.cn1):"},{"line_number":3920,"context_line":"        return copy.deepcopy({"},{"line_number":3921,"context_line":"            \"__source_file\": \"test_provider_config.yaml\","},{"line_number":3922,"context_line":"            \"providers\": ["},{"line_number":3923,"context_line":"                {"},{"line_number":3924,"context_line":"                    \"__source_file\": \"test_provider_config.yaml\","}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_1d087925","line":3921,"range":{"start_line":3921,"start_character":12,"end_line":3921,"end_character":57},"in_reply_to":"3fa7e38b_882e70f7","updated":"2020-01-15 06:23:53.000000000","message":"Done","commit_id":"76f4166c0873d92c575f81fb0e72f612dde650be"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"baf9679acffbcda245bdf666dd1b5781255cc54f","unresolved":false,"context_lines":[{"line_number":3951,"context_line":""},{"line_number":3952,"context_line":"    @mock.patch.object(resource_tracker.ResourceTracker,"},{"line_number":3953,"context_line":"                       \u0027_get_providers_to_update\u0027)"},{"line_number":3954,"context_line":"    @mock.patch.object(provider_tree.ProviderTree, \u0027add_traits\u0027)"},{"line_number":3955,"context_line":"    @mock.patch.object(provider_tree.ProviderTree, \u0027update_inventory\u0027)"},{"line_number":3956,"context_line":"    def test_merge_provider_configs(self, mock_update_inventory,"},{"line_number":3957,"context_line":"                                    mock_add_traits,"},{"line_number":3958,"context_line":"                                    mock_get_providers):"}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_88667028","line":3955,"range":{"start_line":3954,"start_character":0,"end_line":3955,"end_character":70},"updated":"2020-01-14 22:38:38.000000000","message":"Hm, don\u0027t love this, should leave those methods unmocked and assert that the end state of the traits/inventories is what you expect.","commit_id":"76f4166c0873d92c575f81fb0e72f612dde650be"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"1c29b855be85e13066022764832c9c95e8859a10","unresolved":false,"context_lines":[{"line_number":3951,"context_line":""},{"line_number":3952,"context_line":"    @mock.patch.object(resource_tracker.ResourceTracker,"},{"line_number":3953,"context_line":"                       \u0027_get_providers_to_update\u0027)"},{"line_number":3954,"context_line":"    @mock.patch.object(provider_tree.ProviderTree, \u0027add_traits\u0027)"},{"line_number":3955,"context_line":"    @mock.patch.object(provider_tree.ProviderTree, \u0027update_inventory\u0027)"},{"line_number":3956,"context_line":"    def test_merge_provider_configs(self, mock_update_inventory,"},{"line_number":3957,"context_line":"                                    mock_add_traits,"},{"line_number":3958,"context_line":"                                    mock_get_providers):"}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_fd023d08","line":3955,"range":{"start_line":3954,"start_character":0,"end_line":3955,"end_character":70},"in_reply_to":"3fa7e38b_88667028","updated":"2020-01-15 06:23:53.000000000","message":"Done","commit_id":"76f4166c0873d92c575f81fb0e72f612dde650be"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"baf9679acffbcda245bdf666dd1b5781255cc54f","unresolved":false,"context_lines":[{"line_number":3957,"context_line":"                                    mock_add_traits,"},{"line_number":3958,"context_line":"                                    mock_get_providers):"},{"line_number":3959,"context_line":"        self._setup_rt()"},{"line_number":3960,"context_line":"        provider_cfg \u003d self.get_provider_config()"},{"line_number":3961,"context_line":"        provider \u003d provider_cfg[\u0027providers\u0027][0]"},{"line_number":3962,"context_line":"        cn_provider_cfg \u003d self.get_provider_config(uuid\u003d\"$COMPUTE_NODE\")"},{"line_number":3963,"context_line":"        cn_provider \u003d cn_provider_cfg[\u0027providers\u0027][0]"}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_6804541a","line":3960,"updated":"2020-01-14 22:38:38.000000000","message":"nit: wasting a lot of variables here","commit_id":"76f4166c0873d92c575f81fb0e72f612dde650be"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"1c29b855be85e13066022764832c9c95e8859a10","unresolved":false,"context_lines":[{"line_number":3957,"context_line":"                                    mock_add_traits,"},{"line_number":3958,"context_line":"                                    mock_get_providers):"},{"line_number":3959,"context_line":"        self._setup_rt()"},{"line_number":3960,"context_line":"        provider_cfg \u003d self.get_provider_config()"},{"line_number":3961,"context_line":"        provider \u003d provider_cfg[\u0027providers\u0027][0]"},{"line_number":3962,"context_line":"        cn_provider_cfg \u003d self.get_provider_config(uuid\u003d\"$COMPUTE_NODE\")"},{"line_number":3963,"context_line":"        cn_provider \u003d cn_provider_cfg[\u0027providers\u0027][0]"}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_5dfef104","line":3960,"in_reply_to":"3fa7e38b_6804541a","updated":"2020-01-15 06:23:53.000000000","message":"Done","commit_id":"76f4166c0873d92c575f81fb0e72f612dde650be"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"baf9679acffbcda245bdf666dd1b5781255cc54f","unresolved":false,"context_lines":[{"line_number":3963,"context_line":"        cn_provider \u003d cn_provider_cfg[\u0027providers\u0027][0]"},{"line_number":3964,"context_line":"        provider_configs \u003d {provider[\u0027identification\u0027][\u0027uuid\u0027]: provider,"},{"line_number":3965,"context_line":"                            \"$COMPUTE_NODE\": cn_provider}"},{"line_number":3966,"context_line":"        compute_node \u003d _COMPUTE_NODE_FIXTURES[0]"},{"line_number":3967,"context_line":"        p_tree \u003d self._setup_ptree(compute_node)"},{"line_number":3968,"context_line":"        providers_to_update \u003d [p_tree.data(compute_node.uuid)]"},{"line_number":3969,"context_line":"        mock_get_providers.return_value \u003d providers_to_update"},{"line_number":3970,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_c320c99d","line":3967,"range":{"start_line":3966,"start_character":0,"end_line":3967,"end_character":48},"updated":"2020-01-14 22:38:38.000000000","message":"this part seems duplicated in all tests, can just do it in setUp","commit_id":"76f4166c0873d92c575f81fb0e72f612dde650be"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"1c29b855be85e13066022764832c9c95e8859a10","unresolved":false,"context_lines":[{"line_number":3963,"context_line":"        cn_provider \u003d cn_provider_cfg[\u0027providers\u0027][0]"},{"line_number":3964,"context_line":"        provider_configs \u003d {provider[\u0027identification\u0027][\u0027uuid\u0027]: provider,"},{"line_number":3965,"context_line":"                            \"$COMPUTE_NODE\": cn_provider}"},{"line_number":3966,"context_line":"        compute_node \u003d _COMPUTE_NODE_FIXTURES[0]"},{"line_number":3967,"context_line":"        p_tree \u003d self._setup_ptree(compute_node)"},{"line_number":3968,"context_line":"        providers_to_update \u003d [p_tree.data(compute_node.uuid)]"},{"line_number":3969,"context_line":"        mock_get_providers.return_value \u003d providers_to_update"},{"line_number":3970,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_5a2d9743","line":3967,"range":{"start_line":3966,"start_character":0,"end_line":3967,"end_character":48},"in_reply_to":"3fa7e38b_c320c99d","updated":"2020-01-15 06:23:53.000000000","message":"Done","commit_id":"76f4166c0873d92c575f81fb0e72f612dde650be"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"baf9679acffbcda245bdf666dd1b5781255cc54f","unresolved":false,"context_lines":[{"line_number":3976,"context_line":""},{"line_number":3977,"context_line":"        mock_update_inventory.assert_called_once_with(compute_node.uuid,"},{"line_number":3978,"context_line":"                                                      additional_inventory)"},{"line_number":3979,"context_line":"        mock_add_traits.assert_called_once_with("},{"line_number":3980,"context_line":"            compute_node.uuid, *provider[\u0027traits\u0027][\u0027additional\u0027])"},{"line_number":3981,"context_line":""},{"line_number":3982,"context_line":"    def test__get_providers_to_update(self):"}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_6391d59b","line":3979,"range":{"start_line":3979,"start_character":38,"end_line":3979,"end_character":42},"updated":"2020-01-14 22:38:38.000000000","message":"Okay, I think you\u0027re asserting that we updated based on the entry with the explicit UUID rather than the one with $COMPUTE_NODE. Would be nice to add a comment to that effect; and also beef up the test to prove that more rigorously, e.g. by making the additional traits/inventories different between the two.","commit_id":"76f4166c0873d92c575f81fb0e72f612dde650be"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"1c29b855be85e13066022764832c9c95e8859a10","unresolved":false,"context_lines":[{"line_number":3976,"context_line":""},{"line_number":3977,"context_line":"        mock_update_inventory.assert_called_once_with(compute_node.uuid,"},{"line_number":3978,"context_line":"                                                      additional_inventory)"},{"line_number":3979,"context_line":"        mock_add_traits.assert_called_once_with("},{"line_number":3980,"context_line":"            compute_node.uuid, *provider[\u0027traits\u0027][\u0027additional\u0027])"},{"line_number":3981,"context_line":""},{"line_number":3982,"context_line":"    def test__get_providers_to_update(self):"}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_9afeaf04","line":3979,"range":{"start_line":3979,"start_character":38,"end_line":3979,"end_character":42},"in_reply_to":"3fa7e38b_6391d59b","updated":"2020-01-15 06:23:53.000000000","message":"Done","commit_id":"76f4166c0873d92c575f81fb0e72f612dde650be"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"baf9679acffbcda245bdf666dd1b5781255cc54f","unresolved":false,"context_lines":[{"line_number":3999,"context_line":"        compute_node \u003d _COMPUTE_NODE_FIXTURES[0]"},{"line_number":4000,"context_line":"        p_tree \u003d self._setup_ptree(compute_node)"},{"line_number":4001,"context_line":"        test_roots \u003d {"},{"line_number":4002,"context_line":"            uuids.root1: provider_tree.ProviderData("},{"line_number":4003,"context_line":"                uuids.root1, str(uuids.root1), None, None, [],"},{"line_number":4004,"context_line":"                [os_traits.COMPUTE_NODE], None, None),"},{"line_number":4005,"context_line":"            uuids.root2: provider_tree.ProviderData("}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_286e5c64","line":4002,"range":{"start_line":4002,"start_character":25,"end_line":4002,"end_character":51},"updated":"2020-01-14 22:38:38.000000000","message":"Oh, yeah, this is wrong; roots contains _ProviderZ, not ProviderDataZ.\n\nThe test would be more robust if you constructed the p_tree using the public methods. (Not sure why roots_by_* aren\u0027t private in the first place; that\u0027s tech debt.)\n\nAnd since you\u0027re doing that, add some children too, because we want to make sure we\u0027re ignoring those.","commit_id":"76f4166c0873d92c575f81fb0e72f612dde650be"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"1c29b855be85e13066022764832c9c95e8859a10","unresolved":false,"context_lines":[{"line_number":3999,"context_line":"        compute_node \u003d _COMPUTE_NODE_FIXTURES[0]"},{"line_number":4000,"context_line":"        p_tree \u003d self._setup_ptree(compute_node)"},{"line_number":4001,"context_line":"        test_roots \u003d {"},{"line_number":4002,"context_line":"            uuids.root1: provider_tree.ProviderData("},{"line_number":4003,"context_line":"                uuids.root1, str(uuids.root1), None, None, [],"},{"line_number":4004,"context_line":"                [os_traits.COMPUTE_NODE], None, None),"},{"line_number":4005,"context_line":"            uuids.root2: provider_tree.ProviderData("}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_daa50703","line":4002,"range":{"start_line":4002,"start_character":25,"end_line":4002,"end_character":51},"in_reply_to":"3fa7e38b_286e5c64","updated":"2020-01-15 06:23:53.000000000","message":"Done","commit_id":"76f4166c0873d92c575f81fb0e72f612dde650be"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"baf9679acffbcda245bdf666dd1b5781255cc54f","unresolved":false,"context_lines":[{"line_number":4028,"context_line":"            uuids.unknown, p_tree, provider[\u0027__source_file\u0027])"},{"line_number":4029,"context_line":"        self.rt._get_providers_to_update("},{"line_number":4030,"context_line":"            uuids.unknown, p_tree, provider[\u0027__source_file\u0027])"},{"line_number":4031,"context_line":"        # set().remove() raises a KeyError if the value does not exist, so"},{"line_number":4032,"context_line":"        # this also explicitly tests that the value is being added."},{"line_number":4033,"context_line":"        self.rt._absent_providers.remove(uuids.unknown)"},{"line_number":4034,"context_line":"        self.rt._get_providers_to_update("},{"line_number":4035,"context_line":"            uuids.unknown, p_tree, provider[\u0027__source_file\u0027])"},{"line_number":4036,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_a3ecad28","line":4033,"range":{"start_line":4031,"start_character":0,"end_line":4033,"end_character":55},"updated":"2020-01-14 22:38:38.000000000","message":"this is nice, but would arguably be better to feed a more realistic flow, e.g. where the ptree contains, then doesn\u0027t contain, then contains the unknown provider","commit_id":"76f4166c0873d92c575f81fb0e72f612dde650be"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"1c29b855be85e13066022764832c9c95e8859a10","unresolved":false,"context_lines":[{"line_number":4028,"context_line":"            uuids.unknown, p_tree, provider[\u0027__source_file\u0027])"},{"line_number":4029,"context_line":"        self.rt._get_providers_to_update("},{"line_number":4030,"context_line":"            uuids.unknown, p_tree, provider[\u0027__source_file\u0027])"},{"line_number":4031,"context_line":"        # set().remove() raises a KeyError if the value does not exist, so"},{"line_number":4032,"context_line":"        # this also explicitly tests that the value is being added."},{"line_number":4033,"context_line":"        self.rt._absent_providers.remove(uuids.unknown)"},{"line_number":4034,"context_line":"        self.rt._get_providers_to_update("},{"line_number":4035,"context_line":"            uuids.unknown, p_tree, provider[\u0027__source_file\u0027])"},{"line_number":4036,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_74c2e937","line":4033,"range":{"start_line":4031,"start_character":0,"end_line":4033,"end_character":55},"in_reply_to":"3fa7e38b_a3ecad28","updated":"2020-01-15 06:23:53.000000000","message":"Done","commit_id":"76f4166c0873d92c575f81fb0e72f612dde650be"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"79070948b88fd929ec1df08920c2c6d93c2c9021","unresolved":false,"context_lines":[{"line_number":3930,"context_line":"                \"inventories\": {"},{"line_number":3931,"context_line":"                    \"additional\": ["},{"line_number":3932,"context_line":"                        {"},{"line_number":3933,"context_line":"                            \"TEST_RESOURCE_CLASS_%s\" % _uuid: {"},{"line_number":3934,"context_line":"                                \"total\": 100,"},{"line_number":3935,"context_line":"                                \"reserved\": 0,"},{"line_number":3936,"context_line":"                                \"min_unit\": 1,"}],"source_content_type":"text/x-python","patch_set":38,"id":"3fa7e38b_15ffe5b1","line":3933,"range":{"start_line":3933,"start_character":29,"end_line":3933,"end_character":34},"updated":"2020-01-15 17:58:43.000000000","message":"This should be CUSTOM_","commit_id":"bc1eee5e6b3c3dbb613be1d1ba2f45af8488a842"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"47aa1fd1b6a743913fe6b918cc97296145e4f65e","unresolved":false,"context_lines":[{"line_number":3922,"context_line":""},{"line_number":3923,"context_line":"    @staticmethod"},{"line_number":3924,"context_line":"    def get_provider_config(uuid\u003duuids.cn1):"},{"line_number":3925,"context_line":"        _uuid \u003d uuid.strip(\"$\")"},{"line_number":3926,"context_line":"        return {\"__source_file\": \"test_provider_config.yaml\","},{"line_number":3927,"context_line":"                \"identification\": {"},{"line_number":3928,"context_line":"                    \"uuid\": uuid"}],"source_content_type":"text/x-python","patch_set":40,"id":"3fa7e38b_a7ea52d6","line":3925,"range":{"start_line":3925,"start_character":8,"end_line":3925,"end_character":31},"updated":"2020-01-16 22:16:00.000000000","message":"So what I was saying is, instead of doing this (and does it even work for UUIDs generated by uuidsentinel, cause don\u0027t those have hyphens and lowercase? I guess it would as long as you didn\u0027t try to push it to placement, where those would fail schema validation) you should instead do:\n\n rc \u003d orc.normalize_name(\u0027RESOURCE_CLASS_\u0027 + uuid)\n trait \u003d os_traits.normalize_name(\u0027TRAIT_\u0027 + uuid)\n\nIf uuid is a real uuid, you\u0027ll get something like\n\n CUSTOM_RESOURCE_CLASS_FC50DD17_B6D1_40F1_89F3_7C6F567A0C08\n\nand if it\u0027s $COMPUTE_NODE you\u0027ll get\n\n CUSTOM_RESOURCE_CLASS__COMPUTE_NODE","commit_id":"837d024b1e9899c34a081287d94216ed6513eb29"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"47aa1fd1b6a743913fe6b918cc97296145e4f65e","unresolved":false,"context_lines":[{"line_number":3974,"context_line":"        # add a new child provider with uuid from provider config"},{"line_number":3975,"context_line":"        self.p_tree.new_child(uuids.cp1, uuids.cn1, uuid\u003duuids.cp1)"},{"line_number":3976,"context_line":""},{"line_number":3977,"context_line":"        # test that only the child is found"},{"line_number":3978,"context_line":"        results \u003d [provider.uuid for provider"},{"line_number":3979,"context_line":"                   in self.rt._get_providers_to_update("},{"line_number":3980,"context_line":"                uuids.cp1, self.p_tree, provider[\u0027__source_file\u0027])]"}],"source_content_type":"text/x-python","patch_set":40,"id":"3fa7e38b_27a502b5","line":3977,"range":{"start_line":3977,"start_character":29,"end_line":3977,"end_character":34},"updated":"2020-01-16 22:16:00.000000000","message":"parent","commit_id":"837d024b1e9899c34a081287d94216ed6513eb29"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"225bd5a5d2e9c28ed4fe1474373a9869b4f282ce","unresolved":false,"context_lines":[{"line_number":3974,"context_line":"        # add a new child provider with uuid from provider config"},{"line_number":3975,"context_line":"        self.p_tree.new_child(uuids.cp1, uuids.cn1, uuid\u003duuids.cp1)"},{"line_number":3976,"context_line":""},{"line_number":3977,"context_line":"        # test that only the child is found"},{"line_number":3978,"context_line":"        results \u003d [provider.uuid for provider"},{"line_number":3979,"context_line":"                   in self.rt._get_providers_to_update("},{"line_number":3980,"context_line":"                uuids.cp1, self.p_tree, provider[\u0027__source_file\u0027])]"}],"source_content_type":"text/x-python","patch_set":40,"id":"3fa7e38b_74b87b77","line":3977,"range":{"start_line":3977,"start_character":29,"end_line":3977,"end_character":34},"in_reply_to":"3fa7e38b_27a502b5","updated":"2020-01-17 14:57:30.000000000","message":"Sorry, I was wrong here, disregard.","commit_id":"837d024b1e9899c34a081287d94216ed6513eb29"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9b0e050914bb1cc130513b5ec2ce774a921586bb","unresolved":false,"context_lines":[{"line_number":3974,"context_line":"        # test that only the child is found"},{"line_number":3975,"context_line":"        results \u003d [provider.uuid for provider"},{"line_number":3976,"context_line":"                   in self.rt._get_providers_to_update("},{"line_number":3977,"context_line":"                uuids.cp1, self.p_tree, provider[\u0027__source_file\u0027])]"},{"line_number":3978,"context_line":""},{"line_number":3979,"context_line":"        self.assertEqual([uuids.cp1], results)"},{"line_number":3980,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"3fa7e38b_794f0f35","line":3977,"range":{"start_line":3977,"start_character":15,"end_line":3977,"end_character":16},"updated":"2020-01-17 20:57:51.000000000","message":"this feels like a wrong indent","commit_id":"34318c6b8be57e62147915e67daacc8f848681cb"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"97456761e0c64d964b88f785b4e236ad1e8eab3a","unresolved":false,"context_lines":[{"line_number":3974,"context_line":"        # test that only the child is found"},{"line_number":3975,"context_line":"        results \u003d [provider.uuid for provider"},{"line_number":3976,"context_line":"                   in self.rt._get_providers_to_update("},{"line_number":3977,"context_line":"                uuids.cp1, self.p_tree, provider[\u0027__source_file\u0027])]"},{"line_number":3978,"context_line":""},{"line_number":3979,"context_line":"        self.assertEqual([uuids.cp1], results)"},{"line_number":3980,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"1fa4df85_6db472f3","line":3977,"range":{"start_line":3977,"start_character":15,"end_line":3977,"end_character":16},"in_reply_to":"3fa7e38b_794f0f35","updated":"2020-03-12 14:26:10.000000000","message":"its technically allowed but yes ill reformat this","commit_id":"34318c6b8be57e62147915e67daacc8f848681cb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9b0e050914bb1cc130513b5ec2ce774a921586bb","unresolved":false,"context_lines":[{"line_number":3982,"context_line":"        provider \u003d self.get_provider_config(uuid\u003d\"$compute_node\")"},{"line_number":3983,"context_line":""},{"line_number":3984,"context_line":"        # add some new roots with COMPUTE_NODE trait"},{"line_number":3985,"context_line":"        cn_uuids \u003d [self.p_tree.new_root(uuid, uuid) for uuid"},{"line_number":3986,"context_line":"                         in [uuids.cn2, uuids.cn3, uuids.cn4]]"},{"line_number":3987,"context_line":"        for cn_uuid in cn_uuids:"},{"line_number":3988,"context_line":"            self.p_tree.add_traits(cn_uuid, os_traits.COMPUTE_NODE)"},{"line_number":3989,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"3fa7e38b_99e68b13","line":3986,"range":{"start_line":3985,"start_character":0,"end_line":3986,"end_character":62},"updated":"2020-01-17 20:57:51.000000000","message":"I would ident this like:\n\n    cn_uuids \u003d [self.p_tree.new_root(uuid, uuid) \n                for uuid in [uuids.cn2, uuids.cn3, uuids.cn4]]","commit_id":"34318c6b8be57e62147915e67daacc8f848681cb"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"97456761e0c64d964b88f785b4e236ad1e8eab3a","unresolved":false,"context_lines":[{"line_number":3982,"context_line":"        provider \u003d self.get_provider_config(uuid\u003d\"$compute_node\")"},{"line_number":3983,"context_line":""},{"line_number":3984,"context_line":"        # add some new roots with COMPUTE_NODE trait"},{"line_number":3985,"context_line":"        cn_uuids \u003d [self.p_tree.new_root(uuid, uuid) for uuid"},{"line_number":3986,"context_line":"                         in [uuids.cn2, uuids.cn3, uuids.cn4]]"},{"line_number":3987,"context_line":"        for cn_uuid in cn_uuids:"},{"line_number":3988,"context_line":"            self.p_tree.add_traits(cn_uuid, os_traits.COMPUTE_NODE)"},{"line_number":3989,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"1fa4df85_edc70264","line":3986,"range":{"start_line":3985,"start_character":0,"end_line":3986,"end_character":62},"in_reply_to":"3fa7e38b_99e68b13","updated":"2020-03-12 14:26:10.000000000","message":"Done","commit_id":"34318c6b8be57e62147915e67daacc8f848681cb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"190aa524411ae86ab27deb9b691e4704563f5ea4","unresolved":false,"context_lines":[{"line_number":3953,"context_line":"        provider \u003d self.get_provider_config()"},{"line_number":3954,"context_line":"        cn_provider \u003d self.get_provider_config(uuid\u003d\"$COMPUTE_NODE\")"},{"line_number":3955,"context_line":""},{"line_number":3956,"context_line":"        # ensure uuids.cn1 provider has COMPUTE_NODE trait"},{"line_number":3957,"context_line":"        self.p_tree.add_traits(uuids.cn1, os_traits.COMPUTE_NODE)"},{"line_number":3958,"context_line":""},{"line_number":3959,"context_line":"        # test that only the explicit traits and inventories are merged"},{"line_number":3960,"context_line":"        self.rt._merge_provider_configs({\"$COMPUTE_NODE\": cn_provider,"}],"source_content_type":"text/x-python","patch_set":52,"id":"bf51134e_90d8f3f0","line":3957,"range":{"start_line":3956,"start_character":1,"end_line":3957,"end_character":65},"updated":"2020-07-21 15:57:55.000000000","message":"this setup should be in the fixture as the fixture should provide a correct compute provider tree.","commit_id":"f3198c1cd7de86aa62a10bc2ce80dcd1d199d291"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"9a1c579e3652f07a6741c2fcb08828c74a17ba47","unresolved":false,"context_lines":[{"line_number":3953,"context_line":"        provider \u003d self.get_provider_config()"},{"line_number":3954,"context_line":"        cn_provider \u003d self.get_provider_config(uuid\u003d\"$COMPUTE_NODE\")"},{"line_number":3955,"context_line":""},{"line_number":3956,"context_line":"        # ensure uuids.cn1 provider has COMPUTE_NODE trait"},{"line_number":3957,"context_line":"        self.p_tree.add_traits(uuids.cn1, os_traits.COMPUTE_NODE)"},{"line_number":3958,"context_line":""},{"line_number":3959,"context_line":"        # test that only the explicit traits and inventories are merged"},{"line_number":3960,"context_line":"        self.rt._merge_provider_configs({\"$COMPUTE_NODE\": cn_provider,"}],"source_content_type":"text/x-python","patch_set":52,"id":"9f560f44_242c1f46","line":3957,"range":{"start_line":3956,"start_character":1,"end_line":3957,"end_character":65},"in_reply_to":"bf51134e_90d8f3f0","updated":"2020-08-03 02:32:06.000000000","message":"My understanding is this line is specific for testing merge_provider_configs() and not for other test cases. \n\nonce I moved this line to fixture, other test cases failed.","commit_id":"f3198c1cd7de86aa62a10bc2ce80dcd1d199d291"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"190aa524411ae86ab27deb9b691e4704563f5ea4","unresolved":false,"context_lines":[{"line_number":3956,"context_line":"        # ensure uuids.cn1 provider has COMPUTE_NODE trait"},{"line_number":3957,"context_line":"        self.p_tree.add_traits(uuids.cn1, os_traits.COMPUTE_NODE)"},{"line_number":3958,"context_line":""},{"line_number":3959,"context_line":"        # test that only the explicit traits and inventories are merged"},{"line_number":3960,"context_line":"        self.rt._merge_provider_configs({\"$COMPUTE_NODE\": cn_provider,"},{"line_number":3961,"context_line":"                                         uuids.cn1: provider}, self.p_tree)"},{"line_number":3962,"context_line":""}],"source_content_type":"text/x-python","patch_set":52,"id":"bf51134e_10bce36a","line":3959,"range":{"start_line":3959,"start_character":8,"end_line":3959,"end_character":71},"updated":"2020-07-21 15:57:55.000000000","message":"I don\u0027t get this comment. In this test ever trait and inventory is explicit.","commit_id":"f3198c1cd7de86aa62a10bc2ce80dcd1d199d291"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"9a1c579e3652f07a6741c2fcb08828c74a17ba47","unresolved":false,"context_lines":[{"line_number":3956,"context_line":"        # ensure uuids.cn1 provider has COMPUTE_NODE trait"},{"line_number":3957,"context_line":"        self.p_tree.add_traits(uuids.cn1, os_traits.COMPUTE_NODE)"},{"line_number":3958,"context_line":""},{"line_number":3959,"context_line":"        # test that only the explicit traits and inventories are merged"},{"line_number":3960,"context_line":"        self.rt._merge_provider_configs({\"$COMPUTE_NODE\": cn_provider,"},{"line_number":3961,"context_line":"                                         uuids.cn1: provider}, self.p_tree)"},{"line_number":3962,"context_line":""}],"source_content_type":"text/x-python","patch_set":52,"id":"9f560f44_84224b51","line":3959,"range":{"start_line":3959,"start_character":8,"end_line":3959,"end_character":71},"in_reply_to":"bf51134e_10bce36a","updated":"2020-08-03 02:32:06.000000000","message":"From line 3952, I just guess, the author thinks provider(uuid\u003d$COMPUTE_NODE) has not the explicit traits and inventories.","commit_id":"f3198c1cd7de86aa62a10bc2ce80dcd1d199d291"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"8e9e83d21d412a71111c9e5cd01ed0cd0a2323ed","unresolved":false,"context_lines":[{"line_number":3925,"context_line":"        self.p_tree \u003d self._setup_ptree(_COMPUTE_NODE_FIXTURES[0])"},{"line_number":3926,"context_line":""},{"line_number":3927,"context_line":"    @staticmethod"},{"line_number":3928,"context_line":"    def get_provider_config(uuid\u003duuids.cn1):"},{"line_number":3929,"context_line":"        return {\"__source_file\": \"test_provider_config.yaml\","},{"line_number":3930,"context_line":"                \"identification\": {"},{"line_number":3931,"context_line":"                    \"uuid\": uuid"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_78a78fbe","line":3928,"range":{"start_line":3928,"start_character":8,"end_line":3928,"end_character":27},"updated":"2020-08-05 13:34:46.000000000","message":"super nit, this better to be a private method.","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"d7e26a403993f1377826bac1e6ca375fead96d3d","unresolved":false,"context_lines":[{"line_number":3925,"context_line":"        self.p_tree \u003d self._setup_ptree(_COMPUTE_NODE_FIXTURES[0])"},{"line_number":3926,"context_line":""},{"line_number":3927,"context_line":"    @staticmethod"},{"line_number":3928,"context_line":"    def get_provider_config(uuid\u003duuids.cn1):"},{"line_number":3929,"context_line":"        return {\"__source_file\": \"test_provider_config.yaml\","},{"line_number":3930,"context_line":"                \"identification\": {"},{"line_number":3931,"context_line":"                    \"uuid\": uuid"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_70aae418","line":3928,"range":{"start_line":3928,"start_character":8,"end_line":3928,"end_character":27},"in_reply_to":"9f560f44_78a78fbe","updated":"2020-08-07 03:16:26.000000000","message":"Done","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"93f64a9d85a021b6085774e2899ea7d0d2aee6ae","unresolved":false,"context_lines":[{"line_number":3948,"context_line":"                    \"additional\": [os_traits.normalize_name(uuid)]"},{"line_number":3949,"context_line":"                }}"},{"line_number":3950,"context_line":""},{"line_number":3951,"context_line":"    def test_merge_provider_configs(self):"},{"line_number":3952,"context_line":"        # get both an explicit and a uuid\u003d$COMPUTE_NODE provider config"},{"line_number":3953,"context_line":"        provider \u003d self.get_provider_config()"},{"line_number":3954,"context_line":"        cn_provider \u003d self.get_provider_config(uuid\u003d\"$COMPUTE_NODE\")"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_f8626dad","line":3951,"updated":"2020-08-06 09:19:12.000000000","message":"Could we get summary docstrings for each test case describing what you\u0027re testing? The inline comments are helpful but a quick summary would be better again","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":30192,"name":"Tony Su","email":"tao.su@intel.com","username":"tsu5"},"change_message_id":"d7e26a403993f1377826bac1e6ca375fead96d3d","unresolved":false,"context_lines":[{"line_number":3948,"context_line":"                    \"additional\": [os_traits.normalize_name(uuid)]"},{"line_number":3949,"context_line":"                }}"},{"line_number":3950,"context_line":""},{"line_number":3951,"context_line":"    def test_merge_provider_configs(self):"},{"line_number":3952,"context_line":"        # get both an explicit and a uuid\u003d$COMPUTE_NODE provider config"},{"line_number":3953,"context_line":"        provider \u003d self.get_provider_config()"},{"line_number":3954,"context_line":"        cn_provider \u003d self.get_provider_config(uuid\u003d\"$COMPUTE_NODE\")"}],"source_content_type":"text/x-python","patch_set":56,"id":"9f560f44_3b15ed40","line":3951,"in_reply_to":"9f560f44_f8626dad","updated":"2020-08-07 03:16:26.000000000","message":"add docstring for each test case.","commit_id":"2d7d80d06179e5107c390daa3c81e8bf8e1756f3"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"62bdfddfbc51615081601c8031fe1d63e04fdd0f","unresolved":false,"context_lines":[{"line_number":3983,"context_line":"        # create duplicated providers for raising exception"},{"line_number":3984,"context_line":"        mock_gptu.return_value \u003d self.rt._get_providers_to_update("},{"line_number":3985,"context_line":"            uuids.cn1, self.p_tree, \"test_provider_config.yaml\""},{"line_number":3986,"context_line":"        ) * 2"},{"line_number":3987,"context_line":"        self.rt._get_providers_to_update \u003d mock_gptu"},{"line_number":3988,"context_line":""},{"line_number":3989,"context_line":"        # it does not matter what to pass in"}],"source_content_type":"text/x-python","patch_set":57,"id":"9f560f44_c727c1c6","line":3986,"range":{"start_line":3986,"start_character":10,"end_line":3986,"end_character":13},"updated":"2020-08-25 15:21:27.000000000","message":"This is the core of the test. \n\nBtw, thanks for adding the extra unit test coverage.","commit_id":"9f112c712613de84d658743dfb16dbeec952dcae"}],"releasenotes/notes/provider-config-file-bf026380cb5a7898.yaml":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"269a8bc14c814c1b4dcbadda85e7fbb942be6da6","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    [`blueprint provider-config-file\u003chttps://blueprints.launchpad.net/nova/+spec/provider-config-file\u003e`_]"},{"line_number":5,"context_line":"    Nova now supports defining of additional resource provider traits and"},{"line_number":6,"context_line":"    inventories by way of yaml configuration files. The location of these"},{"line_number":7,"context_line":"    files is defined by the new config option provider_config_location. Nova"},{"line_number":8,"context_line":"    will look in this directory for *.yaml files and will process them in"},{"line_number":9,"context_line":"    lexicographical order."},{"line_number":10,"context_line":"security:"}],"source_content_type":"text/x-yaml","patch_set":21,"id":"3fa7e38b_8c5c52ee","line":7,"range":{"start_line":7,"start_character":46,"end_line":7,"end_character":70},"updated":"2019-10-18 22:58:48.000000000","message":"``[compute]provider_config_location`` -- ``literal`` and add the group (once you\u0027ve fixed that)","commit_id":"54ee2f43551696c9fc4edcc613a1e6ba43082e68"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"269a8bc14c814c1b4dcbadda85e7fbb942be6da6","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    Nova now supports defining of additional resource provider traits and"},{"line_number":6,"context_line":"    inventories by way of yaml configuration files. The location of these"},{"line_number":7,"context_line":"    files is defined by the new config option provider_config_location. Nova"},{"line_number":8,"context_line":"    will look in this directory for *.yaml files and will process them in"},{"line_number":9,"context_line":"    lexicographical order."},{"line_number":10,"context_line":"security:"},{"line_number":11,"context_line":"  - |"}],"source_content_type":"text/x-yaml","patch_set":21,"id":"3fa7e38b_ec5146db","line":8,"range":{"start_line":8,"start_character":36,"end_line":8,"end_character":37},"updated":"2019-10-18 22:58:48.000000000","message":"I think your reno build fail is here. You need to escape this \\*, or you could literal ``*.yaml``.","commit_id":"54ee2f43551696c9fc4edcc613a1e6ba43082e68"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"269a8bc14c814c1b4dcbadda85e7fbb942be6da6","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    inventories by way of yaml configuration files. The location of these"},{"line_number":7,"context_line":"    files is defined by the new config option provider_config_location. Nova"},{"line_number":8,"context_line":"    will look in this directory for *.yaml files and will process them in"},{"line_number":9,"context_line":"    lexicographical order."},{"line_number":10,"context_line":"security:"},{"line_number":11,"context_line":"  - |"},{"line_number":12,"context_line":"    Administrators should ensure that provider config files have appropriate"}],"source_content_type":"text/x-yaml","patch_set":21,"id":"3fa7e38b_8ce9b2b8","line":9,"range":{"start_line":9,"start_character":4,"end_line":9,"end_character":25},"updated":"2019-10-18 22:58:48.000000000","message":"see other discussions about this","commit_id":"54ee2f43551696c9fc4edcc613a1e6ba43082e68"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"269a8bc14c814c1b4dcbadda85e7fbb942be6da6","unresolved":false,"context_lines":[{"line_number":10,"context_line":"security:"},{"line_number":11,"context_line":"  - |"},{"line_number":12,"context_line":"    Administrators should ensure that provider config files have appropriate"},{"line_number":13,"context_line":"    permissions and ownership."}],"source_content_type":"text/x-yaml","patch_set":21,"id":"3fa7e38b_4cf3bae8","line":13,"updated":"2019-10-18 22:58:48.000000000","message":"Oh, this is a good point, it would probably be wise for us to enforce that in some way. Unless we\u0027re explicitly saying that\u0027s up to the admin (would that be okay??)\n\nWe should just take our cue from whatever we do with nova.conf. (And I have no idea what that is...)\n\n[Later] I think the answer is going to be \"up to the admin\", but keep an eye on [1]. In any case we should probably clarify this in the spec, and make sure it\u0027s stated in whatever docs we write.\n\n[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010234.html","commit_id":"54ee2f43551696c9fc4edcc613a1e6ba43082e68"}]}
