OpenStack Nova Availability Zones and Host Aggregates

Host aggregate is a way to group hosts. A host aggregate is created by assigning key-value pairs to group of machines. Note that only cloud administrators can configure and manage host aggregates. A host can belong to more than one aggregate.

If a host aggregate need to be exposed to cloud users, then OpenStack provides a mechanism called availability zone. In other words, availability zone is a mechanism to expose a host aggregate to end user.

More details available here – http://docs.openstack.org/trunk/config-reference/content/host-aggregates.html

Following example shows the creation of a host aggregate and availability zone for a PowerKVM compute node. The process is the same for Intel/KVM compute node as well.

I have two PowerKVM compute nodes – icmhost1.ibm.com and icmhost2.ibm.com, and will create a host-aggregate and availability zone for icmhost2.

1. Create host aggregate and expose it as an availability zone

nova aggregate-create aggregate-name availability-zone-name

# nova aggregate-create icmhost2 icmhost2
+----+-----------+-------------------+-------+-----------------------------------+
| Id | Name      | Availability Zone | Hosts | Metadata                          |
+----+-----------+-------------------+-------+-----------------------------------+
| 1  | icmhost2  | icmhost2          |       | 'availability_zone=icmhost2'      |
+----+-----------+-------------------+-------+-----------------------------------+

2. Add compute node to the host-aggregate

nova aggregate-add-host aggregate-zone host

# nova aggregate-add-host 1 icmhost2.ibm.com
Host icmhost2.ibm.com has been successfully added for aggregate 1
+----+-----------+---------------------+------------------------+-----------------------------------+
| Id | Name      | Availability Zone   | Hosts                  | Metadata                          |
+----+-----------+---------------------+------------------------+-----------------------------------+
| 1  | icmhost2  | icmhost2            | 'icmhost2.ibm.com'     | 'availability_zone=icmhost2'      |
+----+-----------+---------------------+------------------------+-----------------------------------+

3. Check the availability zone

# nova-manage service list
Binary           Host             Zone     Status      State Updated_At
nova-conductor   icmnode1.ibm.com internal enabled :-) 2014-11-16 06:16:28
nova-scheduler   icmnode1.ibm.com internal enabled :-) 2014-11-16 06:16:29
nova-consoleauth icmnode1.ibm.com internal enabled :-) 2014-11-16 06:16:21
nova-compute     icmhost1.ibm.com nova     enabled :-) 2014-11-16 06:16:25
nova-compute     icmhost2.ibm.com icmhost2 enabled :-) 2014-11-16 06:16:21

Pradipta Kumar Banerjee

I'm a Cloud and Linux/ OpenSource enthusiast, with 16 years of industry experience at IBM. You can find more details about me here - Linkedin

You may also like...