<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On 22 January 2015 at 09:30, Don Waterloo <span dir="ltr"><<a href="mailto:don.waterloo@gmail.com" target="_blank">don.waterloo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On 3 December 2014 at 11:58, Don Waterloo <span dir="ltr"><<a href="mailto:don.waterloo@gmail.com" target="_blank">don.waterloo@gmail.com</a>></span> wrote:<br></span><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">I am having a problem that I hope someone can comment on.<div><br></div><div>Periodically, an instance ends up w/ 0 rows in '<span style="font-weight:bold;color:rgb(84,84,84);font-family:arial,sans-serif;line-height:10.4000005722046px">instance_info_caches' </span><span style="color:rgb(84,84,84);font-family:arial,sans-serif;line-height:10.4000005722046px">in the nova database.</span></div></div></blockquote><div><br></div></span><div>If anyone else has a chance, and can try running this sql query against their nova database, it will show if you are seeing the same problem I am:</div><div><br></div><div>select instances.host,instances.hostname,instances.uuid,instances.user_id from instance_info_caches,instances where network_info = '[]' and instances.deleted = 0 and instances.uuid = instance_info_caches.instance_uuid;</div><div><br></div><div>The expectation is this returns 0 rows. I'm finding about 1 instance in 100 ends up with [] for the network_info.</div><div><br></div></div></div></div>
</blockquote></div><br></div><div class="gmail_extra">After some more digging, what is happening in the bad case is a race condition.</div><div class="gmail_extra"><br></div><div class="gmail_extra">In the 'good' case, _allocate_network_async() is called followed by _get_guest_xml()</div><div class="gmail_extra"><br></div><div class="gmail_extra">In the 'bad' case, _allocate_network_async() is called, followed by _get_instance_nw_info().  E.g. it is doing a refresh_cache() on this instance while it is being created (before its finished).</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div></div>