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, 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 to use the raw IP.
 --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.conffornova-schedulerandnova-compute, orml2_conf.iniforneutron-openvswitch-agentsectionspecifies the section in the service configuration file where the parameter is defined:DEFAULTinnova.conforagentinml2_conf.inipropertyis the parameter to be changed:ram_weight_multiplier,scheduler_host_subset, andcpu_allocation_ratioinnova.conforvxlan_udp_portinml2_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> --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                             |
+---------+------------------------------------------------------------------+
Oct 06, 2020