Configuring Nova Scheduler to use host aggregates

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.

Getting ready

Ensure that you are root on the deployment host. In most cases, this is the first infrastructure controller node, infra01.

How to do it…

To enable scheduling for host aggregates, the following steps can be used:

  1. On the deployment host, add the following line to the /etc/openstack_deploy/user_variables.yml file:
    nova_scheduler_default_filters: "AggregateInstanceExtraSpecsFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,AggregateCoreFilter,AggregateDiskFilter"
  2. We can then use Ansible to deploy the changes with the following commands:
    cd /opt/openstack-ansible/playbooks
    openstack-ansible os-nova-install.yml
    
  3. Log in to the nova-scheduler container and verify the change:
    lxc-attach --name controller-01_nova_scheduler_container-ed0f657d
    grep Aggregate /etc/nova/nova.conf
    

    Tip

    The containers have unique UUIDs in their names. Look at the name of your containers with the following command:

    lxc-ls -f
    

    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
    

How it works…

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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.222.239