<div dir="ltr"><div><span lang="EN-US">Hi everyone,</span>

<p class=""><span lang="EN-US">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>)
</span></p>

<p class=""><span lang="EN-US">For instance during the periodic task<span style>  </span><em><span style="font-family:"Calibri","sans-serif"">heal_instance_info_cache</span></em><span class=""> <span style> </span>(every 60s) nova calls quantum
API method <span style> </span>get_instance_nw_info that
calls _build_network_info_model (backtrace at the end of the mail).<span style>  </span><br></span></span></p><p class=""><span lang="EN-US"><span class="">During
the execution of this method,  <span style></span>4 quantum
clients intances are created (all of them use the same context object) and for each
of them a new token is generated.<span style>   </span><span style></span><span style> <br></span></span></span></p>

<p class=""><span class=""><span lang="EN-US">Is it possible to</span></span><span class=""><span lang="EN-US"><span id="result_box" class="" lang="en"><span class=""> change this behavior</span></span> 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) ? <span style> </span>Is there some security issue that can appear?</span></span></p>

<p class=""><span class=""><span lang="EN-US">Thanks</span></span></p>Ala Rezmerita<br></div>Cloudwatt<br><div><br>

<p class=""><span class=""><span lang="EN-US">The backtrace :</span></span></p>

<span class=""><span style="font-size:11pt;line-height:115%;font-family:"Calibri","sans-serif"" lang="EN-US">  /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()</span></span><br></div></div>