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

Kekane, Abhishek Abhishek.Kekane at nttdata.com
Thu Oct 5 09:47:25 UTC 2017


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 'filter_scheduler' section:
aggregate_image_properties_isolation_namespace is set to 'os'
aggregate_image_properties_isolation_separator is set to '_'
1) add Host Aggregate with custom metadata "os_windows":
+----+-----------+-------------------+--------------+------------------------+
| Id | Name      | Availability Zone | Hosts        | Metadata               |
+----+-----------+-------------------+--------------+------------------------+
| 1  | win-agg   | -                 | 'controller'    | 'os_type=os_windows'   |
+----+-----------+-------------------+--------------+------------------------+
2) Add AggregateImagePropertiesIsolation filter to 'scheduler_default_filters'
scheduler_default_filters = 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 'os_type=os_rhel". 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20171005/59d8aae5/attachment.html>


More information about the OpenStack-dev mailing list