3.4. Manage Host Aggregates
A single Compute deployment can be partitioned into logical groups for performance or administrative purposes. OpenStack uses the following terms:
- Host aggregates - A host aggregate creates logical units in a OpenStack deployment by grouping together hosts. Aggregates are assigned Compute hosts and associated metadata; a host can be in more than one host aggregate. Only administrators can see or create host aggregates.An aggregate's metadata is commonly used to provide information for use with the Compute scheduler (for example, limiting specific flavors or images to a subset of hosts). Metadata specified in a host aggregate will limit the use of that host to any instance that has the same metadata specified in its flavor.Administrators can use host aggregates to handle load balancing, enforce physical isolation (or redundancy), group servers with common attributes, or separate out classes of hardware. When you create an aggregate, a zone name must be specified, and it is this name which is presented to the end user.
- Availability zones - An availability zone is the end-user view of a host aggregate. An end user cannot view which hosts make up the zone, nor see the zone's metadata; the user can only see the zone's name.End users can be directed to use specific zones which have been configured with certain capabilities or within certain areas.
3.4.1. Enable Host Aggregate Scheduling
By default, host-aggregate metadata is not used to filter instance usage; you must update the Compute scheduler's configuration to enable metadata usage:
- Edit the
/etc/nova/nova.conffile (you must have eitherrootornovauser permissions). - Ensure that the
scheduler_default_filtersparameter contains:- 'AggregateInstanceExtraSpecsFilter' for host aggregate metadata. For example:
scheduler_default_filters=AggregateInstanceExtraSpecsFilter,RetryFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,CoreFilter
- 'AvailabilityZoneFilter' for availability host specification when launching an instance. For example:
scheduler_default_filters=AvailabilityZoneFilter,RetryFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,CoreFilter
- Save the configuration file.
3.4.2. View Availability Zones or Host Aggregates
- As an admin user in the dashboard, select Admin > System > Host Aggregates. All currently defined aggregates are listed in the Host Aggregates section; all zones are in the Availability Zones section.
3.4.3. Add a Host Aggregate
- As an admin user in the dashboard, select Admin > System > Host Aggregates. All currently defined aggregates are listed in the Host Aggregates section.
- Click Create Host Aggregate.
- Add a name for the aggregate in the Name field, and a name by which the end user should see it in the Availability Zone field.
- Click Manage Hosts within Aggregate.
- Select a host for use by clicking its + icon.
- Click .
3.4.4. Update a Host Aggregate
- As an admin user in the dashboard, select Admin > System > Host Aggregates. All currently defined aggregates are listed in the Host Aggregates section.
- To update the instance's:
- Name or availability zone:
- Click the aggregate's Edit Host Aggregate button.
- Update the Name or Availability Zone field, and click .
- Assigned hosts:
- Click the aggregate's arrow icon under Actions.
- Click Manage Hosts.
- Change a host's assignment by clicking its + or - icon.
- When finished, click .
- Metatdata:
- Click the aggregate's arrow icon under Actions.
- Click the Update Metadata button. All current values are listed on the right-hand side under Existing Metadata.
- Under Available Metadata, click on the Other field, and specify the key you want to add. Use predefined keys (see Table 3.3, “Host Aggregate Metadata” ) or add your own (which will only be valid if exactly the same key is set in an instance's flavor).
- Click the button; you can now view the new key under Existing Metadata.Note: Remove a key by clicking its - icon.
- Click .
Table 3.3. Host Aggregate Metadata
Key Description cpu_allocation_ratioSets allocation ratio of virtual CPU to physical CPU. Depends on the AggregateCoreFilterfilter being set for the Compute scheduler.disk_allocation_ratioSets allocation ratio of Virtual disk to physical disk. Depends on the AggregateDiskFilterfilter being set for the Compute scheduler.filter_tenant_idIf specified, the aggregate only hosts this tenant (project). Depends on the AggregateMultiTenancyIsolationfilter being set for the Compute scheduler.ram_allocation_ratioSets allocation ratio of virtual RAM to physical RAM. Depends on the AggregateRamFilterfilter being set for the Compute scheduler.
3.4.5. Delete a Host Aggregate
- As an admin user in the dashboard, select Admin > System > Host Aggregates. All currently defined aggregates are listed in the Host Aggregates section.
- Remove all assigned hosts from the aggregate:
- Click the aggregate's arrow icon under Actions.
- Click Manage Hosts.
- Remove all hosts by clicking their - icon.
- When finished, click .
- Click the aggregate's arrow icon under Actions.
- Click Delete Host Aggregate in this and the next dialog screen.