[openstack-dev] Combination of ComputeCapabilitiesFilter and AggregateInstanceExtraSpecsFilter

Russell Bryant rbryant at redhat.com
Fri Jul 5 18:04:24 UTC 2013

On 07/05/2013 12:42 PM, Jérôme Gallard wrote:
> Hi all,
> I'm trying to combine ComputeCapabilitiesFilter and
> AggregateInstanceExtraSpecsFilter. However I probably missed
> something, because it does not work :-)
> Both filters are activated with the following order:
> ComputeCapabilitiesFilter, AggregateInstanceExtraSpecsFilter.
> I created a flavor with the following extra_spec:
> * capabilities:hypervisor_hostname=node1
> * class=good
> I created an aggregate containing node1 with an extra_spec:
> * class=good
> When I start a new instance with the previously created flavor, the
> ComputeCapabilitiesFilter can't find an available node. I put some
> debug inside the filter. From my understanding, it seems that,
> ComputeCapabilitiesFilter manage to find the first spec
> "capabilities:hypervisor_hostname=node1" into the list of metadata
> provided by the host node1 : the first iteration of the loop is OK.
> Then this filter continues with the "class=good" spec and, of course,
> it fails and the filter returns that there is no available host.
> Do you have an idea about what I'm missing? How to tell to
> ComputeCapabilitiesFilter that the "class" key is not for it?
> I read the detailed documentation about filter_scheduler (
> http://docs.openstack.org/developer/nova/devref/filter_scheduler.html
> ). But I didn't manage to solve the issue.

The AggregateInstanceExtraSpecs filter needs to have support added for
scoped extra specs.  That way you can specify something like
'aggregate_capabilities:class=good', and the other filter will ignore it.

I'll fix it up.  It should be pretty easy.


Russell Bryant

More information about the OpenStack-dev mailing list