AggregateImagePropertiesIsolation returns hosts that shouldn't be applicable

asked 2014-05-29 15:58:00 -0500

pgSnake gravatar image

updated 2014-05-30 17:03:58 -0500

smaffulli gravatar image

I'm trying to use the AggregateImagePropertiesIsolation scheduler filter to isolate a specific image to a single host for licensing reasons, however it appears to always return all hosts instead of the one that should be valid. I've added the filter to the config, and restarted the scheduler:

scheduler_default_filters=RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,AggregateImagePropertiesIsolation,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter

I've then added metadata to the image, and created a host aggregate containing the desired compute node and matching property value (all compute nodes are also in at least one other host aggregate):

viper:~ dpage$ glance image-update --property hostagg=nova5.ox.uk cirros-0.3.2-x86_64
+------------------------+-----------------------------------------------------------------+
| Property               | Value                                                           |
+------------------------+-----------------------------------------------------------------+
| Property 'description' | Cirros 0.3.2, 64 bit. Default user: cirros, password: cubswin:) |
| Property 'hostagg'     | nova5.ox.uk                                                     |
| checksum               | 64d7c1cd2b6f60c92c14662941cb7913                                |
| container_format       | bare                                                            |
| created_at             | 2014-05-01T15:10:33                                             |
| deleted                | False                                                           |
| deleted_at             | None                                                            |
| disk_format            | qcow2                                                           |
| id                     | 57c0e26a-6f5c-452b-971f-5da9d089d3b0                            |
| is_public              | True                                                            |
| min_disk               | 0                                                               |
| min_ram                | 0                                                               |
| name                   | cirros-0.3.2-x86_64                                             |
| owner                  | 43add71bb33e4e279322024779632433                                |
| protected              | True                                                            |
| size                   | 13167616                                                        |
| status                 | active                                                          |
| updated_at             | 2014-05-29T19:34:53                                             |
| virtual_size           | None                                                            |
+------------------------+-----------------------------------------------------------------+
viper:~ dpage$ nova aggregate-create nova5.ox.uk ox
+----+-------------+-------------------+-------+------------------------+
| Id | Name        | Availability Zone | Hosts | Metadata               |
+----+-------------+-------------------+-------+------------------------+
| 6  | nova5.ox.uk | ox                |       | 'availability_zone=ox' |
+----+-------------+-------------------+-------+------------------------+
viper:~ dpage$ nova aggregate-set-metadata nova5.ox.uk hostagg=nova5.ox.uk
Metadata has been successfully updated for aggregate 6.
+----+-------------+-------------------+-------+-----------------------------------------------+
| Id | Name        | Availability Zone | Hosts | Metadata                                      |
+----+-------------+-------------------+-------+-----------------------------------------------+
| 6  | nova5.ox.uk | ox                |       | 'availability_zone=ox', 'hostagg=nova5.ox.uk' |
+----+-------------+-------------------+-------+-----------------------------------------------+
viper:~ dpage$ nova aggregate-add-host nova5.ox.uk nova5.ox.uk
Host nova5.ox.uk has been successfully added for aggregate 6 
+----+-------------+-------------------+------------------+-----------------------------------------------+
| Id | Name        | Availability Zone | Hosts          | Metadata                                      |
+----+-------------+-------------------+------------------+-----------------------------------------------+
| 6  | nova5.ox.uk | ox                | 'nova5.ox.uk'  | 'availability_zone=ox', 'hostagg=nova5.ox.uk' |
+----+-------------+-------------------+------------------+-----------------------------------------------+

The scheduler log shows the following however, and the instance is launched (usually) on a compute node other than nova5.ox.uk:

 2014-05-29 20:46:52.469 52903 DEBUG nova.filters [req-da10c09b-8cf4-415a-94ab-0787e9d711d7 dave.page 43add71bb33e4e279322024779632433] Filter AggregateImagePropertiesIsolation returned 5 host(s) get_filtered_objects /usr/lib/python2.6/site-packages/nova/filters.py:88

Can anyone point me in the right direction please?

edit retag flag offensive close merge delete