Changing compute cluster parameters

Change compute cluster parameters:

usage: vinfra service compute set [--cpu-model <cpu-model>] [--enable-k8saas]
                                [--enable-lbaas] [--enable-metering]
                                [--notification-forwarding <transport-url>]
                                [--endpoint-hostname <hostname>] [--force]
                                [--pci-passthrough-config <path>]
                                [--custom-param <service_name> <config_file>
                                <section> <property> <value>]
                                [--nova-scheduler-ram-weight-multiplier <value>]
                                [--nova-compute-ram-allocation-ratio <value>]
                                [--neutron-openvswitch-vxlan-port <value>]
                                [--nova-scheduler-host-subset-size <value>]
                                [--nova-compute-cpu-allocation-ratio <value>]
--cpu-model <cpu-model>
Set the default CPU model for virtual machines. View the list of available CPU models by using vinfra service compute show.
Enable Kubernetes-as-a-Service services.
Enable Load-Balancing-as-a-Service services.
Enable metering services.
--notification-forwarding <transport-url>

Enable notification forwarding through the specified transport URL in the format driver://[user:pass@]host:port[,[userN:passN@]hostN:portN]?query, where

  • driver is the supported transport driver (kafka)
  • user:pass are the username and password used for authentication with the messaging broker
  • host:port specifies the hostname or IP address and port number of the messaging broker
  • query are parameters that override those from the broker configuration file:
    • topic specifies the topic name
    • driver is the messaging driver: messaging, messagingv2, routing, log, test, noop

Example: kafka://

Disable notification forwarding
--endpoint-hostname <hostname>
Use the given hostname for a public endpoint. Specify an empty value in quotes to use the raw IP.
Skip checks for minimal hardware requirements.
--pci-passthrough-config <path>

Path to the PCI passthrough configuration file (refer to Configuring the compute cluster for PCI passthrough)

--custom-param <service_name> <config_file> <section> <property> <value>

Set custom parameters for OpenStack configuration files:

  • service_name is the service name: nova-scheduler, nova-compute, or neutron-openvswitch-agent
  • config_file specifies the service configuration file: nova.conf for nova-scheduler and nova-compute, or ml2_conf.ini for neutron-openvswitch-agent
  • section specifies the section in the service configuration file where the parameter is defined: DEFAULT in nova.conf or agent in ml2_conf.ini
  • property is the parameter to be changed: ram_weight_multiplier, ram_allocation_ratio, scheduler_host_subset, and cpu_allocation_ratio in nova.conf; vxlan_udp_port in ml2_conf.ini
  • value is a new parameter value
--nova-scheduler-ram-weight-multiplier <value>
Shortcut for --custom-param nova-scheduler nova.conf DEFAULT ram_weight_multiplier <value>
--nova-compute-ram-allocation-ratio <value>
Shortcut for --custom-param nova-compute nova.conf DEFAULT ram_allocation_ratio <value>
--neutron-openvswitch-vxlan-port <value>
Shortcut for --custom-param neutron-openvswitch-agent ml2_conf.ini agent vxlan_udp_port <value>
--nova-scheduler-host-subset-size <value>
Shortcut for --custom-param nova-scheduler nova.conf DEFAULT scheduler_host_subset_size <value>
--nova-compute-cpu-allocation-ratio <value>
Shortcut for --custom-param nova-scheduler nova.conf DEFAULT cpu_allocation_ratio <value>


# vinfra service compute set --cpu-model Haswell --nova-scheduler-cpu-allocation-ratio 3
| Field   | Value                                |
| task_id | be02e41d-18a5-44ee-8c76-333ebd92bc0d |

This command creates a task to change the default CPU model for VMs to Haswell and the cpu_allocation_ratio parameter in /etc/kolla/nova-scheduler/nova.conf to 3.

Task outcome:

# vinfra task show be02e41d-18a5-44ee-8c76-333ebd92bc0d
| Field   | Value                                                            |
| details |                                                                  |
| name    | backend.presentation.compute.tasks.ReconfigureComputeClusterTask |
| result  |                                                                  |
| state   | success                                                          |
| task_id | be02e41d-18a5-44ee-8c76-333ebd92bc0d                             |