When you launch an instance with OpenStack, the job of the nova-schedulers is to determine which Compute Host (hypervisor) the instance will be created on. The scheduler can be configured to make some basic decisions, such as whether or not RAM exists or not to run the instance and whether enough cores are available. It can also be configured to be more complex and make decisions based on environmental factors and metadata, so that instances can be grouped together on hosts or spread across different hosts to ensure a level of stability in the event of a compute host failure.
Ensure that you are logged in to the OpenStack controller
node. If you used Vagrant to create this, we can access this with the following command:
vagrant ssh controller
Let’s modify the /etc/nova/nova.conf
file to enable all the scheduler filters discussed:
/etc/nova/nova.conf
file on the Controller:scheduler_driver=nova.scheduler.multi.MultiScheduler scheduler_driver_task_period = 60 scheduler_driver = nova.scheduler.filter_scheduler.FilterScheduler scheduler_available_filters = nova.scheduler.filters.all_filters scheduler_default_filters = RetryFilter, AvailabilityZoneFilter, RamFilter, ComputeFilter, ComputeCapabilitiesFilter, ImagePropertiesFilter, ServerGroupAntiAffinityFilter ServerGroupAffinityFilter
nova-scheduler
service to pick up the change:sudo service nova-scheduler restart
You can modify the nova.conf
file to expose additional features of the nova-scheduler to be used in our environment. In this example, the default scheduler enabled with OpenStack Juno will consider scheduling an instance to a host, if the host meets all of the following criteria:
RetryFilter
: This will retry each host (in the first instance, implies the host hasn’t been requested before)AvailabilityZoneFilter
: This specifies that the host is in the request availability zone (the default is nova)RamFilter
: This specifies that the Compute host has enough RAM availableComputeFilter
: This specifies that the Compute host is available to service the requestComputeCapabilitiesFilter
: This specifies that the Compute host satisfies any extra specs associated with the instance type requestedImagePropertiesFilter
: This specifies that the image (and associated properties) requested can run on the particular hostServerGroupAntiAffinityFilter
: If requested, whether the instance should run on a different host to another instance in the same groupServerGroupAffinityFilter
: If requested, whether the instance should run on hosts belonging to the same instance groupThere are a number of schedulers available for a wide variety of scenarios. For more information, visit http://docs.openstack.org/juno/config-reference/content/section_compute-scheduler.html.
13.58.185.199