<div dir="ltr">And I see that you've already submitted a patch to this very portion of code! Thanks!</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 8, 2017 at 9:14 AM, David Shrewsbury <span dir="ltr"><<a href="mailto:shrewsbury.dave@gmail.com" target="_blank">shrewsbury.dave@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">This looks more like an os_client_config problem. That key should always be defined as it is set in the defaults. However, now that I look at the default handling code, I see it uses a global variable (in defaults.py), which probably isn't going to play well in a threaded environment. I highly suspect this portion of code needs fixing.<div><br></div><div>-Dave</div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Mon, Aug 7, 2017 at 4:52 PM, Joshua Harlow <span dir="ltr"><<a href="mailto:harlowja@fastmail.com" target="_blank">harlowja@fastmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi there folks,<br>
<br>
I'm doing various scans of our clouds here at godaddy and using shade to do some of the calls.<br>
<br>
Though when I do stuff like the following sometimes it has issues...<br>
<br>
<a href="http://paste.openstack.org/show/617712/" rel="noreferrer" target="_blank">http://paste.openstack.org/sho<wbr>w/617712/</a><br>
<br>
Typically this causes the following error:<br>
<br>
Traceback (most recent call last):<br>
  File "tools/fetch_flavors.py", line 72, in <module><br>
    main()<br>
  File "tools/fetch_flavors.py", line 61, in main<br>
    results.append(fut.result())<br>
  File "/Users/jxharlow/.venv/lib/pyt<wbr>hon2.7/site-packages/concurren<wbr>t/futures/_base.py", line 422, in result<br>
    return self.__get_result()<br>
  File "/Users/jxharlow/.venv/lib/pyt<wbr>hon2.7/site-packages/concurren<wbr>t/futures/thread.py", line 62, in run<br>
    result = self.fn(*self.args, **self.kwargs)<br>
  File "tools/fetch_flavors.py", line 24, in extract_cloud<br>
    client = shade.openstack_cloud(cloud=cl<wbr>oud_name)<br>
  File "/Users/jxharlow/.venv/lib/pyt<wbr>hon2.7/site-packages/shade/__i<wbr>nit__.py", line 106, in openstack_cloud<br>
    return OpenStackCloud(cloud_config=cl<wbr>oud_config, strict=strict)<br>
  File "/Users/jxharlow/.venv/lib/pyt<wbr>hon2.7/site-packages/shade/ope<wbr>nstackcloud.py", line 156, in __init__<br>
    self.image_api_use_tasks = cloud_config.config['image_api<wbr>_use_tasks']<br>
KeyError: 'image_api_use_tasks'<br>
<br>
Though if I add a lock around the following then things go better:<br>
<br>
with SHADE_LOCK:<br>
    client = shade.openstack_cloud(cloud=cl<wbr>oud_name)<br>
<br>
So that makes me wonder, is ummm, this library (or one of its dependencies not thread-safe?); has anyone else seen similar things, perhaps they've already been fixed?<br>
<br>
-Josh<br>
<br>
______________________________<wbr>______________________________<wbr>______________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.op<wbr>enstack.org?subject:unsubscrib<wbr>e</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div class="m_-6652932826252523546gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>David Shrewsbury (Shrews)<br></div></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>David Shrewsbury (Shrews)<br></div></div></div>
</div>