第2章 Configuring the Compute (nova) service
Use environment files to customize the Compute (nova) service. Puppet generates and stores this configuration in the /var/lib/config-data/puppet-generated/<nova_container>/etc/nova/nova.conf
file. Use the following configuration methods to customize the Compute service configuration:
Heat parameters - as detailed in the Compute (nova) Parameters section in the Overcloud Parameters guide. For example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Puppet parameters - as defined in
/etc/puppet/modules/nova/manifests/*
:parameter_defaults: ComputeExtraConfig: nova::compute::force_raw_images: True
parameter_defaults: ComputeExtraConfig: nova::compute::force_raw_images: True
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 注記Only use this method if an equivalent heat parameter does not exist.
Manual hieradata overrides - for customizing parameters when no heat or Puppet parameter exists. For example, the following sets the
disk_allocation_ratio
in the[DEFAULT]
section on the Compute role:parameter_defaults: ComputeExtraConfig: nova::config::nova_config: DEFAULT/disk_allocation_ratio: value: '2.0'
parameter_defaults: ComputeExtraConfig: nova::config::nova_config: DEFAULT/disk_allocation_ratio: value: '2.0'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
If a heat parameter exists, it must be used instead of the Puppet parameter; if a Puppet parameter exists, but not a heat parameter, then the Puppet parameter must be used instead of the manual override method. The manual override method must only be used if there is no equivalent heat or Puppet parameter.
Follow the guidance in Identifying Parameters to Modify to determine if a heat or Puppet parameter is available for customizing a particular configuration.
See Parameters in the Advanced Overcloud Customization guide for further details on configuring overcloud services.
2.1. Configuring memory for overallocation リンクのコピーリンクがクリップボードにコピーされました!
When you use memory overcommit (NovaRAMAllocationRatio
>= 1.0), you need to deploy your overcloud with enough swap space to support the allocation ratio.
If your NovaRAMAllocationRatio
parameter is set to < 1
, follow the RHEL recommendations for swap size. For more information, see Recommended system swap space in the RHEL Managing Storage Devices guide.
Prerequisites
- You have calculated the swap size your node requires. For more information, see 「Calculating swap size」.
Procedure
Copy the
/usr/share/openstack-tripleo-heat-templates/environments/enable-swap.yaml
file to your environment file directory:cp /usr/share/openstack-tripleo-heat-templates/environments/enable-swap.yaml /home/stack/templates/enable-swap.yaml
$ cp /usr/share/openstack-tripleo-heat-templates/environments/enable-swap.yaml /home/stack/templates/enable-swap.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the swap size by adding the following parameters to your
enable-swap.yaml
file:parameter_defaults: swap_size_megabytes: <swap size in MB> swap_path: <full path to location of swap, default: /swap>
parameter_defaults: swap_size_megabytes: <swap size in MB> swap_path: <full path to location of swap, default: /swap>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To apply this configuration, add the
enable_swap.yaml
environment file to the stack with your other environment files and deploy the overcloud:(undercloud) $ openstack overcloud deploy --templates \ -e [your environment files] \ -e /home/stack/templates/enable-swap.yaml \
(undercloud) $ openstack overcloud deploy --templates \ -e [your environment files] \ -e /home/stack/templates/enable-swap.yaml \
Copy to Clipboard Copied! Toggle word wrap Toggle overflow