Change oversubscription settings for existing compute nodes¶
Available since MOSK 23.1
MOSK enables you to control the oversubscription of compute node resources through the placement service API.
To manage the oversubscription through the placement API:
Obtain the host name of the hypervisor in question:
openstack hypervisor list -f yaml
Example of system response:
- Host IP: 10.10.0.78 Hypervisor Hostname: ps-ps-obnqilm4xxlu-0-gdy3x46euaeu-server-ftp6p7j6pyjl.cluster.local Hypervisor Type: QEMU ID: 1 State: up - Host IP: 10.10.0.118 Hypervisor Hostname: ps-ps-obnqilm4xxlu-1-n36gax6zqgef-server-xtby2leuercd.cluster.local Hypervisor Type: QEMU ID: 7 State: up
Determine the resource provider that corresponds to the hypervisor:
openstack resource provider list -f yaml --name <hypervisor_hostname>
Example of system response:
- generation: 4 name: ps-ps-obnqilm4xxlu-1-n36gax6zqgef-server-xtby2leuercd.cluster.local parent_provider_uuid: null root_provider_uuid: b16e9094-3f0e-4b8e-a138-e0b1f0a980db uuid: b16e9094-3f0e-4b8e-a138-e0b1f0a980db
Verify the current values in the resource provider by its UUID:
openstack resource provider inventory list <provider_uuid> -f yaml
Example of system response:
- allocation_ratio: 8.0 max_unit: 8 min_unit: 1 reserved: 0 resource_class: VCPU step_size: 1 total: 8 used: 0 - allocation_ratio: 1.0 max_unit: 7956 min_unit: 1 reserved: 512 resource_class: MEMORY_MB step_size: 1 total: 7956 used: 0 - allocation_ratio: 1.6 max_unit: 145 min_unit: 1 reserved: 0 resource_class: DISK_GB step_size: 1 total: 145 used: 0
Update the allocation ratio for the required resource class in the resource provider and inspect the system response to verify that the change has been applied:
openstack resource provider inventory set <provider_uuid> --amend --resource VCPU:allocation_ratio=10
Caution
To ensure accurate resource updates, it is crucial to specify the
--amend
argument when making requests. Failure to do so will require the inclusion of values for all fields associated with the resource provider.Example of system response:
- allocation_ratio: 10.0 max_unit: 8 min_unit: 1 reserved: 0 resource_class: VCPU step_size: 1 total: 8 used: 0 - allocation_ratio: 1.0 max_unit: 7956 min_unit: 1 reserved: 512 resource_class: MEMORY_MB step_size: 1 total: 7956 used: 0 - allocation_ratio: 1.6 max_unit: 145 min_unit: 1 reserved: 0 resource_class: DISK_GB step_size: 1 total: 145 used: 0