Comment 1 for bug 1842061

Revision history for this message
sean mooney (sean-k-mooney) wrote :

no the flavor does not have to have scoped and unsocped forms of hide_hypervisor_id

the flavor just needt to have hide_hypervisor_id

and an aggreate needs to be create with hide_hypervisor_id=true or false in the metadata
to match the flavor value.

the AggregateInstanceExtraSpecsFilter checks that all extra_specs that are unscoped or
are scoped with aggregate_instance_extra_specs in the flavor are present in at least 1 aggregate that
the host is a member of.

if the host is a member of 2 aggreates
one of which has hide_hypervisor_id=true and the second of which has hide_hypervisor_id=false

then flavor with both hide_hypervisor_id=true or hide_hypervisor_id=false will be valid for this host. the filter does not support logical operators so if you want to or values together then you must use multipel aggreates.

this out of tree filter which is not relly maintained is geenerally more useful
https://github.com/openstack/nfv-filters/blob/master/nfv_filters/nova/scheduler/filters/aggregate_instance_type_filter.py
https://github.com/openstack/nfv-filters/blob/master/doc/source/scheduler_filters/aggregate-instance-type-filter.rst

but the real solution goign forward is likely to use CUSTOM_TRAITS and placmeent instead.

the usecasue of this filter was to do partioning of you cloud but the intree filter is really easy to misconfigure.

for example if you add hide_hypervisor_id=true to an aggrate but the flavor does not request it
then the filter will still pass the host which is not what people expect.

the the canonical example of where this goes wrong is people creating an NFV aggregate with and seeing NFV=true in there aggreate and in ther NFV flavours and then being confused by why there standard flavours that dont have NFV set in the flavor land in there NFV aggreate.

the out of tree filter invert the relationship by instead requireing that all extra_spec in the aggreate metadta must be in the flavor instead. which is whay you normally want as it will only allw the NFV flavor to go to the NFV aggrate without having to add NFV=false to all your standard flavors which is required whne using the in tree AggregateInstanceExtraSpecsFilter