Nova Scheduller - Schedulling filter AggregateImagePropertiesIsolation shows more hosts than expected
Issue
- I need to isolate my windows instances to a group of hosts for license savings.
So I followed the documentation and I'm trying to use the AggregateImagePropertiesIsolation filter.
First I added it to my nova.conf
scheduler_driver_task_period=60
compute_scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler
scheduler_available_filters=nova.scheduler.filters.all_filtersscheduler_default_filters=AggregateImagePropertiesIsolation,RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter
Then I created a new host aggregate, added a host and the metadata os=windows as you can see below.
# nova aggregate-set-metadata 24 os=windows
Metadata has been successfully updated for aggregate 24.
+----+---------+-------------------+----------------------------------------------+--------------+
| Id | Name | Availability Zone | Hosts | Metadata |
+----+---------+-------------------+----------------------------------------------+--------------+
| 24 | windows | - | 'ops-compute-05' | 'os=windows' |
+----+---------+-------------------+----------------------------------------------+--------------+
Then I added the property to the image:
# glance image-update w2k12-r2 --property os=windows
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| Property 'os' | windows |
| checksum | b782b79349f4c7638a36444b54ce993f |
| container_format | bare |
| created_at | 2014-08-29T12:22:19 |
| deleted | False |
| deleted_at | None |
| disk_format | qcow2 |
| id | beb88d13-c0a9-4e88-b549-3ba515a1fe60 |
| is_public | True |
| min_disk | 0 |
| min_ram | 0 |
| name | w2k12-r2 |
| owner | 2c05ab7895b5476d8c390571cdeacafa |
| protected | False |
| size | 17182752768 |
| status | active |
| updated_at | 2014-09-03T23:01:15 |
| virtual_size | None |
+------------------+--------------------------------------+
I performed a lot of tests with different parameters and host aggregates and I enabled the debug log, but as you can see below this filter still not working and it shows more hosts available for scheduling than available in the associated host aggregate.
2014-09-03 20:08:46.568 39868 DEBUG nova.filters [req-d947b4ec-fc17-44d9-8809-6eb929856e98 995cad06191b44fca6271fa72e8f96ed 2c05ab7895b5476d8c390571cdeacafa] Filter AggregateImagePropertiesIsolation returned 6 host(s) get_filtered_objects /usr/lib/python2.7/site-packages/nova/filters.py:88
How can I resolve this and have only the hosts from the tagged aggregate for scheduling while using the images tagged with the same metadata?
Environment
- Red Hat Enterprise Linux Openstack Platform 5
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
