Monday, 2017-08-28

*** dongfeng has joined #openstack-tricircle00:33
*** Yipei has joined #openstack-tricircle00:35
sapdzhiyuan, I think we should use session to get neutron client instead of token.03:26
zhiyuantoken is directly passed to local neutron server so local neutron server can decide whether to serve the request.03:35
zhiyuani remember that when using session, after the token is expired, session will try to apply a new token, is that correct?03:36
sapdbecause use token in nova/neutron client was deprecated,03:59
sapdI'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
sapdthe error log, something like that04:03
sapd2017-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 available04:03
zhiyuanwhen using session, do you need to pass user and password?04:06
zhiyuanfrom 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
sapdneutron service url is correct. I guarantee.04:17
zhiyuanwhen using session, do you need to pass user and password?04:18
zhiyuans/user/username04:19
sapdWe already have the function to get keystone session (https://github.com/openstack/tricircle/blob/master/tricircle/common/resource_handle.py#L68)04:21
zhiyuanthat's for admin user, the username and password are read from configuration. maybe we can rename the function to get_admin_keystone_session04:25
zhiyuanwe also need to handle normal user cases04:26
zhiyuanthe 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#L12004:28
zhiyuanmaybe you can direct raise the ConnectionFailed exception to see what's the exact problem for the token way04:29
sapdSo 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 object04:29
sapdlet me try04:30
sapdMy changes: https://github.com/greatbn/tricircle/commit/5c6b2b728ab309cbbed107132e501a0b45c800ed04:55
sapdI tested with another user in other project.04:55
zhiyuanso wrapping the token in a session works05:05
zhiyuanI 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 CI05:09
zhiyuanbtw, 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 meeting05:16
sapdI the python-novaclient doc from newton version But now I can't find them . zhiyuan06:39
sapdYou 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 version06:40
sapdThe function handle auth_token is gone06:40
sapdzhiyuan. I think this spec https://github.com/openstack/python-novaclient/blob/master/releasenotes/notes/switch-to-sessionclient-aa49d16599fea570.yaml07:05
zhiyuanthanks for the info, sapd.07:10
sapdbtw  what version of python-neutronclient are you using?07:11
zhiyuanit 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 client07:11
zhiyuanAs I said, I issued a "recheck" request to the OpenStack CI, and the test succeeded, https://review.openstack.org/#/c/476059/07:13
zhiyuanso I think the token way can work with neutron master currently07:14
zhiyuanthe version of neutronclient in my env is https://review.openstack.org/#/c/476059/07:14
zhiyuanoh sorry, the version is 6.3.007:15
sapdI don't know how to explain :D08:12
zhiyuansapd, any hints from the ConnectionFailed exception?09:01
zhiyuanthe error message of ConnectionFailed contains the reason for the exception09:01
zhiyuan1109:03
sapdthe error related to client can't authenticate with keystone09:04
zhiyuanis it possible that the token passed to common.cilent expired?09:06
sapdNo. it is not.09:40
zhiyuanoh, 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_url10:04
sapdWhen I meet this error, I do not modify any source code.10:06
zhiyuanjust back from dinner. My idea is that maybe the identity_url and auth_url options are mis-configured10:27
zhiyuanauth_url does not point to the correct keystone url so the original codes have problem.10:30
zhiyuanand identity_url that you use points to the correct keystone url10:31
zhiyuanmy guess10:31
*** Yipei has quit IRC10:48
*** catintheroof has joined #openstack-tricircle12:36
*** catintheroof has quit IRC19:04
*** catintheroof has joined #openstack-tricircle19:17
*** catintheroof has quit IRC21:09

Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!