)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"9bbf36aeb555928aa090c03a0c0d49c2beb472ed","unresolved":false,"context_lines":[{"line_number":11,"context_line":"data in cyborg will be disaccord with placement."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Add unit test for destory device and deployable."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I6467981ed5a2196d50d824f92248205d37bb0b92"},{"line_number":16,"context_line":"story: 2007534"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3f4c43b2_3af0bf67","line":14,"updated":"2020-04-16 10:52:52.000000000","message":"You should add more details in commit message, that should covered your TODO said, and ponit to https://etherpad.opendev.org/p/cyborg-victoria-goals@13.","commit_id":"cd9b8194cac0427a684aed811572c1ba0161d6e3"}],"cyborg/conductor/manager.py":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"4498915bb347a3bf25214f3f91413db94d552b6d","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                    self.get_placement_needed_info_and_report(context,"},{"line_number":117,"context_line":"                                                              driver_dep_obj,"},{"line_number":118,"context_line":"                                                              host_rp)"},{"line_number":119,"context_line":"                except Exception as exc:"},{"line_number":120,"context_line":"                    LOG.info(\"Failed to add device %(device)s. \""},{"line_number":121,"context_line":"                             \"Reason: %(reason)s\","},{"line_number":122,"context_line":"                             {\u0027device\u0027: new_driver_dev_obj,"}],"source_content_type":"text/x-python","patch_set":1,"id":"df33271e_eb365d51","line":119,"updated":"2020-04-09 01:51:23.000000000","message":"Right, if we get resource failed, this device will be occupied, we should cleanup the device object mapping before next deivce call.\n\nPls add unit test for this change, to assert the destroy() called.","commit_id":"37da8b1605b80ae47ab5446fbad4f5f5c9e736c0"},{"author":{"_account_id":31412,"name":"Wenping Song","email":"songwenping@inspur.com","username":"songwenping"},"change_message_id":"5b2746ef6f1ede675659ef313bf47b31cd9e5495","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        for a in added:"},{"line_number":112,"context_line":"            new_driver_dev_obj \u003d new_driver_device_list[new_cpid_list.index(a)]"},{"line_number":113,"context_line":"            new_driver_dev_obj.create(context, host)"},{"line_number":114,"context_line":"            cleanup \u003d False"},{"line_number":115,"context_line":"            for driver_dep_obj in new_driver_dev_obj.deployable_list:"},{"line_number":116,"context_line":"                try:"},{"line_number":117,"context_line":"                    self.get_placement_needed_info_and_report(context,"},{"line_number":118,"context_line":"                                                              driver_dep_obj,"},{"line_number":119,"context_line":"                                                              host_rp)"},{"line_number":120,"context_line":"                except Exception as exc:"},{"line_number":121,"context_line":"                    LOG.info(\"Failed to add device %(device)s. \""},{"line_number":122,"context_line":"                             \"Reason: %(reason)s\","},{"line_number":123,"context_line":"                             {\u0027device\u0027: new_driver_dev_obj,"},{"line_number":124,"context_line":"                              \u0027reason\u0027: exc})"},{"line_number":125,"context_line":"                    cleanup \u003d True"},{"line_number":126,"context_line":"                    break"},{"line_number":127,"context_line":"            if cleanup:"},{"line_number":128,"context_line":"                new_driver_dev_obj.destroy(context, host)"},{"line_number":129,"context_line":"                self._delete_provider_and_sub_providers(context, host_rp)"},{"line_number":130,"context_line":"        for s in same:"},{"line_number":131,"context_line":"            # get the driver_dev_obj, diff the driver_device layer"},{"line_number":132,"context_line":"            new_driver_dev_obj \u003d new_driver_device_list[new_cpid_list.index(s)]"}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_4dbca5db","line":129,"range":{"start_line":114,"start_character":0,"end_line":129,"end_character":73},"updated":"2020-04-10 02:04:22.000000000","message":"\u003e I don\u0027t think we should delete the devices and resources discovered by Cyborg. An operator should be able to see that Cyborg did its job and it is Placement update that failed.\n\nFirstly, if get_placement_needed_info_and_report() failed, it will effect for adding the next resource (devices). So we add \"try ... except\" to break the internal *for* cycle, and continue resource adding even if some resources report error.\n\nSecondly, if resource report to placement error and we don\u0027t destory the created resources in Cyborg db, the resources never will be adding in next period task, so we should destory resources and cleanup providers caused by above failed operation and let the next *period task* to get resources by subsequent resource tracker.","commit_id":"e0dd2984467d3eb27a2077ee1ce1c0c8ca607108"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"81529158050c0f0082b8c1df7c6f15e1721e15da","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        for a in added:"},{"line_number":112,"context_line":"            new_driver_dev_obj \u003d new_driver_device_list[new_cpid_list.index(a)]"},{"line_number":113,"context_line":"            new_driver_dev_obj.create(context, host)"},{"line_number":114,"context_line":"            cleanup \u003d False"},{"line_number":115,"context_line":"            for driver_dep_obj in new_driver_dev_obj.deployable_list:"},{"line_number":116,"context_line":"                try:"},{"line_number":117,"context_line":"                    self.get_placement_needed_info_and_report(context,"},{"line_number":118,"context_line":"                                                              driver_dep_obj,"},{"line_number":119,"context_line":"                                                              host_rp)"},{"line_number":120,"context_line":"                except Exception as exc:"},{"line_number":121,"context_line":"                    LOG.info(\"Failed to add device %(device)s. \""},{"line_number":122,"context_line":"                             \"Reason: %(reason)s\","},{"line_number":123,"context_line":"                             {\u0027device\u0027: new_driver_dev_obj,"},{"line_number":124,"context_line":"                              \u0027reason\u0027: exc})"},{"line_number":125,"context_line":"                    cleanup \u003d True"},{"line_number":126,"context_line":"                    break"},{"line_number":127,"context_line":"            if cleanup:"},{"line_number":128,"context_line":"                new_driver_dev_obj.destroy(context, host)"},{"line_number":129,"context_line":"                self._delete_provider_and_sub_providers(context, host_rp)"},{"line_number":130,"context_line":"        for s in same:"},{"line_number":131,"context_line":"            # get the driver_dev_obj, diff the driver_device layer"},{"line_number":132,"context_line":"            new_driver_dev_obj \u003d new_driver_device_list[new_cpid_list.index(s)]"}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_d027ae11","line":129,"range":{"start_line":114,"start_character":0,"end_line":129,"end_character":73},"in_reply_to":"df33271e_4dbca5db","updated":"2020-04-10 05:03:22.000000000","message":"May be we could mark that device/deployable as not-synced in the db, so we can try it next time. If we simply delete it, the operator would not see it in the inventory. In the extreme case, if Placement is down for some reason, no new device will get added to Cyborg db.","commit_id":"e0dd2984467d3eb27a2077ee1ce1c0c8ca607108"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"81f03db6313bc0faebd71e0e8402f8d987c30d0e","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        for a in added:"},{"line_number":112,"context_line":"            new_driver_dev_obj \u003d new_driver_device_list[new_cpid_list.index(a)]"},{"line_number":113,"context_line":"            new_driver_dev_obj.create(context, host)"},{"line_number":114,"context_line":"            cleanup \u003d False"},{"line_number":115,"context_line":"            for driver_dep_obj in new_driver_dev_obj.deployable_list:"},{"line_number":116,"context_line":"                try:"},{"line_number":117,"context_line":"                    self.get_placement_needed_info_and_report(context,"},{"line_number":118,"context_line":"                                                              driver_dep_obj,"},{"line_number":119,"context_line":"                                                              host_rp)"},{"line_number":120,"context_line":"                except Exception as exc:"},{"line_number":121,"context_line":"                    LOG.info(\"Failed to add device %(device)s. \""},{"line_number":122,"context_line":"                             \"Reason: %(reason)s\","},{"line_number":123,"context_line":"                             {\u0027device\u0027: new_driver_dev_obj,"},{"line_number":124,"context_line":"                              \u0027reason\u0027: exc})"},{"line_number":125,"context_line":"                    cleanup \u003d True"},{"line_number":126,"context_line":"                    break"},{"line_number":127,"context_line":"            if cleanup:"},{"line_number":128,"context_line":"                new_driver_dev_obj.destroy(context, host)"},{"line_number":129,"context_line":"                self._delete_provider_and_sub_providers(context, host_rp)"},{"line_number":130,"context_line":"        for s in same:"},{"line_number":131,"context_line":"            # get the driver_dev_obj, diff the driver_device layer"},{"line_number":132,"context_line":"            new_driver_dev_obj \u003d new_driver_device_list[new_cpid_list.index(s)]"}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_13e3e035","line":129,"range":{"start_line":114,"start_character":0,"end_line":129,"end_character":73},"in_reply_to":"df33271e_73718ca8","updated":"2020-04-10 06:12:29.000000000","message":"Agree directly remove device from cyborg device. Now resource scheulder is from placement. When placement is down, cyborg shouldn\u0027t keep the dirty data in its own db. When placement is up, it will auto sync resource info.","commit_id":"e0dd2984467d3eb27a2077ee1ce1c0c8ca607108"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"840d3a31f8067b0aa19a68c6a117a35530e0c0b6","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        for a in added:"},{"line_number":112,"context_line":"            new_driver_dev_obj \u003d new_driver_device_list[new_cpid_list.index(a)]"},{"line_number":113,"context_line":"            new_driver_dev_obj.create(context, host)"},{"line_number":114,"context_line":"            cleanup \u003d False"},{"line_number":115,"context_line":"            for driver_dep_obj in new_driver_dev_obj.deployable_list:"},{"line_number":116,"context_line":"                try:"},{"line_number":117,"context_line":"                    self.get_placement_needed_info_and_report(context,"},{"line_number":118,"context_line":"                                                              driver_dep_obj,"},{"line_number":119,"context_line":"                                                              host_rp)"},{"line_number":120,"context_line":"                except Exception as exc:"},{"line_number":121,"context_line":"                    LOG.info(\"Failed to add device %(device)s. \""},{"line_number":122,"context_line":"                             \"Reason: %(reason)s\","},{"line_number":123,"context_line":"                             {\u0027device\u0027: new_driver_dev_obj,"},{"line_number":124,"context_line":"                              \u0027reason\u0027: exc})"},{"line_number":125,"context_line":"                    cleanup \u003d True"},{"line_number":126,"context_line":"                    break"},{"line_number":127,"context_line":"            if cleanup:"},{"line_number":128,"context_line":"                new_driver_dev_obj.destroy(context, host)"},{"line_number":129,"context_line":"                self._delete_provider_and_sub_providers(context, host_rp)"},{"line_number":130,"context_line":"        for s in same:"},{"line_number":131,"context_line":"            # get the driver_dev_obj, diff the driver_device layer"},{"line_number":132,"context_line":"            new_driver_dev_obj \u003d new_driver_device_list[new_cpid_list.index(s)]"}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_73718ca8","line":129,"range":{"start_line":114,"start_character":0,"end_line":129,"end_character":73},"in_reply_to":"df33271e_d027ae11","updated":"2020-04-10 06:07:54.000000000","message":"I think this cleanup is necessary, that at least cleans up dirty data caused by get_placement_needed_info_and_report() failed.\n\nIf we donot clean it, it was marked but can not be added, IMO it also not friedly to operator.\n\nThe Placement down of some reason is out of our control, and if the Placement service down, may cause resource inconsistency.\n\nWhen the Placement service is up, will it automatically synchronize resource information?","commit_id":"e0dd2984467d3eb27a2077ee1ce1c0c8ca607108"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"840d3a31f8067b0aa19a68c6a117a35530e0c0b6","unresolved":false,"context_lines":[{"line_number":190,"context_line":"                         \"Reason: %(reason)s\","},{"line_number":191,"context_line":"                         {\u0027deployable\u0027: new_driver_dep_obj,"},{"line_number":192,"context_line":"                          \u0027reason\u0027: exc})"},{"line_number":193,"context_line":"                new_driver_dep_obj.destroy(context, device_id)"},{"line_number":194,"context_line":"        for s in same:"},{"line_number":195,"context_line":"            # get the driver_dep_obj, diff the driver_dep layer"},{"line_number":196,"context_line":"            new_driver_dep_obj \u003d new_driver_dep_list[new_name_list.index(s)]"}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_d36978be","line":193,"updated":"2020-04-10 06:07:54.000000000","message":"Is this need to cleanup providers? I think it\u0027s the same as above.","commit_id":"e0dd2984467d3eb27a2077ee1ce1c0c8ca607108"},{"author":{"_account_id":31412,"name":"Wenping Song","email":"songwenping@inspur.com","username":"songwenping"},"change_message_id":"c0466a0733c12c7c6f5fd96bebef0425101ec10b","unresolved":false,"context_lines":[{"line_number":190,"context_line":"                         \"Reason: %(reason)s\","},{"line_number":191,"context_line":"                         {\u0027deployable\u0027: new_driver_dep_obj,"},{"line_number":192,"context_line":"                          \u0027reason\u0027: exc})"},{"line_number":193,"context_line":"                new_driver_dep_obj.destroy(context, device_id)"},{"line_number":194,"context_line":"        for s in same:"},{"line_number":195,"context_line":"            # get the driver_dep_obj, diff the driver_dep layer"},{"line_number":196,"context_line":"            new_driver_dep_obj \u003d new_driver_dep_list[new_name_list.index(s)]"}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_938090f9","line":193,"in_reply_to":"df33271e_d36978be","updated":"2020-04-10 07:24:47.000000000","message":"Yeah, also need to cleanup. Done.","commit_id":"e0dd2984467d3eb27a2077ee1ce1c0c8ca607108"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"883460d0d0179e191c0ad787bb1daa134ca5c297","unresolved":false,"context_lines":[{"line_number":191,"context_line":"                         {\u0027deployable\u0027: new_driver_dep_obj,"},{"line_number":192,"context_line":"                          \u0027reason\u0027: exc})"},{"line_number":193,"context_line":"                new_driver_dep_obj.destroy(context, device_id)"},{"line_number":194,"context_line":"                self._delete_provider_and_sub_providers(context, host_rp)"},{"line_number":195,"context_line":"        for s in same:"},{"line_number":196,"context_line":"            # get the driver_dep_obj, diff the driver_dep layer"},{"line_number":197,"context_line":"            new_driver_dep_obj \u003d new_driver_dep_list[new_name_list.index(s)]"}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_f3411ca8","line":194,"range":{"start_line":194,"start_character":16,"end_line":194,"end_character":73},"updated":"2020-04-10 07:08:17.000000000","message":"I am not sure whether we need to do this. Just mark it and let other friends notice this.","commit_id":"c9062dbb1c625b32bdc190ea68d9a5bc0cb65a97"},{"author":{"_account_id":31412,"name":"Wenping Song","email":"songwenping@inspur.com","username":"songwenping"},"change_message_id":"c0466a0733c12c7c6f5fd96bebef0425101ec10b","unresolved":false,"context_lines":[{"line_number":191,"context_line":"                         {\u0027deployable\u0027: new_driver_dep_obj,"},{"line_number":192,"context_line":"                          \u0027reason\u0027: exc})"},{"line_number":193,"context_line":"                new_driver_dep_obj.destroy(context, device_id)"},{"line_number":194,"context_line":"                self._delete_provider_and_sub_providers(context, host_rp)"},{"line_number":195,"context_line":"        for s in same:"},{"line_number":196,"context_line":"            # get the driver_dep_obj, diff the driver_dep layer"},{"line_number":197,"context_line":"            new_driver_dep_obj \u003d new_driver_dep_list[new_name_list.index(s)]"}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_73150c49","line":194,"range":{"start_line":194,"start_character":16,"end_line":194,"end_character":73},"in_reply_to":"df33271e_f3411ca8","updated":"2020-04-10 07:24:47.000000000","message":"Need to do this because there may be other exception in get_placement_needed_info_and_report(). For example, update_inventory failed or add_traits_to_rp failed and so on.","commit_id":"c9062dbb1c625b32bdc190ea68d9a5bc0cb65a97"},{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"cab6af3271eeda6f631bdbba2db49609994c84ee","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                    break"},{"line_number":127,"context_line":"            if cleanup:"},{"line_number":128,"context_line":"                new_driver_dev_obj.destroy(context, host)"},{"line_number":129,"context_line":"                for driver_dep_obj in new_driver_dev_obj.deployable_list:"},{"line_number":130,"context_line":"                    rp_uuid \u003d self.get_rp_uuid_from_obj(driver_dep_obj)"},{"line_number":131,"context_line":"                    self._delete_provider_and_sub_providers(context, rp_uuid)"},{"line_number":132,"context_line":"        for s in same:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f4c43b2_e671a80e","line":129,"range":{"start_line":129,"start_character":38,"end_line":129,"end_character":56},"updated":"2020-04-16 06:52:50.000000000","message":"It seems unlogic to delete new_driver_dev_obj before read its attribute. It is better to destroy new_driver_dev_obj after the for loop. Not sure if it will raise error here.","commit_id":"735aa513ec563bde71a10f658806abac4d15731a"},{"author":{"_account_id":31412,"name":"Wenping Song","email":"songwenping@inspur.com","username":"songwenping"},"change_message_id":"4ab3c6e0a4fda9ea954842c8d4596fa7b9e637da","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                    break"},{"line_number":127,"context_line":"            if cleanup:"},{"line_number":128,"context_line":"                new_driver_dev_obj.destroy(context, host)"},{"line_number":129,"context_line":"                for driver_dep_obj in new_driver_dev_obj.deployable_list:"},{"line_number":130,"context_line":"                    rp_uuid \u003d self.get_rp_uuid_from_obj(driver_dep_obj)"},{"line_number":131,"context_line":"                    self._delete_provider_and_sub_providers(context, rp_uuid)"},{"line_number":132,"context_line":"        for s in same:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f4c43b2_ecf8694a","line":129,"range":{"start_line":129,"start_character":38,"end_line":129,"end_character":56},"in_reply_to":"3f4c43b2_e671a80e","updated":"2020-04-16 09:14:07.000000000","message":"It doesnot matter. The new_driver_dev_obj object is not come from db, but generate from new_driver_device_list. Destory first has not effect to use it below.","commit_id":"735aa513ec563bde71a10f658806abac4d15731a"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"a7818fc64933c26d61bf296b34d7c95bdc28d0f5","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                    break"},{"line_number":127,"context_line":"            if cleanup:"},{"line_number":128,"context_line":"                new_driver_dev_obj.destroy(context, host)"},{"line_number":129,"context_line":"                for driver_dep_obj in new_driver_dev_obj.deployable_list:"},{"line_number":130,"context_line":"                    rp_uuid \u003d self.get_rp_uuid_from_obj(driver_dep_obj)"},{"line_number":131,"context_line":"                    self._delete_provider_and_sub_providers(context, rp_uuid)"},{"line_number":132,"context_line":"        for s in same:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f4c43b2_c14ba4ad","line":129,"range":{"start_line":129,"start_character":38,"end_line":129,"end_character":56},"in_reply_to":"3f4c43b2_ecf8694a","updated":"2020-04-17 02:17:13.000000000","message":"Ye. The destory\u0027s just clean the data in db. new_deriver_dev_obj can continue use.","commit_id":"735aa513ec563bde71a10f658806abac4d15731a"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"b35c36a4709b077515e4a4b7d5669a359ef55d71","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                              \u0027reason\u0027: exc})"},{"line_number":125,"context_line":"                    cleanup \u003d True"},{"line_number":126,"context_line":"                    break"},{"line_number":127,"context_line":"            if cleanup:"},{"line_number":128,"context_line":"                new_driver_dev_obj.destroy(context, host)"},{"line_number":129,"context_line":"                for driver_dep_obj in new_driver_dev_obj.deployable_list:"},{"line_number":130,"context_line":"                    rp_uuid \u003d self.get_rp_uuid_from_obj(driver_dep_obj)"},{"line_number":131,"context_line":"                    self._delete_provider_and_sub_providers(context, rp_uuid)"},{"line_number":132,"context_line":"        for s in same:"},{"line_number":133,"context_line":"            # get the driver_dev_obj, diff the driver_device layer"},{"line_number":134,"context_line":"            new_driver_dev_obj \u003d new_driver_device_list[new_cpid_list.index(s)]"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f4c43b2_83129db0","line":131,"range":{"start_line":127,"start_character":0,"end_line":131,"end_character":77},"updated":"2020-04-13 02:54:00.000000000","message":"seems reasonable. like brin\u0027s comments, let\u0027s wait for irc meeting.","commit_id":"735aa513ec563bde71a10f658806abac4d15731a"},{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"cab6af3271eeda6f631bdbba2db49609994c84ee","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                         \"Reason: %(reason)s\","},{"line_number":193,"context_line":"                         {\u0027deployable\u0027: new_driver_dep_obj,"},{"line_number":194,"context_line":"                          \u0027reason\u0027: exc})"},{"line_number":195,"context_line":"                new_driver_dep_obj.destroy(context, device_id)"},{"line_number":196,"context_line":"                rp_uuid \u003d self.get_rp_uuid_from_obj(new_driver_dep_obj)"},{"line_number":197,"context_line":"                self._delete_provider_and_sub_providers(context, rp_uuid)"},{"line_number":198,"context_line":"        for s in same:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f4c43b2_665f5872","line":195,"range":{"start_line":195,"start_character":15,"end_line":195,"end_character":62},"updated":"2020-04-16 06:52:50.000000000","message":"ditto","commit_id":"735aa513ec563bde71a10f658806abac4d15731a"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"b35c36a4709b077515e4a4b7d5669a359ef55d71","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                          \u0027reason\u0027: exc})"},{"line_number":195,"context_line":"                new_driver_dep_obj.destroy(context, device_id)"},{"line_number":196,"context_line":"                rp_uuid \u003d self.get_rp_uuid_from_obj(new_driver_dep_obj)"},{"line_number":197,"context_line":"                self._delete_provider_and_sub_providers(context, rp_uuid)"},{"line_number":198,"context_line":"        for s in same:"},{"line_number":199,"context_line":"            # get the driver_dep_obj, diff the driver_dep layer"},{"line_number":200,"context_line":"            new_driver_dep_obj \u003d new_driver_dep_list[new_name_list.index(s)]"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f4c43b2_8339fd42","line":197,"range":{"start_line":197,"start_character":21,"end_line":197,"end_character":55},"updated":"2020-04-13 02:54:00.000000000","message":"If this method raise exception, I think it\u0027s not friendly to expose this error in the log. Suggest to try... except... and add LOG \"try rollback data from placement, result is success or failed\"","commit_id":"735aa513ec563bde71a10f658806abac4d15731a"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"a7818fc64933c26d61bf296b34d7c95bdc28d0f5","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                          \u0027reason\u0027: exc})"},{"line_number":195,"context_line":"                new_driver_dep_obj.destroy(context, device_id)"},{"line_number":196,"context_line":"                rp_uuid \u003d self.get_rp_uuid_from_obj(new_driver_dep_obj)"},{"line_number":197,"context_line":"                self._delete_provider_and_sub_providers(context, rp_uuid)"},{"line_number":198,"context_line":"        for s in same:"},{"line_number":199,"context_line":"            # get the driver_dep_obj, diff the driver_dep layer"},{"line_number":200,"context_line":"            new_driver_dep_obj \u003d new_driver_dep_list[new_name_list.index(s)]"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f4c43b2_41f794f6","line":197,"range":{"start_line":197,"start_character":21,"end_line":197,"end_character":55},"in_reply_to":"3f4c43b2_4c1a3d7d","updated":"2020-04-17 02:17:13.000000000","message":"Agree merged. But we shouldn\u0027t forgot this situation.","commit_id":"735aa513ec563bde71a10f658806abac4d15731a"},{"author":{"_account_id":31412,"name":"Wenping Song","email":"songwenping@inspur.com","username":"songwenping"},"change_message_id":"4ab3c6e0a4fda9ea954842c8d4596fa7b9e637da","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                          \u0027reason\u0027: exc})"},{"line_number":195,"context_line":"                new_driver_dep_obj.destroy(context, device_id)"},{"line_number":196,"context_line":"                rp_uuid \u003d self.get_rp_uuid_from_obj(new_driver_dep_obj)"},{"line_number":197,"context_line":"                self._delete_provider_and_sub_providers(context, rp_uuid)"},{"line_number":198,"context_line":"        for s in same:"},{"line_number":199,"context_line":"            # get the driver_dep_obj, diff the driver_dep layer"},{"line_number":200,"context_line":"            new_driver_dep_obj \u003d new_driver_dep_list[new_name_list.index(s)]"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f4c43b2_4c1a3d7d","line":197,"range":{"start_line":197,"start_character":21,"end_line":197,"end_character":55},"in_reply_to":"3f4c43b2_8339fd42","updated":"2020-04-16 09:14:07.000000000","message":"If so, we should do this for all \"_delete_provider_and_sub_providers\" calls. Just to update it in V release. ths.","commit_id":"735aa513ec563bde71a10f658806abac4d15731a"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"9bbf36aeb555928aa090c03a0c0d49c2beb472ed","unresolved":false,"context_lines":[{"line_number":197,"context_line":"                         {\u0027deployable\u0027: new_driver_dep_obj,"},{"line_number":198,"context_line":"                          \u0027reason\u0027: exc})"},{"line_number":199,"context_line":"                new_driver_dep_obj.destroy(context, device_id)"},{"line_number":200,"context_line":"                rp_uuid \u003d self.get_rp_uuid_from_obj(new_driver_dep_obj)"},{"line_number":201,"context_line":"                self._delete_provider_and_sub_providers(context, rp_uuid)"},{"line_number":202,"context_line":"        for s in same:"},{"line_number":203,"context_line":"            # get the driver_dep_obj, diff the driver_dep layer"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f4c43b2_5ad4abbd","line":200,"updated":"2020-04-16 10:52:52.000000000","message":"Here also should add TODO to note.","commit_id":"cd9b8194cac0427a684aed811572c1ba0161d6e3"}],"cyborg/tests/unit/conductor/test_manager.py":[{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"b35c36a4709b077515e4a4b7d5669a359ef55d71","unresolved":false,"context_lines":[{"line_number":120,"context_line":"                name\u003duuids.compute_node))"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        self.cm.drv_device_make_diff("},{"line_number":123,"context_line":"            mock.sentinel.context, \u0027foo\u0027,"},{"line_number":124,"context_line":"            old_driver_attr_list, new_driver_attr_list)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        mock_destroy_driver_device.assert_called_once()"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f4c43b2_8371fde3","line":123,"range":{"start_line":123,"start_character":36,"end_line":123,"end_character":39},"updated":"2020-04-13 02:54:00.000000000","message":"suggest use more clearly word instead of \u0027foo\u0027","commit_id":"735aa513ec563bde71a10f658806abac4d15731a"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"b35c36a4709b077515e4a4b7d5669a359ef55d71","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        self.cm.drv_deployable_make_diff("},{"line_number":152,"context_line":"            mock.sentinel.context, \u00271\u0027, \u00272\u0027,"},{"line_number":153,"context_line":"            old_driver_dep_list, new_driver_dep_list, \u0027foo\u0027)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        mock_destroy_driver_deployable.assert_called_once()"},{"line_number":156,"context_line":"        mock_placement_delete.assert_called_once()"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f4c43b2_c372e5e3","line":153,"range":{"start_line":153,"start_character":52,"end_line":153,"end_character":58},"updated":"2020-04-13 02:54:00.000000000","message":"like \u0027fake_host_uuid\u0027","commit_id":"735aa513ec563bde71a10f658806abac4d15731a"}],"cyborg/tests/unit/fake_driver_device.py":[{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"883460d0d0179e191c0ad787bb1daa134ca5c297","unresolved":false,"context_lines":[{"line_number":26,"context_line":"        \"vendor\": \"0xABCD\","},{"line_number":27,"context_line":"        \"vendor_board_info\": \"fake_vendor_info\","},{"line_number":28,"context_line":"        \"model\": \"miss model info\","},{"line_number":29,"context_line":"        \"type\": \"FPGA\","},{"line_number":30,"context_line":"        \"std_board_info\": \"{\u0027class\u0027: \u0027Fake class\u0027, \u0027device_id\u0027: \u00270xabcd\u0027}\","},{"line_number":31,"context_line":"        \"stub\": False,"},{"line_number":32,"context_line":"        \"controlpath_id\": get_fake_driver_controlpath_objs()[0],"}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_93fc1073","line":29,"range":{"start_line":29,"start_character":16,"end_line":29,"end_character":22},"updated":"2020-04-10 07:08:17.000000000","message":"Hi, why change this?","commit_id":"e0dd2984467d3eb27a2077ee1ce1c0c8ca607108"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"c5752d32db68915c71b4434ffec681409a42ecad","unresolved":false,"context_lines":[{"line_number":26,"context_line":"        \"vendor\": \"0xABCD\","},{"line_number":27,"context_line":"        \"vendor_board_info\": \"fake_vendor_info\","},{"line_number":28,"context_line":"        \"model\": \"miss model info\","},{"line_number":29,"context_line":"        \"type\": \"FPGA\","},{"line_number":30,"context_line":"        \"std_board_info\": \"{\u0027class\u0027: \u0027Fake class\u0027, \u0027device_id\u0027: \u00270xabcd\u0027}\","},{"line_number":31,"context_line":"        \"stub\": False,"},{"line_number":32,"context_line":"        \"controlpath_id\": get_fake_driver_controlpath_objs()[0],"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f4c43b2_57504b33","line":29,"range":{"start_line":29,"start_character":16,"end_line":29,"end_character":22},"in_reply_to":"df33271e_9369b0f9","updated":"2020-04-13 08:59:03.000000000","message":"Ok.","commit_id":"e0dd2984467d3eb27a2077ee1ce1c0c8ca607108"},{"author":{"_account_id":31412,"name":"Wenping Song","email":"songwenping@inspur.com","username":"songwenping"},"change_message_id":"c0466a0733c12c7c6f5fd96bebef0425101ec10b","unresolved":false,"context_lines":[{"line_number":26,"context_line":"        \"vendor\": \"0xABCD\","},{"line_number":27,"context_line":"        \"vendor_board_info\": \"fake_vendor_info\","},{"line_number":28,"context_line":"        \"model\": \"miss model info\","},{"line_number":29,"context_line":"        \"type\": \"FPGA\","},{"line_number":30,"context_line":"        \"std_board_info\": \"{\u0027class\u0027: \u0027Fake class\u0027, \u0027device_id\u0027: \u00270xabcd\u0027}\","},{"line_number":31,"context_line":"        \"stub\": False,"},{"line_number":32,"context_line":"        \"controlpath_id\": get_fake_driver_controlpath_objs()[0],"}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_9369b0f9","line":29,"range":{"start_line":29,"start_character":16,"end_line":29,"end_character":22},"in_reply_to":"df33271e_93fc1073","updated":"2020-04-10 07:24:47.000000000","message":"I just use GPU accelerators and the deployables below is also GPU type.","commit_id":"e0dd2984467d3eb27a2077ee1ce1c0c8ca607108"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"883460d0d0179e191c0ad787bb1daa134ca5c297","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    }"},{"line_number":45,"context_line":"    return [driver_device1, driver_device2]"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"def _convert_to_db_driver_device(driver_device_dict):"},{"line_number":49,"context_line":"    for name, field in objects.Device.fields.items():"},{"line_number":50,"context_line":"        if name in driver_device_dict:"},{"line_number":51,"context_line":"            continue"},{"line_number":52,"context_line":"        if field.nullable:"},{"line_number":53,"context_line":"            driver_device_dict[name] \u003d None"},{"line_number":54,"context_line":"        elif field.default !\u003d fields.UnspecifiedDefault:"},{"line_number":55,"context_line":"            driver_device_dict[name] \u003d field.default"},{"line_number":56,"context_line":"        else:"},{"line_number":57,"context_line":"            raise Exception(\u0027fake_db_device needs help with %s\u0027 % name)"},{"line_number":58,"context_line":"    return driver_device_dict"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"def get_db_devices():"},{"line_number":62,"context_line":"    devices_list \u003d get_fake_driver_devices_as_dict()"},{"line_number":63,"context_line":"    db_devices \u003d list(map(_convert_to_db_driver_device, devices_list))"},{"line_number":64,"context_line":"    return db_devices"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def get_fake_driver_devices_objs():"}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_73018c6a","line":64,"range":{"start_line":47,"start_character":0,"end_line":64,"end_character":21},"updated":"2020-04-10 07:08:17.000000000","message":"why we delete this part?","commit_id":"e0dd2984467d3eb27a2077ee1ce1c0c8ca607108"},{"author":{"_account_id":31412,"name":"Wenping Song","email":"songwenping@inspur.com","username":"songwenping"},"change_message_id":"c0466a0733c12c7c6f5fd96bebef0425101ec10b","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    }"},{"line_number":45,"context_line":"    return [driver_device1, driver_device2]"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"def _convert_to_db_driver_device(driver_device_dict):"},{"line_number":49,"context_line":"    for name, field in objects.Device.fields.items():"},{"line_number":50,"context_line":"        if name in driver_device_dict:"},{"line_number":51,"context_line":"            continue"},{"line_number":52,"context_line":"        if field.nullable:"},{"line_number":53,"context_line":"            driver_device_dict[name] \u003d None"},{"line_number":54,"context_line":"        elif field.default !\u003d fields.UnspecifiedDefault:"},{"line_number":55,"context_line":"            driver_device_dict[name] \u003d field.default"},{"line_number":56,"context_line":"        else:"},{"line_number":57,"context_line":"            raise Exception(\u0027fake_db_device needs help with %s\u0027 % name)"},{"line_number":58,"context_line":"    return driver_device_dict"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"def get_db_devices():"},{"line_number":62,"context_line":"    devices_list \u003d get_fake_driver_devices_as_dict()"},{"line_number":63,"context_line":"    db_devices \u003d list(map(_convert_to_db_driver_device, devices_list))"},{"line_number":64,"context_line":"    return db_devices"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def get_fake_driver_devices_objs():"}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_13fac041","line":64,"range":{"start_line":47,"start_character":0,"end_line":64,"end_character":21},"in_reply_to":"df33271e_73018c6a","updated":"2020-04-10 07:24:47.000000000","message":"we haven\u0027t use this part for the unit test yet.","commit_id":"e0dd2984467d3eb27a2077ee1ce1c0c8ca607108"}]}
