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>] [--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-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, wheredriveris the supported transport driver (kafka)user:passare the username and password used for authentication with the messaging brokerhost:portspecifies the hostname or IP address and port number of the messaging brokerqueryare parameters that override those from the broker configuration file:topicspecifies the topic namedriveris 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 in quotes to use the raw IP.
--force- 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_nameis the service name:nova-scheduler,nova-compute, orneutron-openvswitch-agentconfig_filespecifies the service configuration file: nova.conf fornova-schedulerandnova-compute, or ml2_conf.ini forneutron-openvswitch-agentsectionspecifies the section in the service configuration file where the parameter is defined:DEFAULTin nova.conf oragentin ml2_conf.inipropertyis the parameter to be changed:ram_weight_multiplier,ram_allocation_ratio,scheduler_host_subset, andcpu_allocation_ratioin nova.conf;vxlan_udp_portin ml2_conf.inivalueis 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>
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 | +---------+------------------------------------------------------------------+