3.3. 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>]
                                  [--disable-notification-forwarding]
                                  [--endpoint-hostname <hostname>]
                                  [--custom-param <service_name> <config_file>
                                  <section> <property> <value>]
                                  [--nova-scheduler-ram-weight-multiplier <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 using vinfra service compute cluster show.
--enable-k8saas
Enable Kubernetes-as-a-Service services.
--enable-lbaas
Enable Load-Balancing-as-a-Service services.
--enable-metering
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://10.10.10.10:9092?topic=notifications

--disable-notification-forwarding
Disable notification forwarding
--endpoint-hostname <hostname>
Use the given hostname for a public endpoint. Specify an empty value to use the raw IP.
--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, scheduler_host_subset, and cpu_allocation_ratio in nova.conf or 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>
--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>

Example:

# 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                             |
+---------+------------------------------------------------------------------+