*** dongfeng has joined #openstack-tricircle | 00:33 | |
*** Yipei has joined #openstack-tricircle | 00:35 | |
sapd | zhiyuan, I think we should use session to get neutron client instead of token. | 03:26 |
---|---|---|
zhiyuan | token is directly passed to local neutron server so local neutron server can decide whether to serve the request. | 03:35 |
zhiyuan | i remember that when using session, after the token is expired, session will try to apply a new token, is that correct? | 03:36 |
sapd | because use token in nova/neutron client was deprecated, | 03:59 |
sapd | I'm use source code from master branch, But I can't get neutron-port . After change this function (https://github.com/openstack/tricircle/blob/master/tricircle/common/resource_handle.py#L107) to use keystone session I could get it. | 04:01 |
sapd | the error log, something like that | 04:03 |
sapd | 2017-08-28 00:01:27.221 50 ERROR neutron.pecan_wsgi.hooks.translation [req-94008db8-e28d-434b-a5c8-fb2e5ae4d092 e145fc37e6e7474c989288cd811b417b 808a0be8438e46269e850f2e9c5dea8a - - -] DELETE failed.: EndpointNotAvailable: Endpoint http://192.168.100.34:9696 for neutron is not available | 04:03 |
zhiyuan | when using session, do you need to pass user and password? | 04:06 |
zhiyuan | from the error log, seem like the service url is not correct: "Endpoint http://192.168.100.34:9696 for neutron is not available" | 04:08 |
sapd | neutron service url is correct. I guarantee. | 04:17 |
zhiyuan | when using session, do you need to pass user and password? | 04:18 |
zhiyuan | s/user/username | 04:19 |
sapd | We already have the function to get keystone session (https://github.com/openstack/tricircle/blob/master/tricircle/common/resource_handle.py#L68) | 04:21 |
zhiyuan | that's for admin user, the username and password are read from configuration. maybe we can rename the function to get_admin_keystone_session | 04:25 |
zhiyuan | we also need to handle normal user cases | 04:26 |
zhiyuan | the EndpointNotAvailable exception is raised when ConnectionFailed exception is raised by the neutron client. https://github.com/openstack/tricircle/blob/master/tricircle/common/resource_handle.py#L120 | 04:28 |
zhiyuan | maybe you can direct raise the ConnectionFailed exception to see what's the exact problem for the token way | 04:29 |
sapd | So if use token was deprecated in the future, We need migrate from token to session. I think we need a function get_session_from_token, and use this session for all client object | 04:29 |
sapd | let me try | 04:30 |
sapd | My changes: https://github.com/greatbn/tricircle/commit/5c6b2b728ab309cbbed107132e501a0b45c800ed | 04:55 |
sapd | I tested with another user in other project. | 04:55 |
zhiyuan | so wrapping the token in a session works | 05:05 |
zhiyuan | I just issue a "recheck" request on one of my open patch set to see if the token way problem can be reproduced on the OpenStack CI | 05:09 |
zhiyuan | btw, could you share the link about the deprecation of using token in nova/neutron client? I would like to add a topic in the coming weekly meeting | 05:16 |
sapd | I the python-novaclient doc from newton version But now I can't find them . zhiyuan | 06:39 |
sapd | You can see in repository: This is newton version https://github.com/openstack/python-novaclient/blob/stable/newton/novaclient/client.py#L540 and https://github.com/openstack/python-novaclient/blob/stable/pike/novaclient/client.py pike version | 06:40 |
sapd | The function handle auth_token is gone | 06:40 |
sapd | zhiyuan. I think this spec https://github.com/openstack/python-novaclient/blob/master/releasenotes/notes/switch-to-sessionclient-aa49d16599fea570.yaml | 07:05 |
zhiyuan | thanks for the info, sapd. | 07:10 |
sapd | btw what version of python-neutronclient are you using? | 07:11 |
zhiyuan | it seems that neutron-client hasn't started similar deprecation, in https://github.com/openstack/python-neutronclient/blob/master/neutronclient/client.py#L417, if the session is not provided, it still constructs a http client | 07:11 |
zhiyuan | As I said, I issued a "recheck" request to the OpenStack CI, and the test succeeded, https://review.openstack.org/#/c/476059/ | 07:13 |
zhiyuan | so I think the token way can work with neutron master currently | 07:14 |
zhiyuan | the version of neutronclient in my env is https://review.openstack.org/#/c/476059/ | 07:14 |
zhiyuan | oh sorry, the version is 6.3.0 | 07:15 |
sapd | I don't know how to explain :D | 08:12 |
zhiyuan | sapd, any hints from the ConnectionFailed exception? | 09:01 |
zhiyuan | the error message of ConnectionFailed contains the reason for the exception | 09:01 |
zhiyuan | 11 | 09:03 |
sapd | the error related to client can't authenticate with keystone | 09:04 |
zhiyuan | is it possible that the token passed to common.cilent expired? | 09:06 |
sapd | No. it is not. | 09:40 |
zhiyuan | oh, maybe it's because of the keystone url. in your modification, you use auth_url=cfg.CONF.client.identity_url, while in the token way, auth_url is used, self.auth_url = cfg.CONF.client.auth_url | 10:04 |
sapd | When I meet this error, I do not modify any source code. | 10:06 |
zhiyuan | just back from dinner. My idea is that maybe the identity_url and auth_url options are mis-configured | 10:27 |
zhiyuan | auth_url does not point to the correct keystone url so the original codes have problem. | 10:30 |
zhiyuan | and identity_url that you use points to the correct keystone url | 10:31 |
zhiyuan | my guess | 10:31 |
*** Yipei has quit IRC | 10:48 | |
*** catintheroof has joined #openstack-tricircle | 12:36 | |
*** catintheroof has quit IRC | 19:04 | |
*** catintheroof has joined #openstack-tricircle | 19:17 | |
*** catintheroof has quit IRC | 21:09 |
Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!