settingsLogin | Registersettings

[openstack-dev] [nova] What is the goal of AggregateImagePropertiesIsolation filter?

0 votes

Hi all,

As of now in the current master AggregateImagePropertiesIsolation filter returns True even if image property is not present in the host aggregate metadata.
Example:
(1) Set below required config options in nova.conf under 'filterscheduler' section:
aggregate
imagepropertiesisolationnamespace is set to 'os'
aggregate
imagepropertiesisolationseparator is set to ''
1) add Host Aggregate with custom metadata "oswindows":
+----+-----------+-------------------+--------------+------------------------+
| Id | Name | Availability Zone | Hosts | Metadata |
+----+-----------+-------------------+--------------+------------------------+
| 1 | win-agg | - | 'controller' | 'os
type=oswindows' |
+----+-----------+-------------------+--------------+------------------------+
2) Add AggregateImagePropertiesIsolation filter to 'scheduler
defaultfilters'
scheduler
defaultfilters = RetryFilter,AggregateImagePropertiesIsolation,AvailabilityZoneFilter,RamFilter,DiskFilter,ComputeFilter,...
Scenario A: Image property is present in the host aggregate metadata
(a) Create image with property os
type=os_windows
(b) Boot VM using image created in point 1.
In this case, 'AggregateImagePropertiesIsolation' will return True and instance will be successfully created in host present in aggregate 'win-aggregate'.
Scenario B: Image property is not present in the host aggregate metadata
(a) Create image with property os=rhel
(b) Boot VM using image created in point 1.

In this case, AggregateImagePropertiesIsolation shouldn't select any host from "win-aggregate" host aggregate group as it doesn't contains 'ostype=osrhel". But as per the current implementation [1], it is checking if image property key "os_type" is present or not. Even if it's not there, it is returning True from this filter, thus allowing to boot instance on the host from "win-aggregate" host aggregate group.

So the question here is, what is the exact goal of AggregateImagePropertiesIsolation' scheduler filter: - Is it one of the following:-
1. Matching all metadata of host aggregate with image properties.
2. Matching image properties with host aggregate metadata.

If we decide that actual goal of 'AggregateImagePropertiesIsolation' filter is as pointed in #1, then a small correction is required to return False if image property is not present from the host aggregate metadata.
Please let me know your opinion about the same.

[1] https://github.com/openstack/nova/blob/master/nova/scheduler/filters/aggregate_image_properties_isolation.py#L53

Thank you,

Abhishek Kekane


Disclaimer: This email and any attachments are sent in strictest confidence
for the sole use of the addressee and may contain legally privileged,
confidential, and proprietary data. If you are not the intended recipient,
please advise the sender by replying promptly to this email and then delete
and destroy this email and any attachments without any further use, copying
or forwarding.__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
asked Oct 5, 2017 in openstack-dev by Kekane,_Abhishek (3,940 points)   5 7

1 Response

0 votes

On 10/05/2017 03:47 AM, Kekane, Abhishek wrote:

So the question here is, what is the exact goal of
AggregateImagePropertiesIsolation' scheduler filter: - Is it one of the following:-

  1. Matching all metadata of host aggregate with image properties.

  2. Matching image properties with host aggregate metadata.

If we decide that actual goal of 'AggregateImagePropertiesIsolation' filter is
as pointed in #1, then a small correction is required to return False if image
property is not present from the host aggregate metadata.

The name of the filter includes "Isolation", so I think the intent was to
accomplish #1. However, as you point out it only fails the filter if both the
aggregate and the image have the same key but different values and so the
isolation is imperfect.

At the same time we have the AggregateInstanceExtraSpecsFilter (which ensures
that any keys in the flavor extra-specs must be present in the aggregate).

Since keys can be specified in either the flavor or the image, it could be
confusing that the behaviour is different between these two filters. At the
same time we don't want to break existing users by modifying the behaviour of
the existing filters. Given this it might make sense to create a new filter
which unifies the checks and behaves the same whether the key is specified in
the image or the flavor, with some way to toggle whether we want strict
isolation or not (so that we can ensure only "special" flavors/images are
allowed to use aggregates with specific limited resources).

Chris


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded Oct 5, 2017 by Chris_Friesen (20,420 points)   3 15 24
...