)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"aa34f272b87127e02a2fc6f2262dc658c58b4843","unresolved":false,"context_lines":[{"line_number":18,"context_line":"attach it to the provider tree as a root."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I3044ad2ff7f4333ed323d610c723623f186d6c57"},{"line_number":21,"context_line":"blueprint: add-support-for-vgpu"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ff82abbf_c2ec82f5","line":21,"updated":"2017-11-20 02:03:06.000000000","message":"This seems should be linked to the nested-resource-provider BP instead of vGPU.","commit_id":"2a5d23f63db159c56b2099672b4476cea3cb8fd2"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"2ee6dbef0783e796d190c7bbc136e62fc86ee4f8","unresolved":false,"context_lines":[{"line_number":18,"context_line":"attach it to the provider tree as a root."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I3044ad2ff7f4333ed323d610c723623f186d6c57"},{"line_number":21,"context_line":"blueprint: add-support-for-vgpu"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ff82abbf_42bcf268","line":21,"in_reply_to":"ff82abbf_c2ec82f5","updated":"2017-11-20 02:45:55.000000000","message":"Got it, Thank you very much","commit_id":"2a5d23f63db159c56b2099672b4476cea3cb8fd2"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"28674715da48f1073cb79da93628f2825164df40","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     naichuans \u003cnaichuan.sun@citrix.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-11-24 10:00:39 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"(WIP)xenapi(N-R-P): Add API to support compute node resource provider"},{"line_number":8,"context_line":"update and create"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"Apply nested resource provider to compute node. It will be invoked by"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ff82abbf_86b78ef5","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":5},"updated":"2017-11-29 08:45:23.000000000","message":"This is still WIP? If not, suggest you update the commit message.","commit_id":"974c0f6d5d40212f5c20938c8024001a10f22cde"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d82ec2209319313fbf34aa19756e3997fd5a8a07","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Depends-On: I3521b3b038a9df16e600083505a94da5f9790c2f"},{"line_number":21,"context_line":"Change-Id: I3044ad2ff7f4333ed323d610c723623f186d6c57"},{"line_number":22,"context_line":"blueprint: nested-resource-providers"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"bf659307_558e6dd0","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":36},"updated":"2018-03-28 14:36:09.000000000","message":"Remove/change this.  Driver implementations related to NRP should be under a separate bp (or no bp).","commit_id":"b9f177db06521223c57baf4b865be864262dc4ad"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"78376180971b37b306a686eed49e9d5434075ddb","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Depends-On: I3521b3b038a9df16e600083505a94da5f9790c2f"},{"line_number":21,"context_line":"Change-Id: I3044ad2ff7f4333ed323d610c723623f186d6c57"},{"line_number":22,"context_line":"blueprint: nested-resource-providers"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"bf659307_1deb2513","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":36},"in_reply_to":"bf659307_558e6dd0","updated":"2018-03-29 09:06:22.000000000","message":"Will do it, thanks","commit_id":"b9f177db06521223c57baf4b865be864262dc4ad"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e8426729e0daf97d79be2a134062608dcea74d65","unresolved":false,"context_lines":[{"line_number":8,"context_line":"update and create"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"Apply nested resource provider to compute node. It will be invoked by"},{"line_number":11,"context_line":"`update_inventory` to be implemented in virt/driver."},{"line_number":12,"context_line":"This patch will implement compute node part\u0027s update:"},{"line_number":13,"context_line":"It will go through basic virtual driver information(like memory, disk,"},{"line_number":14,"context_line":"cpu) and update compute node resource provider. If the resource"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"bf659307_236e3f96","line":11,"range":{"start_line":11,"start_character":0,"end_line":11,"end_character":18},"updated":"2018-04-09 19:45:55.000000000","message":"update_provider_tree()","commit_id":"082e8feac30cc01671517f76501e55789e7563be"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"63dcda0ef21ba6179945a0a5e03b136a1d2b128d","unresolved":false,"context_lines":[{"line_number":8,"context_line":"update and create"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"Apply nested resource provider to compute node. It will be invoked by"},{"line_number":11,"context_line":"`update_inventory` to be implemented in virt/driver."},{"line_number":12,"context_line":"This patch will implement compute node part\u0027s update:"},{"line_number":13,"context_line":"It will go through basic virtual driver information(like memory, disk,"},{"line_number":14,"context_line":"cpu) and update compute node resource provider. If the resource"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"bf659307_66fd1b39","line":11,"range":{"start_line":11,"start_character":0,"end_line":11,"end_character":18},"in_reply_to":"bf659307_236e3f96","updated":"2018-04-10 07:13:24.000000000","message":"Ah~ sorry about that. will update it.","commit_id":"082e8feac30cc01671517f76501e55789e7563be"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6b9ae730e6d1b350dfa73c383eb4d74f772a1909","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     naichuans \u003cnaichuan.sun@citrix.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-05-02 09:07:00 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"xenapi(N-R-P): Add API to support compute node resource provider"},{"line_number":8,"context_line":"update and create"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"Apply nested resource provider to compute node. It will be invoked by"},{"line_number":11,"context_line":"`update_provider_tree()` to be implemented in virt/driver."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":23,"id":"5f7c97a3_2754d0fe","line":8,"range":{"start_line":7,"start_character":0,"end_line":8,"end_character":17},"updated":"2018-05-10 21:18:50.000000000","message":"Shorten this, please","commit_id":"6e0eed76e0e453f76d43bb4f74fb771904902e69"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"aff9f559450ef49f8dad9220165207f9c533e95b","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     naichuans \u003cnaichuan.sun@citrix.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-05-02 09:07:00 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"xenapi(N-R-P): Add API to support compute node resource provider"},{"line_number":8,"context_line":"update and create"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"Apply nested resource provider to compute node. It will be invoked by"},{"line_number":11,"context_line":"`update_provider_tree()` to be implemented in virt/driver."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":23,"id":"5f7c97a3_35c95525","line":8,"range":{"start_line":7,"start_character":0,"end_line":8,"end_character":17},"in_reply_to":"5f7c97a3_2754d0fe","updated":"2018-05-11 08:39:46.000000000","message":":)","commit_id":"6e0eed76e0e453f76d43bb4f74fb771904902e69"}],"nova/tests/unit/virt/xenapi/test_driver.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6b9ae730e6d1b350dfa73c383eb4d74f772a1909","unresolved":false,"context_lines":[{"line_number":571,"context_line":"        self.assertEqual(rp_data.uuid, exist_rp_uuid)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"    @mock.patch.object(xenapi_driver.uuidutils, \u0027generate_uuid\u0027)"},{"line_number":574,"context_line":"    def test_create_compute_rp(self, fake_gen_uuid):"},{"line_number":575,"context_line":"        # No compute root node found, create one and update inventory."},{"line_number":576,"context_line":"        driver \u003d self._get_driver()"},{"line_number":577,"context_line":"        host_stats \u003d self.host_stats()"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_c77b9c78","line":574,"range":{"start_line":574,"start_character":8,"end_line":574,"end_character":30},"updated":"2018-05-10 21:18:50.000000000","message":"so this test can go away (see comment in driver.py)","commit_id":"6e0eed76e0e453f76d43bb4f74fb771904902e69"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"f2c2ed3b833534badb4eff550aad1c1b847e9b70","unresolved":false,"context_lines":[{"line_number":571,"context_line":"        self.assertEqual(rp_data.uuid, exist_rp_uuid)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"    @mock.patch.object(xenapi_driver.uuidutils, \u0027generate_uuid\u0027)"},{"line_number":574,"context_line":"    def test_create_compute_rp(self, fake_gen_uuid):"},{"line_number":575,"context_line":"        # No compute root node found, create one and update inventory."},{"line_number":576,"context_line":"        driver \u003d self._get_driver()"},{"line_number":577,"context_line":"        host_stats \u003d self.host_stats()"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_8710ff58","line":574,"range":{"start_line":574,"start_character":8,"end_line":574,"end_character":30},"in_reply_to":"5f7c97a3_c77b9c78","updated":"2018-05-15 08:53:26.000000000","message":"Yes, will remove it.","commit_id":"6e0eed76e0e453f76d43bb4f74fb771904902e69"}],"nova/virt/xenapi/driver.py":[{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"112ab1c3ac84496c3c46b75a93bdfeb5b21c437b","unresolved":false,"context_lines":[{"line_number":534,"context_line":"            },"},{"line_number":535,"context_line":"        }"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"        if rp_tree.exists(nodename):"},{"line_number":538,"context_line":"            rp_tree.update_inventory(nodename, result)"},{"line_number":539,"context_line":"        else:"},{"line_number":540,"context_line":"            # TODO(naichuans). need to modify the provider_tree.py to support"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f485f77_a1ce3257","line":537,"updated":"2017-11-17 09:38:41.000000000","message":"need modify to throw out exception","commit_id":"2a5d23f63db159c56b2099672b4476cea3cb8fd2"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6c2f9ec2b4c81277adc85ca6c2f79f075de6e20a","unresolved":false,"context_lines":[{"line_number":534,"context_line":"            },"},{"line_number":535,"context_line":"        }"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"        if rp_tree.exists(nodename):"},{"line_number":538,"context_line":"            rp_tree.update_inventory(nodename, result)"},{"line_number":539,"context_line":"        else:"},{"line_number":540,"context_line":"            # TODO(naichuans). need to modify the provider_tree.py to support"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f485f77_4a98b31a","line":537,"in_reply_to":"1f485f77_a1ce3257","updated":"2017-11-17 12:42:34.000000000","message":"No, see previous patch","commit_id":"2a5d23f63db159c56b2099672b4476cea3cb8fd2"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"aa34f272b87127e02a2fc6f2262dc658c58b4843","unresolved":false,"context_lines":[{"line_number":535,"context_line":"        }"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"        if rp_tree.exists(nodename):"},{"line_number":538,"context_line":"            rp_tree.update_inventory(nodename, result)"},{"line_number":539,"context_line":"        else:"},{"line_number":540,"context_line":"            # TODO(naichuans). need to modify the provider_tree.py to support"},{"line_number":541,"context_line":"            # create root node without uuid and generation"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_422cf246","line":538,"updated":"2017-11-20 02:03:06.000000000","message":"By comparing to the existing implement, we need normalizing inventory before updating it to placement. See resource_tracker.py@_normalize_inventory_from_cn_obj(inv_data, cn)\n\n@Eric and @Jay, can we consider to move that normalizing function to rp_tree.update_inventory()?","commit_id":"2a5d23f63db159c56b2099672b4476cea3cb8fd2"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"d99bb611ac76caa3dcce176fdea67f21e1ccf40b","unresolved":false,"context_lines":[{"line_number":535,"context_line":"        }"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"        if rp_tree.exists(nodename):"},{"line_number":538,"context_line":"            rp_tree.update_inventory(nodename, result)"},{"line_number":539,"context_line":"        else:"},{"line_number":540,"context_line":"            # TODO(naichuans). need to modify the provider_tree.py to support"},{"line_number":541,"context_line":"            # create root node without uuid and generation"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_044c969c","line":538,"in_reply_to":"ff82abbf_422cf246","updated":"2017-11-21 07:10:37.000000000","message":"Ok. Seems it\u0027s expected to do normalization(set needed fields e.g. reserved...) in driver per https://review.openstack.org/#/c/520246/6/nova/compute/resource_tracker.py@828\n\nAnd we need pass generation to update_inventory() per the definition in provider_tree.","commit_id":"2a5d23f63db159c56b2099672b4476cea3cb8fd2"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6c2f9ec2b4c81277adc85ca6c2f79f075de6e20a","unresolved":false,"context_lines":[{"line_number":544,"context_line":"                raise exception.NovaException(_(\"Error: create compute node \""},{"line_number":545,"context_line":"                                                \"failed\"))"},{"line_number":546,"context_line":"            rp_tree.update_inventory(nodename, result)"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"    def _update_vgpu_rp(self, rp_tree, host_stats, compute_node):"},{"line_number":549,"context_line":"        \"\"\"Nested resource provider support. Update the inventory of each"},{"line_number":550,"context_line":"        resource provider. If the resource provider doesn\u0027t exist, we create"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f485f77_2a9b3718","line":547,"updated":"2017-11-17 12:42:34.000000000","message":"return whether the rp_tree was changed","commit_id":"2a5d23f63db159c56b2099672b4476cea3cb8fd2"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0b38581aac231f415c2260101bef24496897fb10","unresolved":false,"context_lines":[{"line_number":483,"context_line":"                raise exception.NovaException(_(\"Error: create compute node \""},{"line_number":484,"context_line":"                                                \"failed\"))"},{"line_number":485,"context_line":"        \"\"\""},{"line_number":486,"context_line":"        TODO(naichuans). Currently, the `update_inventory` function need"},{"line_number":487,"context_line":"        three arguments: `nodename, result, generation`. The problem is,"},{"line_number":488,"context_line":"        there is no API in class `ProviderTree` to get a rp\u0027s generation."},{"line_number":489,"context_line":"        The only way to get it is: at first, get the resource provider"},{"line_number":490,"context_line":"        instance; then, get generation elements from `_Provider`"},{"line_number":491,"context_line":"        instance."},{"line_number":492,"context_line":"        It is no good to use `_Provider` instance directly, because it"},{"line_number":493,"context_line":"        is designed as a pretected member(begin with `_`)."},{"line_number":494,"context_line":"        Need furthe support from `ProviderTree` to get generation with a"},{"line_number":495,"context_line":"        rp name(or uuid)."},{"line_number":496,"context_line":"        \"\"\""},{"line_number":497,"context_line":"        return rp_tree.update_inventory(nodename, result)"},{"line_number":498,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_54e32534","line":495,"range":{"start_line":486,"start_character":0,"end_line":495,"end_character":25},"updated":"2017-11-21 13:24:01.000000000","message":"I agree.  Jay and I need to figure this out.","commit_id":"eba3825df761a6ca432e5a22ae09e9ec9f0595b5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"a42c45229f5c2ebd3b2863471215b379220531d0","unresolved":false,"context_lines":[{"line_number":483,"context_line":"                raise exception.NovaException(_(\"Error: create compute node \""},{"line_number":484,"context_line":"                                                \"failed\"))"},{"line_number":485,"context_line":"        \"\"\""},{"line_number":486,"context_line":"        TODO(naichuans). Currently, the `update_inventory` function need"},{"line_number":487,"context_line":"        three arguments: `nodename, result, generation`. The problem is,"},{"line_number":488,"context_line":"        there is no API in class `ProviderTree` to get a rp\u0027s generation."},{"line_number":489,"context_line":"        The only way to get it is: at first, get the resource provider"},{"line_number":490,"context_line":"        instance; then, get generation elements from `_Provider`"},{"line_number":491,"context_line":"        instance."},{"line_number":492,"context_line":"        It is no good to use `_Provider` instance directly, because it"},{"line_number":493,"context_line":"        is designed as a pretected member(begin with `_`)."},{"line_number":494,"context_line":"        Need furthe support from `ProviderTree` to get generation with a"},{"line_number":495,"context_line":"        rp name(or uuid)."},{"line_number":496,"context_line":"        \"\"\""},{"line_number":497,"context_line":"        return rp_tree.update_inventory(nodename, result)"},{"line_number":498,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_6e84315f","line":495,"range":{"start_line":486,"start_character":0,"end_line":495,"end_character":25},"in_reply_to":"ff82abbf_38d7644e","updated":"2017-11-22 14:20:12.000000000","message":"You don\u0027t know its name *or* uuid?\n\nYou could use uuid_set(), filter out the uuids you do recognize, and .delete() the rest.  But I agree that\u0027s awkward.\n\nHowever, without knowing *some* identifying information about the provider you want to get rid of, I\u0027m not sure what better interface you could expect.  Suggestions?","commit_id":"eba3825df761a6ca432e5a22ae09e9ec9f0595b5"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"0fe97eb4413be3be1131698753113f4d213710a2","unresolved":false,"context_lines":[{"line_number":483,"context_line":"                raise exception.NovaException(_(\"Error: create compute node \""},{"line_number":484,"context_line":"                                                \"failed\"))"},{"line_number":485,"context_line":"        \"\"\""},{"line_number":486,"context_line":"        TODO(naichuans). Currently, the `update_inventory` function need"},{"line_number":487,"context_line":"        three arguments: `nodename, result, generation`. The problem is,"},{"line_number":488,"context_line":"        there is no API in class `ProviderTree` to get a rp\u0027s generation."},{"line_number":489,"context_line":"        The only way to get it is: at first, get the resource provider"},{"line_number":490,"context_line":"        instance; then, get generation elements from `_Provider`"},{"line_number":491,"context_line":"        instance."},{"line_number":492,"context_line":"        It is no good to use `_Provider` instance directly, because it"},{"line_number":493,"context_line":"        is designed as a pretected member(begin with `_`)."},{"line_number":494,"context_line":"        Need furthe support from `ProviderTree` to get generation with a"},{"line_number":495,"context_line":"        rp name(or uuid)."},{"line_number":496,"context_line":"        \"\"\""},{"line_number":497,"context_line":"        return rp_tree.update_inventory(nodename, result)"},{"line_number":498,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_64b12547","line":495,"range":{"start_line":486,"start_character":0,"end_line":495,"end_character":25},"in_reply_to":"ff82abbf_45e0b1cd","updated":"2017-11-29 07:38:32.000000000","message":"Will wait. Thank you very much, Eric.","commit_id":"eba3825df761a6ca432e5a22ae09e9ec9f0595b5"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"b6fe8e71ece0d55d28b8fcf29c3bb253d43e64d2","unresolved":false,"context_lines":[{"line_number":483,"context_line":"                raise exception.NovaException(_(\"Error: create compute node \""},{"line_number":484,"context_line":"                                                \"failed\"))"},{"line_number":485,"context_line":"        \"\"\""},{"line_number":486,"context_line":"        TODO(naichuans). Currently, the `update_inventory` function need"},{"line_number":487,"context_line":"        three arguments: `nodename, result, generation`. The problem is,"},{"line_number":488,"context_line":"        there is no API in class `ProviderTree` to get a rp\u0027s generation."},{"line_number":489,"context_line":"        The only way to get it is: at first, get the resource provider"},{"line_number":490,"context_line":"        instance; then, get generation elements from `_Provider`"},{"line_number":491,"context_line":"        instance."},{"line_number":492,"context_line":"        It is no good to use `_Provider` instance directly, because it"},{"line_number":493,"context_line":"        is designed as a pretected member(begin with `_`)."},{"line_number":494,"context_line":"        Need furthe support from `ProviderTree` to get generation with a"},{"line_number":495,"context_line":"        rp name(or uuid)."},{"line_number":496,"context_line":"        \"\"\""},{"line_number":497,"context_line":"        return rp_tree.update_inventory(nodename, result)"},{"line_number":498,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_38d7644e","line":495,"range":{"start_line":486,"start_character":0,"end_line":495,"end_character":25},"in_reply_to":"ff82abbf_54e32534","updated":"2017-11-22 01:20:34.000000000","message":"Hi, Eric.\nI think we also need a way to delete rps which have out of date(without providing rp names). For example, if a gpu group has removed, we need to remove the corresponding rp when nova compute call `update_provider_tree`, but on driver side, we just add the new rp, there is no way to delete the rp which already not used(we don\u0027t know its name).","commit_id":"eba3825df761a6ca432e5a22ae09e9ec9f0595b5"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"e08b1dddd5460ff3131ee39a428c68e6200d8834","unresolved":false,"context_lines":[{"line_number":483,"context_line":"                raise exception.NovaException(_(\"Error: create compute node \""},{"line_number":484,"context_line":"                                                \"failed\"))"},{"line_number":485,"context_line":"        \"\"\""},{"line_number":486,"context_line":"        TODO(naichuans). Currently, the `update_inventory` function need"},{"line_number":487,"context_line":"        three arguments: `nodename, result, generation`. The problem is,"},{"line_number":488,"context_line":"        there is no API in class `ProviderTree` to get a rp\u0027s generation."},{"line_number":489,"context_line":"        The only way to get it is: at first, get the resource provider"},{"line_number":490,"context_line":"        instance; then, get generation elements from `_Provider`"},{"line_number":491,"context_line":"        instance."},{"line_number":492,"context_line":"        It is no good to use `_Provider` instance directly, because it"},{"line_number":493,"context_line":"        is designed as a pretected member(begin with `_`)."},{"line_number":494,"context_line":"        Need furthe support from `ProviderTree` to get generation with a"},{"line_number":495,"context_line":"        rp name(or uuid)."},{"line_number":496,"context_line":"        \"\"\""},{"line_number":497,"context_line":"        return rp_tree.update_inventory(nodename, result)"},{"line_number":498,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_fcb6adfa","line":495,"range":{"start_line":486,"start_character":0,"end_line":495,"end_character":25},"in_reply_to":"ff82abbf_6e84315f","updated":"2017-11-23 03:05:34.000000000","message":"Thank you very much, Eric. Currently, we using host states to update rp inventory. If the status changes, we don\u0027t know the old states, so we don\u0027t know the old rp name and uuid.\nI have two suggestions about this issue:\n1) All the rps of the same type attach to a type root node. For example, all the VGPU rps attach to the same root node named \"VGPU_RP_GROUP\". Then provide an API named `children_sets` which we can use to get all the children from a root.\n2) Add filter APIs. Like we can add an API named `Filter by(\u0027name\u0027, rp_name)` to get all the rps match the \u0027rp_name\u0027. But in this way, we\u0027d better consider wild-card. For example, we should get all the rps whose names begin with \"VGPU_\" when user input `VGPU_*`.\nMostly, I care about how to manage it by rp names. Because we can\u0027t determine a uuid\u0027s meaning, a name is more clear.\nThank you very much, Eric.","commit_id":"eba3825df761a6ca432e5a22ae09e9ec9f0595b5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1d8517d4dc4bfbbcc1e56d5c509d0abf39b563bc","unresolved":false,"context_lines":[{"line_number":483,"context_line":"                raise exception.NovaException(_(\"Error: create compute node \""},{"line_number":484,"context_line":"                                                \"failed\"))"},{"line_number":485,"context_line":"        \"\"\""},{"line_number":486,"context_line":"        TODO(naichuans). Currently, the `update_inventory` function need"},{"line_number":487,"context_line":"        three arguments: `nodename, result, generation`. The problem is,"},{"line_number":488,"context_line":"        there is no API in class `ProviderTree` to get a rp\u0027s generation."},{"line_number":489,"context_line":"        The only way to get it is: at first, get the resource provider"},{"line_number":490,"context_line":"        instance; then, get generation elements from `_Provider`"},{"line_number":491,"context_line":"        instance."},{"line_number":492,"context_line":"        It is no good to use `_Provider` instance directly, because it"},{"line_number":493,"context_line":"        is designed as a pretected member(begin with `_`)."},{"line_number":494,"context_line":"        Need furthe support from `ProviderTree` to get generation with a"},{"line_number":495,"context_line":"        rp name(or uuid)."},{"line_number":496,"context_line":"        \"\"\""},{"line_number":497,"context_line":"        return rp_tree.update_inventory(nodename, result)"},{"line_number":498,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_45e0b1cd","line":495,"range":{"start_line":486,"start_character":0,"end_line":495,"end_character":25},"in_reply_to":"ff82abbf_9522b9a3","updated":"2017-11-28 17:26:43.000000000","message":"Yup, I think you can do what you want here with Jay\u0027s suggestion of allowing you to get a subtree\u0027s UUIDs.  That would give you your option #1 described above - you would feed it the UUID of your VGPU_RP_GROUP.\n\nThere\u0027s a lot of churn requiring a lot of rebasing right now; I\u0027ll get back to that series once the dust settles.  Thanks for your patience.","commit_id":"eba3825df761a6ca432e5a22ae09e9ec9f0595b5"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"44e92229b1793fe065b9200e1f7514f527b0a54e","unresolved":false,"context_lines":[{"line_number":483,"context_line":"                raise exception.NovaException(_(\"Error: create compute node \""},{"line_number":484,"context_line":"                                                \"failed\"))"},{"line_number":485,"context_line":"        \"\"\""},{"line_number":486,"context_line":"        TODO(naichuans). Currently, the `update_inventory` function need"},{"line_number":487,"context_line":"        three arguments: `nodename, result, generation`. The problem is,"},{"line_number":488,"context_line":"        there is no API in class `ProviderTree` to get a rp\u0027s generation."},{"line_number":489,"context_line":"        The only way to get it is: at first, get the resource provider"},{"line_number":490,"context_line":"        instance; then, get generation elements from `_Provider`"},{"line_number":491,"context_line":"        instance."},{"line_number":492,"context_line":"        It is no good to use `_Provider` instance directly, because it"},{"line_number":493,"context_line":"        is designed as a pretected member(begin with `_`)."},{"line_number":494,"context_line":"        Need furthe support from `ProviderTree` to get generation with a"},{"line_number":495,"context_line":"        rp name(or uuid)."},{"line_number":496,"context_line":"        \"\"\""},{"line_number":497,"context_line":"        return rp_tree.update_inventory(nodename, result)"},{"line_number":498,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_9522b9a3","line":495,"range":{"start_line":486,"start_character":0,"end_line":495,"end_character":25},"in_reply_to":"ff82abbf_f9846960","updated":"2017-11-24 02:03:48.000000000","message":"Hi, Jianghua. If simply get a set uuids, it may fix our issue. But there are many constraints on that.\nFor example, it would require our driver has full control of all the resource providers. We need to know all the rp uuids, even some of them may not be generated by us.\nAlso, it is complicated to manage them separately. For example, if we add a function to update vgpu rps, but uuid_set() return compute_node_rps/need_update_vgpu_rps/removed_vgpu_rps/some_other_kinds_rps. We need to move unrelated rps like compute_node_rps out, but we use another function to deal with compute_node_rps. Then we need to introduce compute_node_rps check which is not related to the API\u0027s original purpose.\nToo many constraints are not good for flexibility. It may bring issues in future development.\nJay also suggested an API to get a subtree uuids of a specified node on https://review.openstack.org/#/c/520243/5/nova/compute/provider_tree.py. \nPlease check it. Thank you very much.","commit_id":"eba3825df761a6ca432e5a22ae09e9ec9f0595b5"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"034b6ed623019e1f064199f5d18ba43d9127f25b","unresolved":false,"context_lines":[{"line_number":483,"context_line":"                raise exception.NovaException(_(\"Error: create compute node \""},{"line_number":484,"context_line":"                                                \"failed\"))"},{"line_number":485,"context_line":"        \"\"\""},{"line_number":486,"context_line":"        TODO(naichuans). Currently, the `update_inventory` function need"},{"line_number":487,"context_line":"        three arguments: `nodename, result, generation`. The problem is,"},{"line_number":488,"context_line":"        there is no API in class `ProviderTree` to get a rp\u0027s generation."},{"line_number":489,"context_line":"        The only way to get it is: at first, get the resource provider"},{"line_number":490,"context_line":"        instance; then, get generation elements from `_Provider`"},{"line_number":491,"context_line":"        instance."},{"line_number":492,"context_line":"        It is no good to use `_Provider` instance directly, because it"},{"line_number":493,"context_line":"        is designed as a pretected member(begin with `_`)."},{"line_number":494,"context_line":"        Need furthe support from `ProviderTree` to get generation with a"},{"line_number":495,"context_line":"        rp name(or uuid)."},{"line_number":496,"context_line":"        \"\"\""},{"line_number":497,"context_line":"        return rp_tree.update_inventory(nodename, result)"},{"line_number":498,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_f9846960","line":495,"range":{"start_line":486,"start_character":0,"end_line":495,"end_character":25},"in_reply_to":"ff82abbf_fcb6adfa","updated":"2017-11-23 17:52:18.000000000","message":"Naichuan, as all resource provider tree are updated in driver. I think Eric\u0027s suggestion should work for your case.\n\nIn driver, we should be able to get uuids for all RPs which are still valid. saying uuid_set1; and get uuid_set2 from uuid_set() for the RP tree. Then the uuid_set3 \u003d uuid_set2 - uuid_set1 are the RPs need to be deleted.\n\nThoughts?","commit_id":"eba3825df761a6ca432e5a22ae09e9ec9f0595b5"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"5cdf4d35f166e367867b2b86235c4dc31856cbd8","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        option\u003d\u0027CONF.xenserver.independent_compute\u0027)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"class XenAPIDriver(driver.ComputeDriver):"},{"line_number":69,"context_line":"    \"\"\"A connection to XenServer or Xen Cloud Platform.\"\"\""},{"line_number":70,"context_line":"    capabilities \u003d {"},{"line_number":71,"context_line":"        \"has_imagecache\": False,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ff82abbf_26b1e247","line":68,"range":{"start_line":68,"start_character":6,"end_line":68,"end_character":41},"updated":"2017-11-29 08:32:56.000000000","message":"If my understanding is correct, you need set \"supports_provider_tree \u003d True\", check the patch you depends\nhttps://review.openstack.org/#/c/521187/4/nova/virt/driver.py@139","commit_id":"974c0f6d5d40212f5c20938c8024001a10f22cde"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"bce13cbf344b71fbede39229c3791bb2cb071f00","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        option\u003d\u0027CONF.xenserver.independent_compute\u0027)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"class XenAPIDriver(driver.ComputeDriver):"},{"line_number":69,"context_line":"    \"\"\"A connection to XenServer or Xen Cloud Platform.\"\"\""},{"line_number":70,"context_line":"    capabilities \u003d {"},{"line_number":71,"context_line":"        \"has_imagecache\": False,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ff82abbf_c93cc994","line":68,"range":{"start_line":68,"start_character":6,"end_line":68,"end_character":41},"in_reply_to":"ff82abbf_26b1e247","updated":"2017-11-29 09:08:57.000000000","message":"Yes, will check it. Thank you very much.","commit_id":"974c0f6d5d40212f5c20938c8024001a10f22cde"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"440cfea4dea4c9ca69cbaa4be52587eec9eedea8","unresolved":false,"context_lines":[{"line_number":531,"context_line":""},{"line_number":532,"context_line":"            rp_tree.update_inventory(rp_name, inv)"},{"line_number":533,"context_line":""},{"line_number":534,"context_line":"    def _remove_children_rp(self, provider_tree, parent_uuid_or_name):"},{"line_number":535,"context_line":"        children_rps \u003d provider_tree.get_provider_uuids(parent_uuid_or_name)"},{"line_number":536,"context_line":"        # keep root resource provider"},{"line_number":537,"context_line":"        children_rps.pop(0)"},{"line_number":538,"context_line":"        for children_rp in children_rps:"},{"line_number":539,"context_line":"            provider_tree.remove(children_rp)"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"    def update_provider_tree(self, provider_tree, nodename):"},{"line_number":542,"context_line":"        \"\"\"Nested resource provider support. Update resource in provider tree."}],"source_content_type":"text/x-python","patch_set":13,"id":"bf659307_1e55edfa","line":539,"range":{"start_line":534,"start_character":0,"end_line":539,"end_character":45},"updated":"2018-04-04 16:15:22.000000000","message":"You can\u0027t do this, I\u0027m afraid.  See the (updated) docstring for update_provider_tree.  For example, neutron may have created children representing network resource providers, and you don\u0027t want to blow those away.  You have to make sure you\u0027re only removing children you \"own\".  So in this case, if what you\u0027re trying to do is make sure you have a clean slate for VGPU RPs, you will need to figure out a way to delete only VGPU RPs.\n\nOne way is to look for providers with inventory of the VGPU resource class.  Another is to take advantage of the naming convention I saw in prior patches and look for RPs named \"VGPU_*\".","commit_id":"1d15755c0f1072d6f7bdb9e1a0a20964d93b8860"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"9f089355edf08e40bf1491fe66f890b943251786","unresolved":false,"context_lines":[{"line_number":531,"context_line":""},{"line_number":532,"context_line":"            rp_tree.update_inventory(rp_name, inv)"},{"line_number":533,"context_line":""},{"line_number":534,"context_line":"    def _remove_children_rp(self, provider_tree, parent_uuid_or_name):"},{"line_number":535,"context_line":"        children_rps \u003d provider_tree.get_provider_uuids(parent_uuid_or_name)"},{"line_number":536,"context_line":"        # keep root resource provider"},{"line_number":537,"context_line":"        children_rps.pop(0)"},{"line_number":538,"context_line":"        for children_rp in children_rps:"},{"line_number":539,"context_line":"            provider_tree.remove(children_rp)"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"    def update_provider_tree(self, provider_tree, nodename):"},{"line_number":542,"context_line":"        \"\"\"Nested resource provider support. Update resource in provider tree."}],"source_content_type":"text/x-python","patch_set":13,"id":"bf659307_9cca2c4d","line":539,"range":{"start_line":534,"start_character":0,"end_line":539,"end_character":45},"in_reply_to":"bf659307_1e55edfa","updated":"2018-04-07 14:56:30.000000000","message":"I see, it is reckless to delete children RPs without check.\nWill modify it.","commit_id":"1d15755c0f1072d6f7bdb9e1a0a20964d93b8860"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e8426729e0daf97d79be2a134062608dcea74d65","unresolved":false,"context_lines":[{"line_number":533,"context_line":""},{"line_number":534,"context_line":"            rp_tree.update_inventory(rp_name, inv)"},{"line_number":535,"context_line":""},{"line_number":536,"context_line":"    def _remove_children_rp(self, provider_tree, parent_uuid_or_name):"},{"line_number":537,"context_line":"        children_rps \u003d provider_tree.get_provider_uuids(parent_uuid_or_name)"},{"line_number":538,"context_line":"        # keep root resource provider"},{"line_number":539,"context_line":"        children_rps.pop(0)"},{"line_number":540,"context_line":"        for children_rp in children_rps:"},{"line_number":541,"context_line":"            rp_data \u003d provider_tree.data(children_rp)"},{"line_number":542,"context_line":"            if rp_data.name[:len(VGPU_RP_PREFIX)] \u003d\u003d VGPU_RP_PREFIX:"},{"line_number":543,"context_line":"                provider_tree.remove(children_rp)"},{"line_number":544,"context_line":""},{"line_number":545,"context_line":"    def update_provider_tree(self, provider_tree, nodename):"},{"line_number":546,"context_line":"        \"\"\"Nested resource provider support. Update resource in provider tree."}],"source_content_type":"text/x-python","patch_set":16,"id":"bf659307_83bb8be3","line":543,"range":{"start_line":536,"start_character":0,"end_line":543,"end_character":49},"updated":"2018-04-09 19:45:55.000000000","message":"so this is just blindly removing the child resource providers for any resource provider that is providing VGPU resources. Is there a reason to do that?\n\nI believe you will want to only remove child resource providers when some physical hardware is replaced...","commit_id":"082e8feac30cc01671517f76501e55789e7563be"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"63dcda0ef21ba6179945a0a5e03b136a1d2b128d","unresolved":false,"context_lines":[{"line_number":533,"context_line":""},{"line_number":534,"context_line":"            rp_tree.update_inventory(rp_name, inv)"},{"line_number":535,"context_line":""},{"line_number":536,"context_line":"    def _remove_children_rp(self, provider_tree, parent_uuid_or_name):"},{"line_number":537,"context_line":"        children_rps \u003d provider_tree.get_provider_uuids(parent_uuid_or_name)"},{"line_number":538,"context_line":"        # keep root resource provider"},{"line_number":539,"context_line":"        children_rps.pop(0)"},{"line_number":540,"context_line":"        for children_rp in children_rps:"},{"line_number":541,"context_line":"            rp_data \u003d provider_tree.data(children_rp)"},{"line_number":542,"context_line":"            if rp_data.name[:len(VGPU_RP_PREFIX)] \u003d\u003d VGPU_RP_PREFIX:"},{"line_number":543,"context_line":"                provider_tree.remove(children_rp)"},{"line_number":544,"context_line":""},{"line_number":545,"context_line":"    def update_provider_tree(self, provider_tree, nodename):"},{"line_number":546,"context_line":"        \"\"\"Nested resource provider support. Update resource in provider tree."}],"source_content_type":"text/x-python","patch_set":16,"id":"bf659307_e6d04bcc","line":543,"range":{"start_line":536,"start_character":0,"end_line":543,"end_character":49},"in_reply_to":"bf659307_83bb8be3","updated":"2018-04-10 07:13:24.000000000","message":"Will only update the inventories and remove rps which don\u0027t exist anymore~","commit_id":"082e8feac30cc01671517f76501e55789e7563be"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"97fd8f3c38bb2655e32dacfc2a0574823240410b","unresolved":false,"context_lines":[{"line_number":547,"context_line":"        \"\"\""},{"line_number":548,"context_line":"        host_stats \u003d self.host_state.get_host_stats(refresh\u003dTrue)"},{"line_number":549,"context_line":"        self._update_compute_rp(nodename, provider_tree, host_stats)"},{"line_number":550,"context_line":"        self._remove_children_rp(provider_tree, nodename)"},{"line_number":551,"context_line":"        self._update_vgpu_rp(provider_tree, host_stats, nodename)"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"    def _update_compute_rp(self, nodename, rp_tree, host_stats):"}],"source_content_type":"text/x-python","patch_set":16,"id":"bf659307_03177153","line":550,"updated":"2018-04-10 06:37:13.000000000","message":"May we just remove the RPs which don\u0027t exist anymore instead of deleting all?\nI guess there will be problems: e.g. will the id be changed if an existing RP has been allocated to an instance? In that case it may failed the deletion at placement. then will it re-generate a new one? And possible race condition due to the delay of syncing up data to placement.","commit_id":"082e8feac30cc01671517f76501e55789e7563be"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"63dcda0ef21ba6179945a0a5e03b136a1d2b128d","unresolved":false,"context_lines":[{"line_number":547,"context_line":"        \"\"\""},{"line_number":548,"context_line":"        host_stats \u003d self.host_state.get_host_stats(refresh\u003dTrue)"},{"line_number":549,"context_line":"        self._update_compute_rp(nodename, provider_tree, host_stats)"},{"line_number":550,"context_line":"        self._remove_children_rp(provider_tree, nodename)"},{"line_number":551,"context_line":"        self._update_vgpu_rp(provider_tree, host_stats, nodename)"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"    def _update_compute_rp(self, nodename, rp_tree, host_stats):"}],"source_content_type":"text/x-python","patch_set":16,"id":"bf659307_46f33774","line":550,"in_reply_to":"bf659307_03177153","updated":"2018-04-10 07:13:24.000000000","message":"Will only update the inventories and remove rps which don\u0027t exist anymore~","commit_id":"082e8feac30cc01671517f76501e55789e7563be"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e8426729e0daf97d79be2a134062608dcea74d65","unresolved":false,"context_lines":[{"line_number":581,"context_line":"        }"},{"line_number":582,"context_line":"        if not rp_tree.exists(nodename):"},{"line_number":583,"context_line":"            rp_tree.new_root(nodename, uuidutils.generate_uuid())"},{"line_number":584,"context_line":"        rp_tree.update_inventory(nodename, result)"},{"line_number":585,"context_line":""},{"line_number":586,"context_line":"    def get_available_resource(self, nodename):"},{"line_number":587,"context_line":"        \"\"\"Retrieve resource information."}],"source_content_type":"text/x-python","patch_set":16,"id":"bf659307_0321bb4d","line":584,"updated":"2018-04-09 19:45:55.000000000","message":"all good. ++","commit_id":"082e8feac30cc01671517f76501e55789e7563be"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"63dcda0ef21ba6179945a0a5e03b136a1d2b128d","unresolved":false,"context_lines":[{"line_number":581,"context_line":"        }"},{"line_number":582,"context_line":"        if not rp_tree.exists(nodename):"},{"line_number":583,"context_line":"            rp_tree.new_root(nodename, uuidutils.generate_uuid())"},{"line_number":584,"context_line":"        rp_tree.update_inventory(nodename, result)"},{"line_number":585,"context_line":""},{"line_number":586,"context_line":"    def get_available_resource(self, nodename):"},{"line_number":587,"context_line":"        \"\"\"Retrieve resource information."}],"source_content_type":"text/x-python","patch_set":16,"id":"bf659307_06ed3f8a","line":584,"in_reply_to":"bf659307_0321bb4d","updated":"2018-04-10 07:13:24.000000000","message":":)","commit_id":"082e8feac30cc01671517f76501e55789e7563be"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6b9ae730e6d1b350dfa73c383eb4d74f772a1909","unresolved":false,"context_lines":[{"line_number":551,"context_line":"        \"\"\""},{"line_number":552,"context_line":"        host_stats \u003d self.host_state.get_host_stats(refresh\u003dTrue)"},{"line_number":553,"context_line":"        self._update_compute_rp(nodename, provider_tree, host_stats)"},{"line_number":554,"context_line":"        self._update_gpu_rp(provider_tree, host_stats, nodename)"},{"line_number":555,"context_line":""},{"line_number":556,"context_line":"    def _update_compute_rp(self, nodename, rp_tree, host_stats):"},{"line_number":557,"context_line":"        \"\"\"Nested resource provider support. Update compute node information."}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_8742843d","line":554,"range":{"start_line":554,"start_character":14,"end_line":554,"end_character":27},"updated":"2018-05-10 21:18:50.000000000","message":"arguably you should tag this change set as part of blueprint vgpu-rocky","commit_id":"6e0eed76e0e453f76d43bb4f74fb771904902e69"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"f2c2ed3b833534badb4eff550aad1c1b847e9b70","unresolved":false,"context_lines":[{"line_number":551,"context_line":"        \"\"\""},{"line_number":552,"context_line":"        host_stats \u003d self.host_state.get_host_stats(refresh\u003dTrue)"},{"line_number":553,"context_line":"        self._update_compute_rp(nodename, provider_tree, host_stats)"},{"line_number":554,"context_line":"        self._update_gpu_rp(provider_tree, host_stats, nodename)"},{"line_number":555,"context_line":""},{"line_number":556,"context_line":"    def _update_compute_rp(self, nodename, rp_tree, host_stats):"},{"line_number":557,"context_line":"        \"\"\"Nested resource provider support. Update compute node information."}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_a722dbb7","line":554,"range":{"start_line":554,"start_character":14,"end_line":554,"end_character":27},"in_reply_to":"5f7c97a3_694db198","updated":"2018-05-15 08:53:26.000000000","message":"Got it, thanks, Eric","commit_id":"6e0eed76e0e453f76d43bb4f74fb771904902e69"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5859472e91a7906ff935ed3ef14788b90b20f14e","unresolved":false,"context_lines":[{"line_number":551,"context_line":"        \"\"\""},{"line_number":552,"context_line":"        host_stats \u003d self.host_state.get_host_stats(refresh\u003dTrue)"},{"line_number":553,"context_line":"        self._update_compute_rp(nodename, provider_tree, host_stats)"},{"line_number":554,"context_line":"        self._update_gpu_rp(provider_tree, host_stats, nodename)"},{"line_number":555,"context_line":""},{"line_number":556,"context_line":"    def _update_compute_rp(self, nodename, rp_tree, host_stats):"},{"line_number":557,"context_line":"        \"\"\"Nested resource provider support. Update compute node information."}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_694db198","line":554,"range":{"start_line":554,"start_character":14,"end_line":554,"end_character":27},"in_reply_to":"5f7c97a3_70e4bb3c","updated":"2018-05-11 13:47:03.000000000","message":"No, I\u0027m just saying this line is tying in all the work you did in prior patches under bp vgpu-rocky, so it would be appropriate for you to at least include\n\n Partially-Implements: vgpu-rocky\n\nor similar in your commit message","commit_id":"6e0eed76e0e453f76d43bb4f74fb771904902e69"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"aff9f559450ef49f8dad9220165207f9c533e95b","unresolved":false,"context_lines":[{"line_number":551,"context_line":"        \"\"\""},{"line_number":552,"context_line":"        host_stats \u003d self.host_state.get_host_stats(refresh\u003dTrue)"},{"line_number":553,"context_line":"        self._update_compute_rp(nodename, provider_tree, host_stats)"},{"line_number":554,"context_line":"        self._update_gpu_rp(provider_tree, host_stats, nodename)"},{"line_number":555,"context_line":""},{"line_number":556,"context_line":"    def _update_compute_rp(self, nodename, rp_tree, host_stats):"},{"line_number":557,"context_line":"        \"\"\"Nested resource provider support. Update compute node information."}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_70e4bb3c","line":554,"range":{"start_line":554,"start_character":14,"end_line":554,"end_character":27},"in_reply_to":"5f7c97a3_8742843d","updated":"2018-05-11 08:39:46.000000000","message":"use another patch?","commit_id":"6e0eed76e0e453f76d43bb4f74fb771904902e69"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6b9ae730e6d1b350dfa73c383eb4d74f772a1909","unresolved":false,"context_lines":[{"line_number":559,"context_line":"        inventory to it."},{"line_number":560,"context_line":"        \"\"\""},{"line_number":561,"context_line":"        vcpus \u003d host_stats[\u0027host_cpu_info\u0027][\u0027cpu_count\u0027]"},{"line_number":562,"context_line":"        memory_mb \u003d int(host_stats[\u0027host_memory_total\u0027] / units.Mi)"},{"line_number":563,"context_line":"        disk_gb \u003d int(host_stats[\u0027disk_total\u0027] / units.Gi)"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"        result \u003d {"},{"line_number":566,"context_line":"            fields.ResourceClass.VCPU: {"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_c7a2bcfc","line":563,"range":{"start_line":562,"start_character":0,"end_line":563,"end_character":58},"updated":"2018-05-10 21:18:50.000000000","message":"taking it on faith that these unit conversions are correct.","commit_id":"6e0eed76e0e453f76d43bb4f74fb771904902e69"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5859472e91a7906ff935ed3ef14788b90b20f14e","unresolved":false,"context_lines":[{"line_number":559,"context_line":"        inventory to it."},{"line_number":560,"context_line":"        \"\"\""},{"line_number":561,"context_line":"        vcpus \u003d host_stats[\u0027host_cpu_info\u0027][\u0027cpu_count\u0027]"},{"line_number":562,"context_line":"        memory_mb \u003d int(host_stats[\u0027host_memory_total\u0027] / units.Mi)"},{"line_number":563,"context_line":"        disk_gb \u003d int(host_stats[\u0027disk_total\u0027] / units.Gi)"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"        result \u003d {"},{"line_number":566,"context_line":"            fields.ResourceClass.VCPU: {"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_095e7d43","line":563,"range":{"start_line":562,"start_character":0,"end_line":563,"end_character":58},"in_reply_to":"5f7c97a3_1044671a","updated":"2018-05-11 13:47:03.000000000","message":"No, don\u0027t change anything, I\u0027m just saying that I don\u0027t have any frame of reference to validate that e.g. \u0027disk_total\u0027 comes at you in bytes and you therefore have to divide by Gi to get GB.","commit_id":"6e0eed76e0e453f76d43bb4f74fb771904902e69"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"aff9f559450ef49f8dad9220165207f9c533e95b","unresolved":false,"context_lines":[{"line_number":559,"context_line":"        inventory to it."},{"line_number":560,"context_line":"        \"\"\""},{"line_number":561,"context_line":"        vcpus \u003d host_stats[\u0027host_cpu_info\u0027][\u0027cpu_count\u0027]"},{"line_number":562,"context_line":"        memory_mb \u003d int(host_stats[\u0027host_memory_total\u0027] / units.Mi)"},{"line_number":563,"context_line":"        disk_gb \u003d int(host_stats[\u0027disk_total\u0027] / units.Gi)"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"        result \u003d {"},{"line_number":566,"context_line":"            fields.ResourceClass.VCPU: {"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_1044671a","line":563,"range":{"start_line":562,"start_character":0,"end_line":563,"end_character":58},"in_reply_to":"5f7c97a3_c7a2bcfc","updated":"2018-05-11 08:39:46.000000000","message":"The conversions are always needed. Not sure if we could make it more natural","commit_id":"6e0eed76e0e453f76d43bb4f74fb771904902e69"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6b9ae730e6d1b350dfa73c383eb4d74f772a1909","unresolved":false,"context_lines":[{"line_number":571,"context_line":"            },"},{"line_number":572,"context_line":"            fields.ResourceClass.MEMORY_MB: {"},{"line_number":573,"context_line":"                \u0027total\u0027: memory_mb,"},{"line_number":574,"context_line":"                \u0027min_unit\u0027: 1,"},{"line_number":575,"context_line":"                \u0027max_unit\u0027: memory_mb,"},{"line_number":576,"context_line":"                \u0027step_size\u0027: 1,"},{"line_number":577,"context_line":"            },"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_87b04445","line":574,"range":{"start_line":574,"start_character":16,"end_line":574,"end_character":30},"updated":"2018-05-10 21:18:50.000000000","message":"really?","commit_id":"6e0eed76e0e453f76d43bb4f74fb771904902e69"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"f2c2ed3b833534badb4eff550aad1c1b847e9b70","unresolved":false,"context_lines":[{"line_number":571,"context_line":"            },"},{"line_number":572,"context_line":"            fields.ResourceClass.MEMORY_MB: {"},{"line_number":573,"context_line":"                \u0027total\u0027: memory_mb,"},{"line_number":574,"context_line":"                \u0027min_unit\u0027: 1,"},{"line_number":575,"context_line":"                \u0027max_unit\u0027: memory_mb,"},{"line_number":576,"context_line":"                \u0027step_size\u0027: 1,"},{"line_number":577,"context_line":"            },"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_e73c53e2","line":574,"range":{"start_line":574,"start_character":16,"end_line":574,"end_character":30},"in_reply_to":"5f7c97a3_87b04445","updated":"2018-05-15 08:53:26.000000000","message":"Yes, no other kind define yet.","commit_id":"6e0eed76e0e453f76d43bb4f74fb771904902e69"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6b9ae730e6d1b350dfa73c383eb4d74f772a1909","unresolved":false,"context_lines":[{"line_number":573,"context_line":"                \u0027total\u0027: memory_mb,"},{"line_number":574,"context_line":"                \u0027min_unit\u0027: 1,"},{"line_number":575,"context_line":"                \u0027max_unit\u0027: memory_mb,"},{"line_number":576,"context_line":"                \u0027step_size\u0027: 1,"},{"line_number":577,"context_line":"            },"},{"line_number":578,"context_line":"            fields.ResourceClass.DISK_GB: {"},{"line_number":579,"context_line":"                \u0027total\u0027: disk_gb,"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_a7ad40ea","line":576,"range":{"start_line":576,"start_character":16,"end_line":576,"end_character":31},"updated":"2018-05-10 21:18:50.000000000","message":"really?","commit_id":"6e0eed76e0e453f76d43bb4f74fb771904902e69"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6b9ae730e6d1b350dfa73c383eb4d74f772a1909","unresolved":false,"context_lines":[{"line_number":582,"context_line":"                \u0027step_size\u0027: 1,"},{"line_number":583,"context_line":"            },"},{"line_number":584,"context_line":"        }"},{"line_number":585,"context_line":"        if not rp_tree.exists(nodename):"},{"line_number":586,"context_line":"            rp_tree.new_root(nodename, uuidutils.generate_uuid())"},{"line_number":587,"context_line":"        rp_tree.update_inventory(nodename, result)"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"    def get_available_resource(self, nodename):"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_a768e0b8","line":586,"range":{"start_line":585,"start_character":8,"end_line":586,"end_character":65},"updated":"2018-05-10 21:18:50.000000000","message":"Don\u0027t do this.  The resource tracker guarantees [1][2] that the compute node RP exists (making this unnecessary) with a specific UUID (so this would be wrong if it did get hit).\n\n[1] https://github.com/openstack/nova/blob/master/nova/compute/resource_tracker.py#L876-L877\n[2] https://github.com/openstack/nova/blob/master/nova/scheduler/client/report.py#L1018-L1020","commit_id":"6e0eed76e0e453f76d43bb4f74fb771904902e69"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"aff9f559450ef49f8dad9220165207f9c533e95b","unresolved":false,"context_lines":[{"line_number":582,"context_line":"                \u0027step_size\u0027: 1,"},{"line_number":583,"context_line":"            },"},{"line_number":584,"context_line":"        }"},{"line_number":585,"context_line":"        if not rp_tree.exists(nodename):"},{"line_number":586,"context_line":"            rp_tree.new_root(nodename, uuidutils.generate_uuid())"},{"line_number":587,"context_line":"        rp_tree.update_inventory(nodename, result)"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"    def get_available_resource(self, nodename):"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_75e26da2","line":586,"range":{"start_line":585,"start_character":8,"end_line":586,"end_character":65},"in_reply_to":"5f7c97a3_a768e0b8","updated":"2018-05-11 08:39:46.000000000","message":"Will remove.","commit_id":"6e0eed76e0e453f76d43bb4f74fb771904902e69"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"caf4d02d198992cf2b321928b04b2740f2a5c619","unresolved":false,"context_lines":[{"line_number":548,"context_line":""},{"line_number":549,"context_line":"            rp_tree.update_inventory(rp_name, inv)"},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"    def update_provider_tree(self, provider_tree, nodename):"},{"line_number":552,"context_line":"        \"\"\"Nested resource provider support. Update resource in provider tree."},{"line_number":553,"context_line":"        \"\"\""},{"line_number":554,"context_line":"        host_stats \u003d self.host_state.get_host_stats(refresh\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":34,"id":"5f7c97a3_4b7c6e82","line":551,"updated":"2018-05-28 13:18:59.000000000","message":"There is a big upgrade impact here. \nAs once as a compute is upgraded to Rocky, it will stop reporting VGPU inventories against its root RP, but rather for each VGPU group. Then, the existing allocations that were made for that running compute won\u0027t be taken in account.\n\nAlso, that makes me think of a scheduler issue where we need to have all computes to be upgraded to Rocky before we can do nested RP queries.","commit_id":"c77398dc1dcd4589773015f7e93c96cd70350202"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"e890b12f6ab24f2f7e7de640101095bc17699462","unresolved":false,"context_lines":[{"line_number":548,"context_line":""},{"line_number":549,"context_line":"            rp_tree.update_inventory(rp_name, inv)"},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"    def update_provider_tree(self, provider_tree, nodename):"},{"line_number":552,"context_line":"        \"\"\"Nested resource provider support. Update resource in provider tree."},{"line_number":553,"context_line":"        \"\"\""},{"line_number":554,"context_line":"        host_stats \u003d self.host_state.get_host_stats(refresh\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":34,"id":"5f7c97a3_cc709343","line":551,"in_reply_to":"5f7c97a3_4b7c6e82","updated":"2018-05-29 02:04:22.000000000","message":"Hi, Sylvain. When we have vgpu already allocated in compute node, the `remain` field of gpug would be different from `total` field. in that case, we would reserve all the resource and wait customer\u0027s intervene. Check https://review.openstack.org/#/c/520313/43/nova/virt/xenapi/driver.py.\nAbout computes upgraded, we can\u0027t manage it on driver level, it more looks like a customer operation issue. Or placement could do something about it? I have no idea.\nAny suggestion?","commit_id":"c77398dc1dcd4589773015f7e93c96cd70350202"}]}
