OpenStack Compute provides the ability to create logical groupings of hypervisors called host aggregates, which allow users and administrators to control what physical compute hosts can run the requested workload. Often times, host aggregates are used to organize hosts with similar attributes, such as SSD, performance, or hosts, that have passed a security audit such as HITRUST or PCI. A host can be assigned to multiple aggregates. That is, a host can be part of the PCI and SSD grouping. To enable host aggregate scheduling in Nova Scheduler, you must first enable host aggregate filtering in nova.conf
. In openstack-ansible
, Ansible manages this file, and we will use it to push the appropriate changes.
Ensure that you are root
on the deployment host. In most cases, this is the first infrastructure controller node, infra01
.
To enable scheduling for host aggregates, the following steps can be used:
/etc/openstack_deploy/user_variables.yml
file:nova_scheduler_default_filters: "AggregateInstanceExtraSpecsFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,AggregateCoreFilter,AggregateDiskFilter"
cd /opt/openstack-ansible/playbooks openstack-ansible os-nova-install.yml
nova-scheduler
container and verify the change:lxc-attach --name controller-01_nova_scheduler_container-ed0f657d grep Aggregate /etc/nova/nova.conf
This will bring back an output like the following if the word Aggregate
was found, which shows that the change was successful:
enabled_filters = AggregateInstanceExtraSpecsFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,AggregateCoreFilter,AggregateDiskFilter
Adding AggregateInstanceExtraSpecsFilter
to enabled_filters
, tells nova-scheduler
to match the instance flavor metadata to that of the host-aggregate metadata. The openstack-ansible
command is then used to propagate this change to the /etc/nova/nova.conf
files within the OpenStack cloud environment.
Once enabled, and when a new instance is requested, the Nova Scheduler examines the metadata of the flavor associated with the request and attempts to match it with the metadata of host aggregates.
3.144.222.239