<p dir="ltr"><br>
On Jul 3, 2013 5:22 PM, "Ala Rezmerita" <<a href="mailto:ala.rezmerita@cloudwatt.com">ala.rezmerita@cloudwatt.com</a>> wrote:<br>
><br>
> Hi everyone,<br>
><br>
> I have a question regarding too many token generation in nova when using quantumclient (also related to bug reports <a href="https://bugs.launchpad.net/nova/+bug/1192383">https://bugs.launchpad.net/nova/+bug/1192383</a> + <a href="https://bugs.launchpad.net/nova-project/+bug/1191159">https://bugs.launchpad.net/nova-project/+bug/1191159</a>)<br>

><br>
> For instance during the periodic task  heal_instance_info_cache  (every 60s) nova calls quantum API method  get_instance_nw_info that calls _build_network_info_model (backtrace at the end of the mail).  <br>
><br>
> During the execution of this method,  4 quantum clients intances are created (all of them use the same context object) and for each of them a new token is generated.   <br>
><br>
> Is it possible to change this behavior by updating the context.auth_token property the first time a quantumclient for a given context is created (so that the same token will be reused among the 4 client instances) ?  Is there some security issue that can appear?</p>

<p dir="ltr">We have this issue elsewhere, too many tokens being generated because the clients aren't caching the tokens across client instances.  So why not try to fix that instead, as solving that once and for all will fix many other use cases as well? </p>

<p dir="ltr">I know some attempts have been made at this but clearly they are not working for most people.<br></p>
<p dir="ltr">><br>
> Thanks<br>
><br>
> Ala Rezmerita<br>
> Cloudwatt<br>
><br>
> The backtrace :<br>
><br>
>   /usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py(194)main()<br>
> -> result = function(*args, **kwargs)<br>
>   /opt/stack/nova/nova/openstack/common/loopingcall.py(125)_inner()<br>
> -> idle = self.f(*self.args, **<a href="http://self.kw">self.kw</a>)<br>
>   /opt/stack/nova/nova/service.py(283)periodic_tasks()<br>
> -> return self.manager.periodic_tasks(ctxt, raise_on_error=raise_on_error)<br>
>   /opt/stack/nova/nova/manager.py(100)periodic_tasks()<br>
> -> return self.run_periodic_tasks(context, raise_on_error=raise_on_error)<br>
>   /opt/stack/nova/nova/openstack/common/periodic_task.py(179)run_periodic_tasks()<br>
> -> task(self, context)<br>
>   /opt/stack/nova/nova/compute/manager.py(3654)_heal_instance_info_cache()<br>
> -> self._get_instance_nw_info(context, instance)<br>
>   /opt/stack/nova/nova/compute/manager.py(767)_get_instance_nw_info()<br>
> -> instance, conductor_api=self.conductor_api)<br>
>   /opt/stack/nova/nova/network/quantumv2/api.py(367)get_instance_nw_info()<br>
> -> result = self._get_instance_nw_info(context, instance, networks)<br>
>   /opt/stack/nova/nova/network/quantumv2/api.py(375)_get_instance_nw_info()<br>
> -> nw_info = self._build_network_info_model(context, instance, networks)<br>
>   /opt/stack/nova/nova/network/quantumv2/api.py(840)_build_network_info_model()<br>
> -> client = quantumv2.get_client(context, admin=True)<br>
> > /opt/stack/nova/nova/network/quantumv2/__init__.py(67)get_client()<br>
><br>
> _______________________________________________<br>
> OpenStack-dev mailing list<br>
> <a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
><br>
</p>