Keith Berger keith.berger at
Fri Jun 28 13:49:13 UTC 2019


I hope you are doing well. I was trying to understand the logic in this 
code when using datastore_regex. It seems even if  you set that 
parameter and it matches some N datastores, the "free capacity " being 
returned by nova-compute is only from a single/best datastore.

def get_available_datastores(session, cluster=None, datastore_regex=None):
     """Get the datastore list and choose the first local storage."""
     ds = session._call_method(vutil,


         if _is_datastore_valid(propdict, datastore_regex, 
             new_ds = ds_obj.Datastore(
             # favor datastores with more free space
             if (best_match is None or
                 new_ds.freespace > best_match.freespace):
                 best_match = new_ds

     return best_match

The issue we are seeing is a customer has for example 5 x 10 GB data 
stores (DS1,..DS5.)  For whatever reason , DS1 was filled more fully and 
once it hit close to 100% no new instances could launch as the were 
blocked by the Nova DiskFilter. I know we can use the disk_allocation to 
"fool" this but why is not using to total cumulative storage as opposed 
to the one with most free or first one. I am wondering if there is some 
configuration issue. If it is supposed to use best_match, should that 
dynamically change among the matched regex Datastore to the one with 
most free space? Could it be it is somehow skipping the "best_match" and 
always using " first local storage"

I appreciate any suggestions or comments you have.



Keith Berger

Master Software Engineer

(P)+1 470.237.2012
(M)+1 404.664.9610
keith.berger at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cfhhnhjejgdcagmc.png
Type: image/png
Size: 3661 bytes
Desc: not available
URL: <>

More information about the openstack-discuss mailing list