Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

OpenStack Nova Scheduler Service

 

The OpenStack nova-scheduler service supports plug-ins to filter which hosts are eligible candidates on which to schedule a virtual machine. The AppFormixFilter queries the Contrail Insights Platform to determine if a host is compliant with the Host Scheduling service-level agreement (SLA). If a host is not compliant with the SLA policy, then the host is filtered from the list of eligible hosts.

If the AppFormixFilter fails to request SLA status of a host, then the host remains in the eligible pool.

Installation

To use AppFormixFilter in OpenStack Nova Scheduler, you must first install the appformix_openstack package and then modify the configuration in /etc/nova/nova.conf.

Install appformix_openstack Package

First, on the OpenStack controller host that executes the nova-scheduler service, install the AppFormix Python package that contains OpenStack filter scheduler plug-ins:

By default, this command installs the resources in:

To install in a different directory, run the following:

Note

The directory specified must be part of the PYTHONPATH environment variable in order for the nova-scheduler to be able to find the plug-in.

If the OpenStack services are running in containers, the resources should be installed in a directory that is accessible to the Nova containers.

Modify the Nova Configuration File

Then modify the /etc/nova/nova.conf file. If the OpenStack services are running in containers, make sure the changes are made in the nova.conf files in all the Nova containers. Following are instructions for different OpenStack releases.

For OpenStack Releases Juno to Newton

Add the following lines in the [DEFAULT] section of /etc/nova/nova.conf:

For OpenStack Ocata and Later Releases

  1. Add the following lines in the [DEFAULT] section of /etc/nova/nova.conf:
  2. Add the following lines under the [scheduler] section:
  3. Add the following lines under the [filter_scheduler] section:

Restart the OpenStack Nova Scheduler Services

Run the following command to restart the Nova Scheduler services:

If the OpenStack services are running in containers, restart all of the Nova containers.

Using the Contrail Insights Nova Scheduler Plug-In

The Contrail Insights nova-scheduler plug-in uses a Scheduling SLA to filter hosts. This SLA is comprised of user-defined Contrail Insights Alarms. Contrail Insights ships with a default Scheduling SLA that includes alarms for missed heartbeat, high CPU load, and high memory usage.

To change the alarms in the Scheduling SLA, do the following:

  1. Select Settings from the list in the top right of the Dashboard, then select SLA Settings > Scheduling.
    Figure 1: Settings in Dashboard
    Settings in Dashboard
  2. Click Delete Profile to delete the existing profile.
    Figure 2: Delete Scheduling Profile
    Delete Scheduling Profile
  3. Click Add New Rule and define a new alarm.
    Figure 3: Add New Rule in Scheduling Profile
    Add New Rule in Scheduling Profile
  4. Select the newly created alarm from the list of available alarms and click Create Profile. You can add several alarms with custom weights to the SLA profile.
    Figure 4: Create Profile in Scheduling SLA
    Create Profile in Scheduling SLA
  5. To see the plug-in in action, generate some load on one of the nova-compute hosts so that the Scheduling SLA is violated. Check the status of the SLA from the Alarms page.
    Figure 5: Violated Scheduling SLA in Alarms page
    Violated Scheduling SLA in Alarms page

    Then create some new virtual machines and check which host they get scheduled on. The host that is violating the SLA will not have any new virtual machines scheduled on it. This will be enforced until the host starts complying with the SLA.

Troubleshooting

For debugging, enable the verbose and debug options in nova.conf by adding them to the [DEFAULT] section in /etc/nova/nova.conf.

Then restart the nova-scheduler service or all Nova containers. Detailed logs will appear in /var/log/nova/nova.log.

Related Documentation