AggregateInstanceExtraSpecsFilter is used to build custom rules to choose aggregate for a given flavor. It’s a perfect way to select fast nodes for ‘SSD.Large’ and slow nodes for ‘HDD.Small’ flavors. It also can be used to create ‘tenant-specific’ aggregates: you create aggregate with some kind of metadata (let’s say ‘tenant=custom’) and place same meta(data) on the customers private flavor.
But there is some kind of misunderstanding on how exactly this filter selects meta.
Documentation is very obscure and ‘programmer-centric’:
Matches properties defined in extra specs for an instance type against admin-defined properties on a host aggregate. Works with specifications that are scoped with aggregate_instance_extra_specs. Multiple values can be given, as a comma-separated list. For backward compatibility, also works with non-scoped specifications; this action is highly discouraged because it conflicts with ComputeCapabilitiesFilter filter when you enable both filters. For information about how to use this filter, see the Host aggregates and availability zones section.
And one can wonder why some meta (f.e. ‘tenant=custom’) is processed by this filter, and ‘quota:disk_total_iops_sec’ (used by nova to cap IOPS for instance) is not.
Just to clarify: if AggregateInstanceExtraSpecsFilter would filter hosts based on ALL meta in flavors, it would reject (with famous “No Valid Hosts Found” message) flavor with meta “quota:disk_total_iops_sec” if there are no aggregates with such meta. But it skips those.
Digging into source code gives some answers and raises some questions (why? WHY?).
AggregateInstanceExtraSpecsFilter uses two types of meta:
- Meta WITHOUT colon (‘:’). Like in the example above (tenant=custom)
- Meta WITH colon, starting with “aggregate_instance_extra_specs:” f.e. aggregate_instance_extra_specs:tenant=custom
Second case if very obscure, when you realize you need to specify meta in the flavor with prefix and meta in the aggregate without.
Look for the confused people here: https://bugs.launchpad.net/nova/+bug/1391101