)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"352c7a601ef853f507aec94d83e2c1807278fa08","unresolved":false,"context_lines":[{"line_number":16,"context_line":"- Requirements updates to pull in the os-service-types release"},{"line_number":17,"context_line":"containing the \u0027accelerator\u0027 service type."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"u-c bump for os-service-types:"},{"line_number":20,"context_line":"Depends-On: https://review.openstack.org/632561"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: Iee0766269d61948ad701911e8b0e5e24d3d6eb04"},{"line_number":23,"context_line":"Blueprint: nova-cyborg-interaction"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9fdfeff1_457c531e","line":20,"range":{"start_line":19,"start_character":0,"end_line":20,"end_character":47},"updated":"2019-01-30 15:17:50.000000000","message":"This is merged and released. Remove.","commit_id":"52982976a50082c669d7504e245f5b9d2c4fd5e3"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"87f7b829d43844fb7fcce8dcad8ce91f69f40cd6","unresolved":false,"context_lines":[{"line_number":16,"context_line":"- Requirements updates to pull in the os-service-types release"},{"line_number":17,"context_line":"containing the \u0027accelerator\u0027 service type."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"u-c bump for os-service-types:"},{"line_number":20,"context_line":"Depends-On: https://review.openstack.org/632561"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: Iee0766269d61948ad701911e8b0e5e24d3d6eb04"},{"line_number":23,"context_line":"Blueprint: nova-cyborg-interaction"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"9fdfeff1_69759f63","line":20,"range":{"start_line":19,"start_character":0,"end_line":20,"end_character":47},"updated":"2019-02-14 23:34:48.000000000","message":"Eric\u0027s comment in PS6 still applies","commit_id":"ea1d09d2377515e0cd23c12d8fca81c66b6e1693"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5a099016cc961c7134988ccf6b9b36dc3e5eb9fe","unresolved":false,"context_lines":[{"line_number":11,"context_line":"- Standard keystoneauth1 config options for setting up authentication in"},{"line_number":12,"context_line":"the [cyborg] section of nova*.conf."},{"line_number":13,"context_line":"- A new nova.accelerator.cyborg module containing a get_client method to"},{"line_number":14,"context_line":"return a (singleton) client ontaining a keystoneauth1 adapter pointing"},{"line_number":15,"context_line":"to the cyborg service."},{"line_number":16,"context_line":"- Requirements updates to pull in the os-service-types release"},{"line_number":17,"context_line":"containing the \u0027accelerator\u0027 service type."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"7faddb67_b6f84249","line":14,"range":{"start_line":14,"start_character":9,"end_line":14,"end_character":20},"updated":"2019-07-09 22:36:21.000000000","message":"this is no longer true (though IMO it should be)","commit_id":"2b0aee75a846c378b7230662cb165eaf5b63ec4a"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"ba40b00a3b4367bcae13d044035d4b9f51f873bc","unresolved":false,"context_lines":[{"line_number":11,"context_line":"- Standard keystoneauth1 config options for setting up authentication in"},{"line_number":12,"context_line":"the [cyborg] section of nova*.conf."},{"line_number":13,"context_line":"- A new nova.accelerator.cyborg module containing a get_client method to"},{"line_number":14,"context_line":"return a (singleton) client ontaining a keystoneauth1 adapter pointing"},{"line_number":15,"context_line":"to the cyborg service."},{"line_number":16,"context_line":"- Requirements updates to pull in the os-service-types release"},{"line_number":17,"context_line":"containing the \u0027accelerator\u0027 service type."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"7faddb67_2d7a83f0","line":14,"range":{"start_line":14,"start_character":9,"end_line":14,"end_character":20},"in_reply_to":"7faddb67_b6f84249","updated":"2019-07-31 05:20:03.000000000","message":"Done","commit_id":"2b0aee75a846c378b7230662cb165eaf5b63ec4a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5a099016cc961c7134988ccf6b9b36dc3e5eb9fe","unresolved":false,"context_lines":[{"line_number":12,"context_line":"the [cyborg] section of nova*.conf."},{"line_number":13,"context_line":"- A new nova.accelerator.cyborg module containing a get_client method to"},{"line_number":14,"context_line":"return a (singleton) client ontaining a keystoneauth1 adapter pointing"},{"line_number":15,"context_line":"to the cyborg service."},{"line_number":16,"context_line":"- Requirements updates to pull in the os-service-types release"},{"line_number":17,"context_line":"containing the \u0027accelerator\u0027 service type."},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"7faddb67_56954ee3","line":15,"updated":"2019-07-09 22:36:21.000000000","message":"maybe worth mentioning we\u0027re using user auth + service auth.","commit_id":"2b0aee75a846c378b7230662cb165eaf5b63ec4a"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"ba40b00a3b4367bcae13d044035d4b9f51f873bc","unresolved":false,"context_lines":[{"line_number":12,"context_line":"the [cyborg] section of nova*.conf."},{"line_number":13,"context_line":"- A new nova.accelerator.cyborg module containing a get_client method to"},{"line_number":14,"context_line":"return a (singleton) client ontaining a keystoneauth1 adapter pointing"},{"line_number":15,"context_line":"to the cyborg service."},{"line_number":16,"context_line":"- Requirements updates to pull in the os-service-types release"},{"line_number":17,"context_line":"containing the \u0027accelerator\u0027 service type."},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"7faddb67_ed7f8bdc","line":15,"in_reply_to":"7faddb67_56954ee3","updated":"2019-07-31 05:20:03.000000000","message":"Done","commit_id":"2b0aee75a846c378b7230662cb165eaf5b63ec4a"}],"lower-constraints.txt":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cb063d8e4a9d262f36914182c29054ab4aa9c307","unresolved":false,"context_lines":[{"line_number":67,"context_line":"os-brick\u003d\u003d2.6.1"},{"line_number":68,"context_line":"os-client-config\u003d\u003d1.29.0"},{"line_number":69,"context_line":"os-resource-classes\u003d\u003d0.1.0"},{"line_number":70,"context_line":"os-service-types\u003d\u003d1.5.0"},{"line_number":71,"context_line":"os-traits\u003d\u003d0.15.0"},{"line_number":72,"context_line":"os-vif\u003d\u003d1.14.0"},{"line_number":73,"context_line":"os-win\u003d\u003d3.0.0"}],"source_content_type":"text/plain","patch_set":26,"id":"7faddb67_f010b75b","line":70,"updated":"2019-07-31 17:52:19.000000000","message":"This is the cause of your merge conflict now.","commit_id":"6971236c327ed3afa648d38bdcd5301f18d4a330"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"d27ca0d07825775195e69cff0e9234b242ef7eba","unresolved":false,"context_lines":[{"line_number":67,"context_line":"os-brick\u003d\u003d2.6.1"},{"line_number":68,"context_line":"os-client-config\u003d\u003d1.29.0"},{"line_number":69,"context_line":"os-resource-classes\u003d\u003d0.1.0"},{"line_number":70,"context_line":"os-service-types\u003d\u003d1.5.0"},{"line_number":71,"context_line":"os-traits\u003d\u003d0.15.0"},{"line_number":72,"context_line":"os-vif\u003d\u003d1.14.0"},{"line_number":73,"context_line":"os-win\u003d\u003d3.0.0"}],"source_content_type":"text/plain","patch_set":26,"id":"7faddb67_0f4be92a","line":70,"in_reply_to":"7faddb67_f010b75b","updated":"2019-08-01 04:14:28.000000000","message":"Done","commit_id":"6971236c327ed3afa648d38bdcd5301f18d4a330"}],"nova/accelerator/cyborg.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"843802a770d21d833ef7e0b5d1247c081aa97d07","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def get_client():"},{"line_number":23,"context_line":"    global _CYBORG_CLIENT"},{"line_number":24,"context_line":"    with lockutils.lock(\u0027CYBORG_CLIENT_SINGLETON\u0027):"},{"line_number":25,"context_line":"        if _CYBORG_CLIENT is None:"},{"line_number":26,"context_line":"            _CYBORG_CLIENT \u003d _CyborgClient()"},{"line_number":27,"context_line":"    return _CYBORG_CLIENT"}],"source_content_type":"text/x-python","patch_set":16,"id":"9fdfeff1_22aea580","line":24,"updated":"2019-03-01 16:54:52.000000000","message":"why is this a singleton? is there a reason why a lock is needed? why not just have the virt driver (or compute manager) instantiate a cyborg client when it needs one?","commit_id":"0ce35105a28d4779aad428adb13e50aafa431e37"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"27d7998adfaf815a13eb11b7409bf581d116ed23","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def get_client():"},{"line_number":23,"context_line":"    global _CYBORG_CLIENT"},{"line_number":24,"context_line":"    with lockutils.lock(\u0027CYBORG_CLIENT_SINGLETON\u0027):"},{"line_number":25,"context_line":"        if _CYBORG_CLIENT is None:"},{"line_number":26,"context_line":"            _CYBORG_CLIENT \u003d _CyborgClient()"},{"line_number":27,"context_line":"    return _CYBORG_CLIENT"}],"source_content_type":"text/x-python","patch_set":16,"id":"9fdfeff1_72323612","line":24,"in_reply_to":"9fdfeff1_22aea580","updated":"2019-03-01 21:08:28.000000000","message":"Could, though I don\u0027t see why that\u0027s preferred. It would be holding its own adapter/session, which seems unnecessary. And if we ever *do* decide to keep state, we have to track down all the instances and unwind them like we did recently for SchedulerReportClient.","commit_id":"0ce35105a28d4779aad428adb13e50aafa431e37"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"051aebfeaea5043078ac2d3781301452f2e7c9a7","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class _CyborgClient(object):"},{"line_number":22,"context_line":"    def __init__(self):"},{"line_number":23,"context_line":"        self._client \u003d utils.get_ksa_adapter(\u0027accelerator\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_40a252b0","line":22,"updated":"2019-05-22 22:51:20.000000000","message":"Since we\u0027re going to do user auth for nova-to-cyborg calls, and since there\u0027s the potential for some calls (like binding aka programming) to run long, this constructor should\n- take a context\n- use service_auth.get_auth_plugin(context) to get a service-token-wrapped auth\n- pass that auth explicitly into get_ksa_adapter via the ksa_auth kwarg.","commit_id":"a134c6a2f1dfadce4cb1dfbf3e6e9f32d8cabd4e"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"30bb0a562f688caec55d41deeb0db6b3d4147e46","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class _CyborgClient(object):"},{"line_number":22,"context_line":"    def __init__(self):"},{"line_number":23,"context_line":"        self._client \u003d utils.get_ksa_adapter(\u0027accelerator\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7faddb67_960e8de3","line":22,"in_reply_to":"bfb3d3c7_40a252b0","updated":"2019-07-08 03:34:41.000000000","message":"Done","commit_id":"a134c6a2f1dfadce4cb1dfbf3e6e9f32d8cabd4e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cb063d8e4a9d262f36914182c29054ab4aa9c307","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2019 Intel"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":26,"id":"7faddb67_9a040117","line":1,"updated":"2019-07-31 17:52:19.000000000","message":"I think you can remove this unless you have specific legal guidelines for contributing upstream that require this.","commit_id":"6971236c327ed3afa648d38bdcd5301f18d4a330"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"d27ca0d07825775195e69cff0e9234b242ef7eba","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2019 Intel"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":26,"id":"7faddb67_cf5071d8","line":1,"in_reply_to":"7faddb67_9a040117","updated":"2019-08-01 04:14:28.000000000","message":"I have been advised to include the copyright notice.","commit_id":"6971236c327ed3afa648d38bdcd5301f18d4a330"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b5a6209eec0ddbe39a674fdd89829a97bc9a7b87","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def __init__(self, context):"},{"line_number":30,"context_line":"        auth \u003d service_auth.get_auth_plugin(context)"},{"line_number":31,"context_line":"        self._client \u003d utils.get_ksa_adapter(\u0027accelerator\u0027, ksa_auth\u003dauth)"}],"source_content_type":"text/x-python","patch_set":27,"id":"7faddb67_c6705343","line":31,"range":{"start_line":31,"start_character":29,"end_line":31,"end_character":44},"updated":"2019-08-01 14:22:24.000000000","message":"Now that SDK base support is merged, let\u0027s use get_sdk_adapter [1] instead.\n\nSince cyborg is using user auth, this will entail adding a ksa_auth kwarg to get_sdk_adapter that passes through to _get_auth_and_session [2].\n\nOtherwise all the plumbing should be in place to make this seamless.\n\n[1] https://opendev.org/openstack/nova/src/commit/877a78a63b13dc6599aed7c152b26b25501a52e8/nova/utils.py#L1237\n[2] https://opendev.org/openstack/nova/src/commit/877a78a63b13dc6599aed7c152b26b25501a52e8/nova/utils.py#L1176","commit_id":"514414e75a82c1cf9684d6ae134b32e12cc54e11"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"1e45bc8a2cadd68400d0657013771afce34b43b9","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def __init__(self, context):"},{"line_number":30,"context_line":"        auth \u003d service_auth.get_auth_plugin(context)"},{"line_number":31,"context_line":"        self._client \u003d utils.get_ksa_adapter(\u0027accelerator\u0027, ksa_auth\u003dauth)"}],"source_content_type":"text/x-python","patch_set":27,"id":"7faddb67_eb899774","line":31,"range":{"start_line":31,"start_character":29,"end_line":31,"end_character":44},"in_reply_to":"7faddb67_c6705343","updated":"2019-08-01 15:43:48.000000000","message":"Since this is conceptually independent of the purpose of the patch series, can we do this after the series has merged? Trying to ensure this patch set gets merged well before the Train-3 deadline.","commit_id":"514414e75a82c1cf9684d6ae134b32e12cc54e11"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c21451a10ebc481024f6bdfaec2c0717a10b90c1","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def __init__(self, context):"},{"line_number":30,"context_line":"        auth \u003d service_auth.get_auth_plugin(context)"},{"line_number":31,"context_line":"        self._client \u003d utils.get_ksa_adapter(\u0027accelerator\u0027, ksa_auth\u003dauth)"}],"source_content_type":"text/x-python","patch_set":27,"id":"7faddb67_ae3c0de1","line":31,"range":{"start_line":31,"start_character":29,"end_line":31,"end_character":44},"in_reply_to":"7faddb67_eb899774","updated":"2019-08-01 17:05:30.000000000","message":"No, think of it more like a \"rebase\". New things (which this still is) should use sdk.\n\nIt would be like introducing new unit tests using mox. Still works because we haven\u0027t finished getting rid of the other things that used it, but we don\u0027t want to add to the technical debt.\n\nEspecially since this one is sooo easy, there\u0027s no reason to hold it back.","commit_id":"514414e75a82c1cf9684d6ae134b32e12cc54e11"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"4f9d3f867985c7ea73b018495c4ad7e84d0d6eda","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def __init__(self, context):"},{"line_number":30,"context_line":"        auth \u003d service_auth.get_auth_plugin(context)"},{"line_number":31,"context_line":"        self._client \u003d utils.get_ksa_adapter(\u0027accelerator\u0027, ksa_auth\u003dauth)"}],"source_content_type":"text/x-python","patch_set":32,"id":"7faddb67_bd5d3717","line":31,"range":{"start_line":31,"start_character":0,"end_line":31,"end_character":74},"updated":"2019-09-02 08:21:01.000000000","message":"Hello Eric Fried and Sundar Nadathur, I learned the whole process of patch evolution, because get_ksa_adapter has already be used[1], Now, simply replace \" utils.get_ksa_adapter(\u0027accelerator\u0027, ksa_auth\u003dauth)\" with \"utils.get_sdk_adapter(\u0027accelerator\u0027, ksa_auth\u003dauth)\", is it OK? Thanks.\n[1]. https://review.opendev.org/#/c/643664/23","commit_id":"014f54bd47d938083fbf53707591b48417064482"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c63ca366bec1d197d446ab5c736a34ce31df698b","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def __init__(self, context):"},{"line_number":30,"context_line":"        auth \u003d service_auth.get_auth_plugin(context)"},{"line_number":31,"context_line":"        self._client \u003d utils.get_ksa_adapter(\u0027accelerator\u0027, ksa_auth\u003dauth)"}],"source_content_type":"text/x-python","patch_set":32,"id":"7faddb67_f4acfd35","line":31,"range":{"start_line":31,"start_character":0,"end_line":31,"end_character":74},"in_reply_to":"7faddb67_bd5d3717","updated":"2019-09-04 15:50:51.000000000","message":"Yes, we definitely want to do that soon, but will first need to make get_sdk_adapter accept a ksa_auth.\n\nSundar and I played with this a few weeks ago and there were still some wrinkles on the SDK side that needed to be ironed out, so we decided to postpone the effort for later.","commit_id":"014f54bd47d938083fbf53707591b48417064482"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"d596870bfdb0e0503d03a88779713c0ede104187","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":"from oslo_log import log as logging"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from nova import service_auth"},{"line_number":17,"context_line":"from nova import utils"}],"source_content_type":"text/x-python","patch_set":44,"id":"3fa7e38b_2efb6bbf","line":14,"updated":"2019-12-27 20:13:21.000000000","message":"nit: most files have an empty line after the license","commit_id":"15d9689b1fd51a9ef62c4386f76187d743d56272"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"864d77570415cc0a403dad8b8054678fc0d453b0","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":"from oslo_log import log as logging"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from nova import service_auth"},{"line_number":17,"context_line":"from nova import utils"}],"source_content_type":"text/x-python","patch_set":44,"id":"3fa7e38b_8e22a653","line":14,"in_reply_to":"3fa7e38b_2efb6bbf","updated":"2020-01-21 02:47:11.000000000","message":"Done","commit_id":"15d9689b1fd51a9ef62c4386f76187d743d56272"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"bfb8703268d50a7b0fb74b9d23b25129e611577d","unresolved":false,"context_lines":[{"line_number":21,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def get_client(context):"},{"line_number":25,"context_line":"    return _CyborgClient(context)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class _CyborgClient(object):"}],"source_content_type":"text/x-python","patch_set":49,"id":"3fa7e38b_3453e3e0","line":25,"range":{"start_line":24,"start_character":0,"end_line":25,"end_character":33},"updated":"2020-02-05 17:35:03.000000000","message":"Since Jay is no longer here to argue with me, I\u0027m going to insist that the client be made a singleton. get_ksa_adapter() is not free (get_sdk_adapter(), which we should cut over to soon (or even now) is less so), and there\u0027s just no reason to do that setup on every API call.","commit_id":"7ce91e8d4ed290a520e3761d18bd847ff8ab3c49"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"33398ceca2eb969fae411ffc89f279981ccbc248","unresolved":false,"context_lines":[{"line_number":21,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def get_client(context):"},{"line_number":25,"context_line":"    return _CyborgClient(context)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class _CyborgClient(object):"}],"source_content_type":"text/x-python","patch_set":49,"id":"3fa7e38b_bf3a47c2","line":25,"range":{"start_line":24,"start_character":0,"end_line":25,"end_character":33},"in_reply_to":"3fa7e38b_3453e3e0","updated":"2020-02-06 02:26:11.000000000","message":"Hope this patch merges soon, so that we don\u0027t hear ^ s/Jay/Eric/ in a few weeks :). Done.","commit_id":"7ce91e8d4ed290a520e3761d18bd847ff8ab3c49"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"f0da6c83273ba14b175584c6f3d7bd37ffdd2709","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    with lockutils.lock(\u0027CYBORG_CLIENT_SINGLETON\u0027):"},{"line_number":30,"context_line":"        if _CYBORG_CLIENT is None:"},{"line_number":31,"context_line":"            _CYBORG_CLIENT \u003d _CyborgClient(context)"},{"line_number":32,"context_line":"    return _CYBORG_CLIENT"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class _CyborgClient(object):"}],"source_content_type":"text/x-python","patch_set":51,"id":"1fa4df85_6d83e4cd","line":32,"range":{"start_line":32,"start_character":10,"end_line":32,"end_character":25},"updated":"2020-02-27 15:55:10.000000000","message":"so talking to mordred on irc this is the issue.\nwe need to call connect_as(contex) to take the adapter and return a version that uses the current requests cred instead of the cread of the first call that initialised the singleton.\n\nthe reason this appeared to work is that if you are only testing for less the 1 hour (defalt token expirey) or with one tenant then it will work breifly.\n\nim oging to add a follow up patch to verify this now and if it passes we can then squash it into this patch.","commit_id":"807fec301f48b67a59661c51be0918772860ca41"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"7bce78a55caf7a75e7c78a623ad40f9bfad22c1c","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"_CYBORG_CLIENT \u003d None"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def get_client(context):"},{"line_number":28,"context_line":"    global _CYBORG_CLIENT"},{"line_number":29,"context_line":"    with lockutils.lock(\u0027CYBORG_CLIENT_SINGLETON\u0027):"},{"line_number":30,"context_line":"        if _CYBORG_CLIENT is None:"},{"line_number":31,"context_line":"            _CYBORG_CLIENT \u003d _CyborgClient(context)"},{"line_number":32,"context_line":"    return _CYBORG_CLIENT"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class _CyborgClient(object):"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def __init__(self, context):"},{"line_number":38,"context_line":"        auth \u003d service_auth.get_auth_plugin(context)"},{"line_number":39,"context_line":"        self._client \u003d utils.get_ksa_adapter(\u0027accelerator\u0027, ksa_auth\u003dauth)"}],"source_content_type":"text/x-python","patch_set":51,"id":"1fa4df85_f40241b4","line":39,"range":{"start_line":24,"start_character":1,"end_line":39,"end_character":74},"updated":"2020-02-27 13:11:03.000000000","message":"while im not 100% sure i think its highly likely that the fact this is a sigolton is like the reason why we are getting keystone auth error after the service has been running for a period of time.","commit_id":"807fec301f48b67a59661c51be0918772860ca41"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3064be5a8c2e0d0ab9628bdb6a6bb44bb0266c5e","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"_CYBORG_CLIENT \u003d None"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def get_client(context):"},{"line_number":28,"context_line":"    global _CYBORG_CLIENT"},{"line_number":29,"context_line":"    with lockutils.lock(\u0027CYBORG_CLIENT_SINGLETON\u0027):"},{"line_number":30,"context_line":"        if _CYBORG_CLIENT is None:"},{"line_number":31,"context_line":"            _CYBORG_CLIENT \u003d _CyborgClient(context)"},{"line_number":32,"context_line":"    return _CYBORG_CLIENT"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class _CyborgClient(object):"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def __init__(self, context):"},{"line_number":38,"context_line":"        auth \u003d service_auth.get_auth_plugin(context)"},{"line_number":39,"context_line":"        self._client \u003d utils.get_ksa_adapter(\u0027accelerator\u0027, ksa_auth\u003dauth)"}],"source_content_type":"text/x-python","patch_set":51,"id":"1fa4df85_327772a3","line":39,"range":{"start_line":24,"start_character":1,"end_line":39,"end_character":74},"in_reply_to":"1fa4df85_2a95d240","updated":"2020-02-28 20:57:06.000000000","message":"so yes removing the sigleton fixs the auth error\n\nhttps://storage.gra.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_e71/710443/1/check/cyborg-multinode-tempest-full/e715c5e/testr_results.html\n\nhttps://review.opendev.org/#/c/710443/","commit_id":"807fec301f48b67a59661c51be0918772860ca41"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"95b8b68f581aeb11c5958c8bdf155c43b7555056","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"_CYBORG_CLIENT \u003d None"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def get_client(context):"},{"line_number":28,"context_line":"    global _CYBORG_CLIENT"},{"line_number":29,"context_line":"    with lockutils.lock(\u0027CYBORG_CLIENT_SINGLETON\u0027):"},{"line_number":30,"context_line":"        if _CYBORG_CLIENT is None:"},{"line_number":31,"context_line":"            _CYBORG_CLIENT \u003d _CyborgClient(context)"},{"line_number":32,"context_line":"    return _CYBORG_CLIENT"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class _CyborgClient(object):"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def __init__(self, context):"},{"line_number":38,"context_line":"        auth \u003d service_auth.get_auth_plugin(context)"},{"line_number":39,"context_line":"        self._client \u003d utils.get_ksa_adapter(\u0027accelerator\u0027, ksa_auth\u003dauth)"}],"source_content_type":"text/x-python","patch_set":51,"id":"1fa4df85_2a95d240","line":39,"range":{"start_line":24,"start_character":1,"end_line":39,"end_character":74},"in_reply_to":"1fa4df85_aa0542c4","updated":"2020-02-27 15:05:11.000000000","message":"IMHO, this is not worth spending time on right now. I\u0027d much rather we just revert to the non-singleton so we can get the functional parts of this patch working and landed and then we can circle back here. I know that the singleton nature of this is supremely important to some people, but it is not to me.","commit_id":"807fec301f48b67a59661c51be0918772860ca41"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"236100dd33d32a2c7c81c0581f1a9580575cb9f5","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"_CYBORG_CLIENT \u003d None"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def get_client(context):"},{"line_number":28,"context_line":"    global _CYBORG_CLIENT"},{"line_number":29,"context_line":"    with lockutils.lock(\u0027CYBORG_CLIENT_SINGLETON\u0027):"},{"line_number":30,"context_line":"        if _CYBORG_CLIENT is None:"},{"line_number":31,"context_line":"            _CYBORG_CLIENT \u003d _CyborgClient(context)"},{"line_number":32,"context_line":"    return _CYBORG_CLIENT"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class _CyborgClient(object):"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def __init__(self, context):"},{"line_number":38,"context_line":"        auth \u003d service_auth.get_auth_plugin(context)"},{"line_number":39,"context_line":"        self._client \u003d utils.get_ksa_adapter(\u0027accelerator\u0027, ksa_auth\u003dauth)"}],"source_content_type":"text/x-python","patch_set":51,"id":"1fa4df85_aa0542c4","line":39,"range":{"start_line":24,"start_character":1,"end_line":39,"end_character":74},"in_reply_to":"1fa4df85_f40241b4","updated":"2020-02-27 14:59:00.000000000","message":"Discussing this in IRC a bit [1]. TL;DR:\n- We should still singleton, for reasons previously stated.\n- We need to do something to refresh tokens.\n- It\u0027s possible s/ksa/sdk/ will do that for us, so let\u0027s try that first.\n- Some actual cyborg support has landed in SDK [2], and we should cut over to that, but later. For now, keep using the REST primitives.\n\n[1] http://eavesdrop.openstack.org/irclogs/%23openstack-nova/%23openstack-nova.2020-02-27.log.html#t2020-02-27T14:29:41\n[2] https://review.opendev.org/#/c/679914/","commit_id":"807fec301f48b67a59661c51be0918772860ca41"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"df4a333b36afa1445bcb0ccc39fab7e6814613fb","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from nova import utils"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def get_client(context):"}],"source_content_type":"text/x-python","patch_set":53,"id":"1fa4df85_b73d3590","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":33},"updated":"2020-03-06 02:59:07.000000000","message":"This isn\u0027t used by anywhere","commit_id":"4b11f190cd573b3c9c55b470e1785b01855faf8d"}],"nova/conf/cyborg.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"77dcaccba80dd1aaf34de9c71fe83a0ad8ce6c71","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from nova.conf import utils as confutils"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"DEFAULT_SERVICE_TYPE \u003d \u0027accelerator\u0027"},{"line_number":23,"context_line":"CYBORG_GROUP \u003d \u0027cyborg\u0027"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"cyborg_group \u003d cfg.OptGroup("},{"line_number":26,"context_line":"    CYBORG_GROUP,"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_6e7c2cb5","line":23,"range":{"start_line":22,"start_character":0,"end_line":23,"end_character":23},"updated":"2019-01-16 16:00:47.000000000","message":"You\u0027ll want to propose a patch to openstack/service-types-authority for this. See the README [1]. You ought to be able to do this any time, independent of the nova series, and get it merged pretty quickly, since cyborg is a thing of its own.\n\nOnce that patch merges, a bot will propose a corresponding patch to openstack/os-service-types.\n\nOnce that goes through, propose a release of os-service-types via the openstack/releases project.\n\nOnce that\u0027s released, a bot will propose a patch to the openstack/requirements project bumping the global upper constraint.\n\nOnce that merges, you can bump nova\u0027s minimum from within this patch by updating requirements.txt and lower-constraints.txt.\n\nIt\u0027s possible this is (at least part of) why get_ksa_adapter isn\u0027t finding your service without endpoint_override.\n\n[1] https://github.com/openstack/service-types-authority/blob/master/README.rst","commit_id":"4624c4c488a19fe7e2a304d372917b206618482c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"77dcaccba80dd1aaf34de9c71fe83a0ad8ce6c71","unresolved":false,"context_lines":[{"line_number":29,"context_line":"Configuration options for cyborg (Accelerator as a service)."},{"line_number":30,"context_line":"\"\"\")"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"cyborg_opts \u003d ["},{"line_number":33,"context_line":"    cfg.URIOpt(\u0027url\u0027,"},{"line_number":34,"context_line":"        sample_default\u003d\u0027http://127.0.0.1:9696\u0027,"},{"line_number":35,"context_line":"        help\u003d\"\"\""},{"line_number":36,"context_line":"This option specifies the URL for connecting to Cyborg."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Possible values:"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"* Any valid URL that points to the Cyborg API service is appropriate here."},{"line_number":41,"context_line":"  This typically matches the URL returned for the \u0027accelerator\u0027 service type"},{"line_number":42,"context_line":"  from the Keystone service catalog."},{"line_number":43,"context_line":"\"\"\"),"},{"line_number":44,"context_line":"]"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_eee01cfd","line":43,"range":{"start_line":32,"start_character":0,"end_line":43,"end_character":5},"updated":"2019-01-16 16:00:47.000000000","message":"You don\u0027t actually need this. By pulling in the opts from ks_loading, you get endpoint_override for free. So to make this \"work\" like you\u0027ve got it going today, you would switch the \u0027url\u0027 key in your conf to \u0027endpoint_override\u0027 instead.\n\nFiguring out why you need to override the endpoint will be a separate issue. The above (os-service-types mapping) may be part of the problem. Could also have to do with how the service is being set up in the catalog, and/or how the API itself is (not) exposing the version document - those are things that would be solved outside of nova code.","commit_id":"4624c4c488a19fe7e2a304d372917b206618482c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"352c7a601ef853f507aec94d83e2c1807278fa08","unresolved":false,"context_lines":[{"line_number":59,"context_line":"            ALL_OPTS +"},{"line_number":60,"context_line":"            ks_loading.get_session_conf_options() +"},{"line_number":61,"context_line":"            ks_loading.get_auth_common_conf_options() +"},{"line_number":62,"context_line":"            ks_loading.get_auth_plugin_conf_options(\u0027password\u0027) +"},{"line_number":63,"context_line":"            ks_loading.get_auth_plugin_conf_options(\u0027v2password\u0027) +"},{"line_number":64,"context_line":"            ks_loading.get_auth_plugin_conf_options(\u0027v3password\u0027) +"},{"line_number":65,"context_line":"            confutils.get_ksa_adapter_opts(DEFAULT_SERVICE_TYPE))"},{"line_number":66,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_97567629","line":63,"range":{"start_line":62,"start_character":0,"end_line":63,"end_character":67},"updated":"2019-01-30 15:17:50.000000000","message":"No need to support these for new stuff. [Later] Turns out \u0027password\u0027 is a catch-all, so it\u0027s the only one we need.\n\nhttp://eavesdrop.openstack.org/irclogs/%23openstack-keystone/%23openstack-keystone.2019-01-22.log.html#t2019-01-22T19:37:11","commit_id":"4624c4c488a19fe7e2a304d372917b206618482c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"051aebfeaea5043078ac2d3781301452f2e7c9a7","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def register_opts(conf):"},{"line_number":33,"context_line":"    conf.register_group(cyborg_group)"},{"line_number":34,"context_line":"    confutils.register_ksa_opts(conf, cyborg_group, DEFAULT_SERVICE_TYPE)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"def list_opts():"}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_a0ec6ef3","line":34,"updated":"2019-05-22 22:51:20.000000000","message":"Since we\u0027re going to do user auth for nova-to-cyborg ops, add\n\n include_auth\u003dFalse\n\nhere...","commit_id":"a134c6a2f1dfadce4cb1dfbf3e6e9f32d8cabd4e"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"30bb0a562f688caec55d41deeb0db6b3d4147e46","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def register_opts(conf):"},{"line_number":33,"context_line":"    conf.register_group(cyborg_group)"},{"line_number":34,"context_line":"    confutils.register_ksa_opts(conf, cyborg_group, DEFAULT_SERVICE_TYPE)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"def list_opts():"}],"source_content_type":"text/x-python","patch_set":19,"id":"7faddb67_b613890d","line":34,"in_reply_to":"bfb3d3c7_a0ec6ef3","updated":"2019-07-08 03:34:41.000000000","message":"Done","commit_id":"a134c6a2f1dfadce4cb1dfbf3e6e9f32d8cabd4e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"051aebfeaea5043078ac2d3781301452f2e7c9a7","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    return {"},{"line_number":39,"context_line":"        cyborg_group: ("},{"line_number":40,"context_line":"            ks_loading.get_session_conf_options() +"},{"line_number":41,"context_line":"            ks_loading.get_auth_common_conf_options() +"},{"line_number":42,"context_line":"            ks_loading.get_auth_plugin_conf_options(\u0027password\u0027) +"},{"line_number":43,"context_line":"            confutils.get_ksa_adapter_opts(DEFAULT_SERVICE_TYPE))"},{"line_number":44,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_40bd72d6","line":42,"range":{"start_line":41,"start_character":0,"end_line":42,"end_character":65},"updated":"2019-05-22 22:51:20.000000000","message":"...and remove these.","commit_id":"a134c6a2f1dfadce4cb1dfbf3e6e9f32d8cabd4e"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"30bb0a562f688caec55d41deeb0db6b3d4147e46","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    return {"},{"line_number":39,"context_line":"        cyborg_group: ("},{"line_number":40,"context_line":"            ks_loading.get_session_conf_options() +"},{"line_number":41,"context_line":"            ks_loading.get_auth_common_conf_options() +"},{"line_number":42,"context_line":"            ks_loading.get_auth_plugin_conf_options(\u0027password\u0027) +"},{"line_number":43,"context_line":"            confutils.get_ksa_adapter_opts(DEFAULT_SERVICE_TYPE))"},{"line_number":44,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":19,"id":"7faddb67_56f815c3","line":42,"range":{"start_line":41,"start_character":0,"end_line":42,"end_character":65},"in_reply_to":"bfb3d3c7_40bd72d6","updated":"2019-07-08 03:34:41.000000000","message":"Done","commit_id":"a134c6a2f1dfadce4cb1dfbf3e6e9f32d8cabd4e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cb063d8e4a9d262f36914182c29054ab4aa9c307","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2019 OpenStack Foundation"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":26,"id":"7faddb67_7004c718","line":1,"updated":"2019-07-31 17:52:19.000000000","message":"You can remove this I think.","commit_id":"6971236c327ed3afa648d38bdcd5301f18d4a330"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"d27ca0d07825775195e69cff0e9234b242ef7eba","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2019 OpenStack Foundation"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":26,"id":"7faddb67_ef4d2d3b","line":1,"in_reply_to":"7faddb67_7004c718","updated":"2019-08-01 04:14:28.000000000","message":"I have been advised not to remove 3rd party copyright notices.","commit_id":"6971236c327ed3afa648d38bdcd5301f18d4a330"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"bfb8703268d50a7b0fb74b9d23b25129e611577d","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    CYBORG_GROUP,"},{"line_number":26,"context_line":"    title\u003d\u0027Cyborg Options\u0027,"},{"line_number":27,"context_line":"    help\u003d\"\"\""},{"line_number":28,"context_line":"Configuration options for cyborg (Accelerator as a service)."},{"line_number":29,"context_line":"\"\"\")"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":49,"id":"3fa7e38b_b466f3bb","line":28,"range":{"start_line":28,"start_character":34,"end_line":28,"end_character":35},"updated":"2020-02-05 17:35:03.000000000","message":"micronit: this could be lowercase","commit_id":"7ce91e8d4ed290a520e3761d18bd847ff8ab3c49"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"33398ceca2eb969fae411ffc89f279981ccbc248","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    CYBORG_GROUP,"},{"line_number":26,"context_line":"    title\u003d\u0027Cyborg Options\u0027,"},{"line_number":27,"context_line":"    help\u003d\"\"\""},{"line_number":28,"context_line":"Configuration options for cyborg (Accelerator as a service)."},{"line_number":29,"context_line":"\"\"\")"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":49,"id":"3fa7e38b_7f44cf48","line":28,"range":{"start_line":28,"start_character":34,"end_line":28,"end_character":35},"in_reply_to":"3fa7e38b_b466f3bb","updated":"2020-02-06 02:26:11.000000000","message":"Done","commit_id":"7ce91e8d4ed290a520e3761d18bd847ff8ab3c49"}],"nova/tests/unit/accelerator/test_cyborg.py":[{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"d926c1bc873079b1d3be7e10caa2a5943ac8a97e","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        # elsewhere - this is just sanity-checking that we spelled things right"},{"line_number":33,"context_line":"        # in the conf setup."},{"line_number":34,"context_line":"        self.assertEqual(\u0027accelerator\u0027, client._client.service_type)"},{"line_number":35,"context_line":"        self.assertEqual(region, client._client.region)"},{"line_number":36,"context_line":"        self.assertEqual(endpoint, client._client.endpoint_override)"},{"line_number":37,"context_line":"        # Verify singleton behavior"},{"line_number":38,"context_line":"        self.assertIs(client, cyborg.get_client())"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_b0705b74","line":35,"range":{"start_line":35,"start_character":48,"end_line":35,"end_character":54},"updated":"2019-01-23 04:35:14.000000000","message":"should be region_name\nhttps://github.com/openstack/keystoneauth/blob/master/keystoneauth1/adapter.py#L123","commit_id":"fb8ea400ceb79281c3b5fb9386c3a09d4e45c33d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cb063d8e4a9d262f36914182c29054ab4aa9c307","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2019 OpenStack Foundation"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":26,"id":"7faddb67_7a282585","line":1,"updated":"2019-07-31 17:52:19.000000000","message":"same","commit_id":"6971236c327ed3afa648d38bdcd5301f18d4a330"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"d27ca0d07825775195e69cff0e9234b242ef7eba","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2019 OpenStack Foundation"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":26,"id":"7faddb67_4f56c1d0","line":1,"in_reply_to":"7faddb67_7a282585","updated":"2019-08-01 04:14:28.000000000","message":"Same response too.","commit_id":"6971236c327ed3afa648d38bdcd5301f18d4a330"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"631a2c612c0af4b321479e4397393ce282581448","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    def test_get_client(self):"},{"line_number":27,"context_line":"        # Set up some ksa conf options"},{"line_number":28,"context_line":"        region \u003d \u0027MyRegion\u0027"},{"line_number":29,"context_line":"        endpoint \u003d \u0027http://endpoint.com:1234\u0027"},{"line_number":30,"context_line":"        self.flags(group\u003d\u0027cyborg\u0027,"},{"line_number":31,"context_line":"                   region_name\u003dregion,"},{"line_number":32,"context_line":"                   endpoint_override\u003dendpoint)"}],"source_content_type":"text/x-python","patch_set":38,"id":"3fa7e38b_2635bd45","line":29,"range":{"start_line":29,"start_character":20,"end_line":29,"end_character":44},"updated":"2019-11-19 20:21:36.000000000","message":"It may seem like a non-issue, but I strongly recommend using a reserved domain [1] (example.com) in tests and documentation. This avoids confusion and in this case keeps someone\u0027s owned and in-use domain out of the code.\n[1] https://tools.ietf.org/html/rfc2606","commit_id":"c645497388b302720780d5d351dbb9bdd72542d5"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"761160bb9d9169afa69e2c47f23cc297b1d42659","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    def test_get_client(self):"},{"line_number":27,"context_line":"        # Set up some ksa conf options"},{"line_number":28,"context_line":"        region \u003d \u0027MyRegion\u0027"},{"line_number":29,"context_line":"        endpoint \u003d \u0027http://endpoint.com:1234\u0027"},{"line_number":30,"context_line":"        self.flags(group\u003d\u0027cyborg\u0027,"},{"line_number":31,"context_line":"                   region_name\u003dregion,"},{"line_number":32,"context_line":"                   endpoint_override\u003dendpoint)"}],"source_content_type":"text/x-python","patch_set":38,"id":"3fa7e38b_188063f7","line":29,"range":{"start_line":29,"start_character":20,"end_line":29,"end_character":44},"in_reply_to":"3fa7e38b_2635bd45","updated":"2019-12-04 09:11:29.000000000","message":"Done","commit_id":"c645497388b302720780d5d351dbb9bdd72542d5"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"d596870bfdb0e0503d03a88779713c0ede104187","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":"from nova.accelerator import cyborg"},{"line_number":15,"context_line":"from nova import context"},{"line_number":16,"context_line":"from nova import test"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-python","patch_set":44,"id":"3fa7e38b_4ef827c0","line":14,"updated":"2019-12-27 20:13:21.000000000","message":"nit: here too","commit_id":"15d9689b1fd51a9ef62c4386f76187d743d56272"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"864d77570415cc0a403dad8b8054678fc0d453b0","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":"from nova.accelerator import cyborg"},{"line_number":15,"context_line":"from nova import context"},{"line_number":16,"context_line":"from nova import test"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-python","patch_set":44,"id":"3fa7e38b_ae25225d","line":14,"in_reply_to":"3fa7e38b_4ef827c0","updated":"2020-01-21 02:47:11.000000000","message":"Done","commit_id":"15d9689b1fd51a9ef62c4386f76187d743d56272"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"81306663a2f976e26c151720243b8b943a8f5184","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    def setUp(self):"},{"line_number":22,"context_line":"        super(CyborgTestCase, self).setUp()"},{"line_number":23,"context_line":"        self.context \u003d context.get_admin_context()"},{"line_number":24,"context_line":"        cyborg._CYBORG_CLIENT \u003d None"},{"line_number":25,"context_line":"        self.client \u003d cyborg.get_client(self.context)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def test_get_client(self):"}],"source_content_type":"text/x-python","patch_set":52,"id":"1fa4df85_aaad1932","line":24,"range":{"start_line":24,"start_character":8,"end_line":24,"end_character":36},"updated":"2020-03-02 13:01:31.000000000","message":"as below this is incorrect","commit_id":"c1ce4661d310ad1ec1e0212c09f6df677a13cd11"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"c2812c5317b39660d3914c7683b6fad17d7b31a0","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    def setUp(self):"},{"line_number":22,"context_line":"        super(CyborgTestCase, self).setUp()"},{"line_number":23,"context_line":"        self.context \u003d context.get_admin_context()"},{"line_number":24,"context_line":"        cyborg._CYBORG_CLIENT \u003d None"},{"line_number":25,"context_line":"        self.client \u003d cyborg.get_client(self.context)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def test_get_client(self):"}],"source_content_type":"text/x-python","patch_set":52,"id":"1fa4df85_d581164c","line":24,"range":{"start_line":24,"start_character":8,"end_line":24,"end_character":36},"in_reply_to":"1fa4df85_aaad1932","updated":"2020-03-09 04:12:48.000000000","message":"Done","commit_id":"c1ce4661d310ad1ec1e0212c09f6df677a13cd11"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"81306663a2f976e26c151720243b8b943a8f5184","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                   region_name\u003dregion,"},{"line_number":33,"context_line":"                   endpoint_override\u003dendpoint)"},{"line_number":34,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":35,"context_line":"        cyborg._CYBORG_CLIENT \u003d None"},{"line_number":36,"context_line":"        client \u003d cyborg.get_client(ctxt)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        # Dig into the ksa adapter a bit to ensure the conf options got through"}],"source_content_type":"text/x-python","patch_set":52,"id":"1fa4df85_8a893dcb","line":35,"range":{"start_line":35,"start_character":9,"end_line":35,"end_character":36},"updated":"2020-03-02 13:01:31.000000000","message":"this is incorrect.\nwe nolonger have a singleton and even if we did this is not the correct way to force the client to be recreated.\nyou would mock the module property instead. so just delete this line","commit_id":"c1ce4661d310ad1ec1e0212c09f6df677a13cd11"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"c2812c5317b39660d3914c7683b6fad17d7b31a0","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                   region_name\u003dregion,"},{"line_number":33,"context_line":"                   endpoint_override\u003dendpoint)"},{"line_number":34,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":35,"context_line":"        cyborg._CYBORG_CLIENT \u003d None"},{"line_number":36,"context_line":"        client \u003d cyborg.get_client(ctxt)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        # Dig into the ksa adapter a bit to ensure the conf options got through"}],"source_content_type":"text/x-python","patch_set":52,"id":"1fa4df85_759862bf","line":35,"range":{"start_line":35,"start_character":9,"end_line":35,"end_character":36},"in_reply_to":"1fa4df85_8a893dcb","updated":"2020-03-09 04:12:48.000000000","message":"Done","commit_id":"c1ce4661d310ad1ec1e0212c09f6df677a13cd11"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8479536688b77a78f73f731360a38b865957b946","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                   region_name\u003dregion,"},{"line_number":33,"context_line":"                   endpoint_override\u003dendpoint)"},{"line_number":34,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":35,"context_line":"        cyborg._CYBORG_CLIENT \u003d None"},{"line_number":36,"context_line":"        client \u003d cyborg.get_client(ctxt)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        # Dig into the ksa adapter a bit to ensure the conf options got through"}],"source_content_type":"text/x-python","patch_set":52,"id":"1fa4df85_30ad1888","line":35,"range":{"start_line":35,"start_character":9,"end_line":35,"end_character":36},"in_reply_to":"1fa4df85_8a893dcb","updated":"2020-03-02 14:16:35.000000000","message":"by the way this is a failly minor nit but this is just left over from when we did the singelton.\n\nin my test patch i did not remove this as i wanted to assert the tempest tests would pass with the change and i was not running the unit or funcitonal tests.","commit_id":"c1ce4661d310ad1ec1e0212c09f6df677a13cd11"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"97e3f66a11b8c05a5d09a42d1be091307353bdbb","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        # Set up some ksa conf options"},{"line_number":28,"context_line":"        region \u003d \u0027MyRegion\u0027"},{"line_number":29,"context_line":"        endpoint \u003d \u0027http://example.com:1234\u0027"},{"line_number":30,"context_line":"        self.flags(group\u003d\u0027cyborg\u0027,"},{"line_number":31,"context_line":"                   region_name\u003dregion,"},{"line_number":32,"context_line":"                   endpoint_override\u003dendpoint)"},{"line_number":33,"context_line":"        ctxt \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":56,"id":"df33271e_38cf6a80","line":30,"range":{"start_line":30,"start_character":19,"end_line":30,"end_character":34},"updated":"2020-03-23 13:42:25.000000000","message":"micro nit: you could use the module level constant here\nbut this is the same and we wont be changing it form cyborg so its fine.\n\ne.g.\nfrom nova.conf import cyborg as cyborg_conf\nself.flags(group\u003dcyborg_conf.CYBORG_GROUP...)","commit_id":"c071741d565950ba0a6b43f7b66aad0bdbaf1dff"}],"nova/utils.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"77dcaccba80dd1aaf34de9c71fe83a0ad8ce6c71","unresolved":false,"context_lines":[{"line_number":1374,"context_line":"    return None"},{"line_number":1375,"context_line":""},{"line_number":1376,"context_line":""},{"line_number":1377,"context_line":"def get_cyborg_client(ctxt):"},{"line_number":1378,"context_line":"    def _get_cyborg_session():"},{"line_number":1379,"context_line":"        global _SESSION"},{"line_number":1380,"context_line":"        if not _SESSION:"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_217ab587","line":1377,"range":{"start_line":1377,"start_character":4,"end_line":1377,"end_character":21},"updated":"2019-01-16 16:00:47.000000000","message":"I think this should go into whatever module sets up the cyborg client adapter. Which should probably be called nova/accelerator/cyborg.py","commit_id":"4624c4c488a19fe7e2a304d372917b206618482c"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"8b5f2d58463434af4e0a4f72fd211dcb6afef1b0","unresolved":false,"context_lines":[{"line_number":1374,"context_line":"    return None"},{"line_number":1375,"context_line":""},{"line_number":1376,"context_line":""},{"line_number":1377,"context_line":"def get_cyborg_client(ctxt):"},{"line_number":1378,"context_line":"    def _get_cyborg_session():"},{"line_number":1379,"context_line":"        global _SESSION"},{"line_number":1380,"context_line":"        if not _SESSION:"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_c422d7a4","line":1377,"range":{"start_line":1377,"start_character":4,"end_line":1377,"end_character":21},"in_reply_to":"bfdaf3ff_217ab587","updated":"2019-01-16 16:29:57.000000000","message":"It is being used in the scheduler/manager.py, conductor/manager.py and the libvirt driver.py. So, does this not qualify as a utility function across all 3 modules?","commit_id":"4624c4c488a19fe7e2a304d372917b206618482c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cf146e87b60a5401b569a7e5ed4b9246b51906a6","unresolved":false,"context_lines":[{"line_number":1374,"context_line":"    return None"},{"line_number":1375,"context_line":""},{"line_number":1376,"context_line":""},{"line_number":1377,"context_line":"def get_cyborg_client(ctxt):"},{"line_number":1378,"context_line":"    def _get_cyborg_session():"},{"line_number":1379,"context_line":"        global _SESSION"},{"line_number":1380,"context_line":"        if not _SESSION:"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_64e0cb97","line":1377,"range":{"start_line":1377,"start_character":4,"end_line":1377,"end_character":21},"in_reply_to":"bfdaf3ff_c422d7a4","updated":"2019-01-16 16:57:36.000000000","message":"Those guys can and should do:\n\n from nova.accelerator import cyborg\n\n cyborgclient \u003d cyborg.get_client()\n\n...which should do a singleton thing, because we really don\u0027t need more than one connection to the cyborg API.","commit_id":"4624c4c488a19fe7e2a304d372917b206618482c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"77dcaccba80dd1aaf34de9c71fe83a0ad8ce6c71","unresolved":false,"context_lines":[{"line_number":1382,"context_line":"                CONF, nova.conf.cyborg.CYBORG_GROUP)"},{"line_number":1383,"context_line":"        return _SESSION"},{"line_number":1384,"context_line":""},{"line_number":1385,"context_line":"    if ctxt.auth_token:"},{"line_number":1386,"context_line":"        auth_plugin \u003d service_auth.get_auth_plugin(ctxt)"},{"line_number":1387,"context_line":"    else:"},{"line_number":1388,"context_line":"        raise exception.Unauthorized(description\u003d\u0027Cyborg access unauthorized\u0027)"},{"line_number":1389,"context_line":"    session \u003d _get_cyborg_session()"},{"line_number":1390,"context_line":""},{"line_number":1391,"context_line":"    client_args \u003d dict(session\u003dsession,"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_61bbdd0d","line":1388,"range":{"start_line":1385,"start_character":0,"end_line":1388,"end_character":78},"updated":"2019-01-16 16:00:47.000000000","message":"Hm, if you\u0027re requiring the auth from the context, it\u0027s possible you don\u0027t want/need to pull in the ksa auth config opts. But I\u0027m not sure you want to do that. I think we use the context when the operation is being done on behalf of the user - like when we\u0027re accessing glance. In this case I think we want to make the admin set up real credentials to the cyborg service via the conf, and always use those to authenticate to the service.","commit_id":"4624c4c488a19fe7e2a304d372917b206618482c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cf146e87b60a5401b569a7e5ed4b9246b51906a6","unresolved":false,"context_lines":[{"line_number":1382,"context_line":"                CONF, nova.conf.cyborg.CYBORG_GROUP)"},{"line_number":1383,"context_line":"        return _SESSION"},{"line_number":1384,"context_line":""},{"line_number":1385,"context_line":"    if ctxt.auth_token:"},{"line_number":1386,"context_line":"        auth_plugin \u003d service_auth.get_auth_plugin(ctxt)"},{"line_number":1387,"context_line":"    else:"},{"line_number":1388,"context_line":"        raise exception.Unauthorized(description\u003d\u0027Cyborg access unauthorized\u0027)"},{"line_number":1389,"context_line":"    session \u003d _get_cyborg_session()"},{"line_number":1390,"context_line":""},{"line_number":1391,"context_line":"    client_args \u003d dict(session\u003dsession,"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_8477efd4","line":1388,"range":{"start_line":1385,"start_character":0,"end_line":1388,"end_character":78},"in_reply_to":"bfdaf3ff_61bbdd0d","updated":"2019-01-16 16:57:36.000000000","message":"Looking closer, let me amend this (with the caveat that I could still be wrong):\n\nIt\u0027s possible we want to use service_auth, which does some kind of magic to keep a long-standing connection alive. But if service_auth.get_auth_plugin(ctxt) doesn\u0027t return anything, we shouldn\u0027t fail - we should go back to the original auth conf opts.\n\nGah, I really need to refresh my memory on how all of this works so we can get it right.","commit_id":"4624c4c488a19fe7e2a304d372917b206618482c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"77dcaccba80dd1aaf34de9c71fe83a0ad8ce6c71","unresolved":false,"context_lines":[{"line_number":1392,"context_line":"                       auth\u003dauth_plugin,"},{"line_number":1393,"context_line":"                       global_request_id\u003dctxt.global_request_id)"},{"line_number":1394,"context_line":""},{"line_number":1395,"context_line":"    adap \u003d get_ksa_adapter(\u0027cyborg\u0027, ksa_auth\u003dauth_plugin,"},{"line_number":1396,"context_line":"                           ksa_session\u003dsession)"},{"line_number":1397,"context_line":"    svc_name \u003d adap.service_name or \u0027cyborg\u0027"},{"line_number":1398,"context_line":"    client_args \u003d dict(client_args,"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_0185315a","line":1395,"range":{"start_line":1395,"start_character":28,"end_line":1395,"end_character":34},"updated":"2019-01-16 16:00:47.000000000","message":"this should be \u0027accelerator\u0027 (whatever the official service type name ends up being).","commit_id":"4624c4c488a19fe7e2a304d372917b206618482c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"77dcaccba80dd1aaf34de9c71fe83a0ad8ce6c71","unresolved":false,"context_lines":[{"line_number":1394,"context_line":""},{"line_number":1395,"context_line":"    adap \u003d get_ksa_adapter(\u0027cyborg\u0027, ksa_auth\u003dauth_plugin,"},{"line_number":1396,"context_line":"                           ksa_session\u003dsession)"},{"line_number":1397,"context_line":"    svc_name \u003d adap.service_name or \u0027cyborg\u0027"},{"line_number":1398,"context_line":"    client_args \u003d dict(client_args,"},{"line_number":1399,"context_line":"                       service_type \u003d adap.service_type,  # \u0027accelerator\u0027"},{"line_number":1400,"context_line":"                       service_name \u003d svc_name,  # None or \u0027cyborg\u0027"},{"line_number":1401,"context_line":"                       interface \u003d adap.interface,  # \u0027public\u0027"},{"line_number":1402,"context_line":"                       region_name \u003d adap.region_name)"},{"line_number":1403,"context_line":""},{"line_number":1404,"context_line":"    # FIXME Needs investigation why it fails without endpoint_override."},{"line_number":1405,"context_line":"    # ... client.http_client.session has auth\u003dNone without it and the"},{"line_number":1406,"context_line":"    #     Cyborg client does not get the endpoint URL."},{"line_number":1407,"context_line":"    if CONF.cyborg.url:"},{"line_number":1408,"context_line":"        client_args \u003d dict(client_args,"},{"line_number":1409,"context_line":"                           endpoint_override\u003dCONF.cyborg.url)"},{"line_number":1410,"context_line":"    client \u003d cyborg_client_v20.Client(**client_args)"},{"line_number":1411,"context_line":"    return client"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_e1e02dfd","line":1410,"range":{"start_line":1397,"start_character":0,"end_line":1410,"end_character":52},"updated":"2019-01-16 16:00:47.000000000","message":"I haven\u0027t looked at the cyborg client code itself, but generally speaking we\u0027ve been trying to get away from having such a thing at all. We would rather talk to the API directly through the ksa adapter itself.\n\nWhat ends up happening in a pattern like this is that we go through all the trouble of building up the ksa adapter, just to pull certain fields off of it and pass them to the client constructor, which in turn takes those fields and uses them to create *another* ksa adapter internally through which it communicates with the API.\n\nSince the cyborg API and client code is still fluid at this point, we have the opportunity to do this right. Let\u0027s see if we can get 15 minutes with mordred to nail down exactly what \"right\" looks like.\n\nThen this can be the reference for budding services in the future :)","commit_id":"4624c4c488a19fe7e2a304d372917b206618482c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cf146e87b60a5401b569a7e5ed4b9246b51906a6","unresolved":false,"context_lines":[{"line_number":1394,"context_line":""},{"line_number":1395,"context_line":"    adap \u003d get_ksa_adapter(\u0027cyborg\u0027, ksa_auth\u003dauth_plugin,"},{"line_number":1396,"context_line":"                           ksa_session\u003dsession)"},{"line_number":1397,"context_line":"    svc_name \u003d adap.service_name or \u0027cyborg\u0027"},{"line_number":1398,"context_line":"    client_args \u003d dict(client_args,"},{"line_number":1399,"context_line":"                       service_type \u003d adap.service_type,  # \u0027accelerator\u0027"},{"line_number":1400,"context_line":"                       service_name \u003d svc_name,  # None or \u0027cyborg\u0027"},{"line_number":1401,"context_line":"                       interface \u003d adap.interface,  # \u0027public\u0027"},{"line_number":1402,"context_line":"                       region_name \u003d adap.region_name)"},{"line_number":1403,"context_line":""},{"line_number":1404,"context_line":"    # FIXME Needs investigation why it fails without endpoint_override."},{"line_number":1405,"context_line":"    # ... client.http_client.session has auth\u003dNone without it and the"},{"line_number":1406,"context_line":"    #     Cyborg client does not get the endpoint URL."},{"line_number":1407,"context_line":"    if CONF.cyborg.url:"},{"line_number":1408,"context_line":"        client_args \u003d dict(client_args,"},{"line_number":1409,"context_line":"                           endpoint_override\u003dCONF.cyborg.url)"},{"line_number":1410,"context_line":"    client \u003d cyborg_client_v20.Client(**client_args)"},{"line_number":1411,"context_line":"    return client"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_4450275e","line":1410,"range":{"start_line":1397,"start_character":0,"end_line":1410,"end_character":52},"in_reply_to":"bfdaf3ff_6469ab89","updated":"2019-01-16 16:57:36.000000000","message":"\u003e I am open to that. I have tried to follow the \u0027new way\u0027 identified\n \u003e here: https://github.com/openstack/nova/blob/master/nova/network/neutronv2/api.py#L191\n \u003e \n \u003e Are you saying here is a newer way than that?\n\nHeh, yes. The \"newest\" way, as Monty says, is to use openstacksdk. But we don\u0027t yet have that set up in nova. So the \"newer\" way is to not use client libs, but talk directly to the API through the ksa adapter, which gets built up using the imported conf opts like you\u0027re doing elsewhere in this patch.\n\nRather than neutron, use as your model the SchedulerReportClient, which is how nova talks to the placement service. (It should really be called PlacementClient, as Jay has noted [2].)\n\n(NB: be judicious in how closely you follow the SchedulerReportClient - e.g. please ignore the @safe_connect decorator.)\n\n[1] https://review.openstack.org/#/c/628923/\n[2] https://review.openstack.org/#/c/617049/","commit_id":"4624c4c488a19fe7e2a304d372917b206618482c"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"8b5f2d58463434af4e0a4f72fd211dcb6afef1b0","unresolved":false,"context_lines":[{"line_number":1394,"context_line":""},{"line_number":1395,"context_line":"    adap \u003d get_ksa_adapter(\u0027cyborg\u0027, ksa_auth\u003dauth_plugin,"},{"line_number":1396,"context_line":"                           ksa_session\u003dsession)"},{"line_number":1397,"context_line":"    svc_name \u003d adap.service_name or \u0027cyborg\u0027"},{"line_number":1398,"context_line":"    client_args \u003d dict(client_args,"},{"line_number":1399,"context_line":"                       service_type \u003d adap.service_type,  # \u0027accelerator\u0027"},{"line_number":1400,"context_line":"                       service_name \u003d svc_name,  # None or \u0027cyborg\u0027"},{"line_number":1401,"context_line":"                       interface \u003d adap.interface,  # \u0027public\u0027"},{"line_number":1402,"context_line":"                       region_name \u003d adap.region_name)"},{"line_number":1403,"context_line":""},{"line_number":1404,"context_line":"    # FIXME Needs investigation why it fails without endpoint_override."},{"line_number":1405,"context_line":"    # ... client.http_client.session has auth\u003dNone without it and the"},{"line_number":1406,"context_line":"    #     Cyborg client does not get the endpoint URL."},{"line_number":1407,"context_line":"    if CONF.cyborg.url:"},{"line_number":1408,"context_line":"        client_args \u003d dict(client_args,"},{"line_number":1409,"context_line":"                           endpoint_override\u003dCONF.cyborg.url)"},{"line_number":1410,"context_line":"    client \u003d cyborg_client_v20.Client(**client_args)"},{"line_number":1411,"context_line":"    return client"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_6469ab89","line":1410,"range":{"start_line":1397,"start_character":0,"end_line":1410,"end_character":52},"in_reply_to":"bfdaf3ff_e1e02dfd","updated":"2019-01-16 16:29:57.000000000","message":"I am open to that. I have tried to follow the \u0027new way\u0027 identified here: https://github.com/openstack/nova/blob/master/nova/network/neutronv2/api.py#L191 \n\nAre you saying here is a newer way than that?","commit_id":"4624c4c488a19fe7e2a304d372917b206618482c"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"776044a10409336a0f5f50b1ac5043ae95404986","unresolved":false,"context_lines":[{"line_number":1394,"context_line":""},{"line_number":1395,"context_line":"    adap \u003d get_ksa_adapter(\u0027cyborg\u0027, ksa_auth\u003dauth_plugin,"},{"line_number":1396,"context_line":"                           ksa_session\u003dsession)"},{"line_number":1397,"context_line":"    svc_name \u003d adap.service_name or \u0027cyborg\u0027"},{"line_number":1398,"context_line":"    client_args \u003d dict(client_args,"},{"line_number":1399,"context_line":"                       service_type \u003d adap.service_type,  # \u0027accelerator\u0027"},{"line_number":1400,"context_line":"                       service_name \u003d svc_name,  # None or \u0027cyborg\u0027"},{"line_number":1401,"context_line":"                       interface \u003d adap.interface,  # \u0027public\u0027"},{"line_number":1402,"context_line":"                       region_name \u003d adap.region_name)"},{"line_number":1403,"context_line":""},{"line_number":1404,"context_line":"    # FIXME Needs investigation why it fails without endpoint_override."},{"line_number":1405,"context_line":"    # ... client.http_client.session has auth\u003dNone without it and the"},{"line_number":1406,"context_line":"    #     Cyborg client does not get the endpoint URL."},{"line_number":1407,"context_line":"    if CONF.cyborg.url:"},{"line_number":1408,"context_line":"        client_args \u003d dict(client_args,"},{"line_number":1409,"context_line":"                           endpoint_override\u003dCONF.cyborg.url)"},{"line_number":1410,"context_line":"    client \u003d cyborg_client_v20.Client(**client_args)"},{"line_number":1411,"context_line":"    return client"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_844b6f29","line":1410,"range":{"start_line":1397,"start_character":0,"end_line":1410,"end_character":52},"in_reply_to":"bfdaf3ff_e1e02dfd","updated":"2019-01-16 16:26:36.000000000","message":"I concur. I think the pattern of python-*client libraries existing is a historical mistake we should not repeat.\n\nI\u0027d like to see cyborg support added to openstacksdk - and for the python-cyborgclient repo to be retired (I want the same for all python-*client)\n\nI\u0027d REALLY like to simplify some of nova\u0027s code by switching to using the sdk for all of this - but I don\u0027t have time yet to do that. In the meantime, I think just using the ksa Adapter directly is completely the right choice.","commit_id":"4624c4c488a19fe7e2a304d372917b206618482c"}]}
