Ask Your Question
2

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

Comments

Is aggregate_image_properties_isolation_namespace set in your environment (not suggesting it needs to be but if it is then it impacts how the image property needs to be specified)? This would be in the Nova config.

sgordon ( 2015-05-09 15:46:04 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-05-08 07:09:43 -0500

I think your issue is related to this statement (config guide link):

If a host does not belong to any aggregate, it can boot instances from all images.

Try putting all other host in another aggregate or use an alternative filtering method.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Get to know Ask OpenStack

Resources for moderators

Question Tools

Follow
1 follower

Stats

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

Seen: 633 times

Last updated: May 08