Bug 1041118 - [RFE][nova]: Aggregate: Host isolation based on image properties
Summary: [RFE][nova]: Aggregate: Host isolation based on image properties
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: Upstream M2
: 5.0 (RHEL 7)
Assignee: Vladan Popovic
QA Contact: Omri Hochman
URL: https://blueprints.launchpad.net/nova...
Whiteboard: upstream_milestone_icehouse-2 upstrea...
Depends On:
Blocks: 1082389
TreeView+ depends on / blocked
 
Reported: 2013-12-12 13:41 UTC by RHOS Integration
Modified: 2019-09-09 15:07 UTC (History)
7 users (show)

Fixed In Version: openstack-nova-2014.1-3.el7ost
Doc Type: Enhancement
Doc Text:
A new scheduler filter, "AggregateImagePropertiesIsolation", has been introduced. The new filter schedules instances to hosts based on matching namespaced image properties with host aggregate properties. Hosts that do not belong to any host aggregate remain valid scheduling targets for instances based on all images. The new Compute service configuration keys "aggregate_image_properties_isolation_namespace" and "aggregate_image_properties_isolation_separator" are used to determine which image properties are examined by the filter.
Clone Of:
: 1082389 (view as bug list)
Environment:
Last Closed: 2014-07-08 15:27:24 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2014:0853 0 normal SHIPPED_LIVE Red Hat Enterprise Linux OpenStack Platform Enhancement - Compute 2014-07-08 19:22:38 UTC

Description RHOS Integration 2013-12-12 13:41:51 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/nova/+spec/aggregate-host-isolation-based-image-properties.

Description:

The implementation of the blueprint “Host isolation based on image properties by the way of aggregate metadata” defines that:

- if a host belongs to an aggregate and if this aggregate defines one or several metadata that match with the image properties then the host is a candidate to boot the instance.

- If a host doesn't belong to any aggregate it can create instances from all images.

The goal for this blueprint is to implement a new scheduler filter "AggegateImagePropertiesIsolate" that isolates an image from his properties to a host by the way of an aggregate.


Example:
ubuntu@sf-devel:~$ nova aggregate-details windows
+----+---------+-------------------+------------+--------------+
| Id | Name    | Availability Zone | Hosts      | Metadata     |
+----+---------+-------------------+------------+--------------+
| 1  | windows | None              | 'sf-devel' | 'os=windows' |
+----+---------+-------------------+------------+--------------+

ubuntu@sf-devel:~$ glance image-show cirros-0.3.1-x86_64-uec
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| Property 'os'    | windows                              |
| checksum         | f8a2eeee2dc65b3d9b6e63678955bd83     |
| container_format | ami                                  |
| created_at       | 2013-11-14T13:24:25                  |
...

The image above will boot on sf-devel.


Specification URL (additional information):

None

Comment 3 Xavier Queralt 2014-04-01 14:08:29 UTC
To use the AggregateImagePropertiesIsolation, the first thing is to add it to the list of 'scheduler_default_filters' in nova.conf and restart the scheduler.

If the properties are going to be namespaced you'll need to set the namespace in 'aggregate_image_properties_isolation_namespace' too.

You'll need a setup with two compute nodes and:

1. Upload two images to glance (for this I've used cirros and fedora).
2. Choose a property and set a different value for each image:
  - glance image-update --property os=cirros cirros
  - glance image-update --property os=fedora fedora

3. Create two aggregates, update their metadata so each one has the same value of one of the images and assign a host to each one:
  - nova aggregate-create fedora
  - nova aggregate-set-metadata fedora os=fedora
  - nova aggregate-add-host fedora <hostname01>

  - nova aggregate-create cirros
  - nova aggregate-set-metadata cirros os=cirros
  - nova aggregate-add-host cirros <hostname02>

4. Boot an instance with each of the images. Notice that they'll be started in the host in the aggregate which has the same value for the property as the image.

5. Check the scheduler log (in debug level) and notice that the filter returns only one host:
  - "Filter AggregateImagePropertiesIsolation returned 1 host"

6. If a host is not in any aggregate or the image doesn't specify the property defined in the aggregate the host shouldn't be ruled out of the host list while scheduling.

Comment 4 Omri Hochman 2014-04-02 12:29:04 UTC
Successfully Tested using the steps from comment #3  
With : RDO Ice-house (openstack-nova-2014.1-0.11.b3.el6.noarch).
http://repos.fedorapeople.org/repos/openstack/openstack-icehouse/epel-6/

Comment 10 errata-xmlrpc 2014-07-08 15:27:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2014-0853.html


Note You need to log in before you can comment on or make changes to this bug.