[openstack-dev] question about the scheduler filters

Jim Fehlig jfehlig at suse.com
Fri Aug 17 14:35:35 UTC 2012


Mark McLoughlin wrote:
> On Thu, 2012-08-16 at 20:22 -0600, Jim Fehlig wrote:
>   
>> While merging the recent ComputeFilter additions with the ArchFilter, I
>> spent too much time agonizing over the name ArchFilter, which I was now
>> making filter on more than just architecture.  ComputeCapabilitiesFilter
>> seems like better name, but this is already taken.
>>
>> Looking at ComputeCapabilitiesFilter again, I realize it is filtering on
>> some of the same properties as the combined ArchFilter [1], but from a
>> different source.  IIUC, ComputeCapabilitiesFilter filters on properties
>> that originate from the instance type/flavor.  The combined ArchFilter
>> filters on properties that originate from the image.  It seems this
>> could be a source of confusion for users, but at the same time seems
>> necessary, particularly for properties such as architecture, preferred
>> hypervisor and virtual machine mode, which I tend to think are
>> properties of an image more so than a flavor.  E.g. I could select my
>> "Xen arm" flavor, but unless I also selected a "Xen arm" image, I could
>> have an instance that doesn't boot.
>>
>> Do folks have any issues with filters using both image and flavor
>> properties?  Being relatively new here, this may very well be intended
>> :).  If so, I'd like to change the name of ArchFilter to better reflect
>> its new additions.  What do you think of ImagePropertiesFilter?  It
>> filters hosts based on compute properties defined on the image.  Or
>> ImageComputePropertiesFilter, to accommodate a future class of
>> filterable image properties?
>>     
>
> Ok, stepping back for a minute. Before your patch, we had:
>
> ComputeFilter
>   simply matches enabled compute hosts
>
> ArchFilter
>   match the architecture from the image properties against the compute 
>   node's permitted_instance_types
>
>   it's using instance_properties['architecture'] which is taken from the
>   image's architecture property in _create_instance() - see how
>   base_options is populated
>   

Yep, understood.  The others are populated from
_inherit_properties_from_image() iiuc.

>   permitted_instance_types is just the list of guest archs
>
> ComputeCapabilitiesFilter
>   matches properties defined in an instance type's extra specs against 
>   compute capabilities
>
> AggregateInstanceExtraSpecsFilter
>   matches properties defined in an instance type's extra specs against
>   admin-defined properties on a host aggregate
>
> And then you added:
>
>   match the arch, hypervisor type and vm type from the image properties 
>   against those supported by the compute node
>
> It looks to me like what you've added is a complete superset of
> ArchFilter - i.e. if you just specify the architecture property on the
> image, the behaviour should be identical.
>   

Yes, correct.

> So, IMHO, it should be fine to move your new matching into
> ImagePropertiesFilter and just delete ArchFilter.
>   

Ok.  Thanks for the feedback!

Regards,
Jim



More information about the OpenStack-dev mailing list