openstack-ansible/doc/source/install-guide/configure-nova.rst
Major Hayden 0acc728faa Docs: Nova iscsi multipath
Closes-bug: 1533187

Change-Id: Iaedfc3f122ad6609be3e1003255b3a13055210df
2016-02-08 15:57:48 -06:00

3.5 KiB

Home OpenStack-Ansible Installation Guide

Configuring the Compute (Nova) Service (optional)

The compute service (nova) handles the creation of virtual machines within an OpenStack environment. Many of the default options used by OpenStack-Ansible are found within defaults/main.yml within the nova role.

Block device tuning for Ceph (RBD)

When Ceph is enabled and nova_libvirt_images_rbd_pool is defined, two libvirt configurations will be changed by default:

  • hw_disk_discard: unmap
  • disk_cachemodes: network=writeback

Setting hw_disk_discard to unmap in libvirt will enable discard (sometimes called TRIM) support for the underlying block device. This allows for unused blocks to be reclaimed on the underlying disks.

Setting disk_cachemodes to network=writeback allows data to be written into a cache on each change, but those changes are flushed to disk at a regular interval. This can increase write performance on Ceph block devices.

Deployers have the option to customize these settings using two Ansible variables (defaults shown here):

nova_libvirt_hw_disk_discard: 'unmap'
nova_libvirt_disk_cachemodes: 'network=writeback'

Deployers can disable discard by setting nova_libvirt_hw_disk_discard to ignore. The nova_libvirt_disk_cachemodes can be set to an empty string to disable network=writeback.

The Ceph documentation for OpenStack has additional information about these settings.

Config Drive

By default, OpenStack-Ansible will not configure Nova to force config drives to be provisioned with every instance that Nova builds. The metadata service provides configuration information that can be used by cloud-init inside the instance. Config drives are only necessary when an instance doesn't have cloud-init installed or doesn't have support for handling metadata.

A deployer can set an Ansible variable to force config drives to be deployed with every virtual machine:

nova_force_config_drive: True

Certain formats of config drives can prevent instances from migrating properly between hypervisors. If a deployer needs forced config drives and the ability to migrate instances, the config drive format should be set to vfat using the nova_nova_conf_overrides variable:

nova_nova_conf_overrides:
  DEFAULT:
    config_drive_format: vfat
    force_config_drive: True

Libvirtd Connectivity and Authentication ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

By default, OpenStack-Ansible configures the libvirt daemon in the following way:

  • TLS connections are enabled
  • TCP plaintext connections are disabled
  • Authentication over TCP connections uses SASL

Deployers can customize these settings using the Ansible variables shown below:

# Enable libvirtd's TLS listener
nova_libvirtd_listen_tls: 1

# Disable libvirtd's plaintext TCP listener
nova_libvirtd_listen_tcp: 0

# Use SASL for authentication
nova_libvirtd_auth_tcp: sasl

Multipath

Nova supports multipath for iSCSI-based storage. Deployers can enable multipath support in nova through a configuration override:

nova_nova_conf_overrides:
  libvirt:
      iscsi_use_multipath: true