Add new role parameters for cpu/ram/disk allocation ratio

This change adds three new role parameters `NovaCPUAllocationRatio`,
`NovaRAMAllocationRatio` and `NovaDiskAllocationRatio` for
configuring cpu_allocation_ratio, ram_allocation_ratio and
disk_allocation_ratio.
The default values for CPU and Disk allocation ratio are taken
as 0.0 as it will be updated by update_available_resource method
as mentioned in [1].
[1] https://specs.openstack.org/openstack/nova-specs/specs/stein/implemented/initial-allocation-ratios.html

Conflicts:
    deployment/nova/nova-compute-container-puppet.yaml
    puppet/services/nova-base.yaml

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1909661

Change-Id: Ia3c62668b0c1469e31aa8cd2c984b460eb06d970
(cherry picked from commit 5066737451)
This commit is contained in:
Rajesh Tailor 2019-08-12 14:38:02 +05:30 committed by David Vallee Delisle
parent 09e7915e00
commit de3c2ec04b
2 changed files with 37 additions and 0 deletions

View File

@ -241,6 +241,24 @@ parameters:
type: boolean type: boolean
tags: tags:
- role_specific - role_specific
NovaCPUAllocationRatio:
type: number
description: Virtual CPU to physical CPU allocation ratio.
default: 0.0
tags:
- role_specific
NovaRAMAllocationRatio:
type: number
description: Virtual RAM to physical RAM allocation ratio.
default: 1.0
tags:
- role_specific
NovaDiskAllocationRatio:
type: number
description: Virtual disk to physical disk allocation ratio.
default: 0.0
tags:
- role_specific
conditions: conditions:
enable_live_migration_tunnelled: enable_live_migration_tunnelled:
@ -301,6 +319,9 @@ resources:
nova::compute::resume_guests_state_on_host_boot: NovaResumeGuestsStateOnHostBoot nova::compute::resume_guests_state_on_host_boot: NovaResumeGuestsStateOnHostBoot
resume_guests_state_on_host_boot: NovaResumeGuestsStateOnHostBoot resume_guests_state_on_host_boot: NovaResumeGuestsStateOnHostBoot
nova::compute::rbd::ephemeral_storage: NovaEnableRbdBackend nova::compute::rbd::ephemeral_storage: NovaEnableRbdBackend
nova::cpu_allocation_ratio: NovaCPUAllocationRatio
nova::ram_allocation_ratio: NovaRAMAllocationRatio
nova::disk_allocation_ratio: NovaDiskAllocationRatio
- values: {get_param: [RoleParameters]} - values: {get_param: [RoleParameters]}
- values: - values:
NovaVcpuPinSet: {get_param: NovaVcpuPinSet} NovaVcpuPinSet: {get_param: NovaVcpuPinSet}
@ -361,6 +382,9 @@ resources:
NovaLibvirtMemStatsPeriodSeconds: {get_param: NovaLibvirtMemStatsPeriodSeconds} NovaLibvirtMemStatsPeriodSeconds: {get_param: NovaLibvirtMemStatsPeriodSeconds}
NovaResumeGuestsStateOnHostBoot: {get_param: NovaResumeGuestsStateOnHostBoot} NovaResumeGuestsStateOnHostBoot: {get_param: NovaResumeGuestsStateOnHostBoot}
NovaEnableRbdBackend: {get_param: NovaEnableRbdBackend} NovaEnableRbdBackend: {get_param: NovaEnableRbdBackend}
NovaCPUAllocationRatio: {get_param: NovaCPUAllocationRatio}
NovaRAMAllocationRatio: {get_param: NovaRAMAllocationRatio}
NovaDiskAllocationRatio: {get_param: NovaDiskAllocationRatio}
outputs: outputs:
role_data: role_data:

View File

@ -0,0 +1,13 @@
---
features:
- |
Add new role parameters `NovaCPUAllocationRatio`, `NovaRAMAllocationRatio`
and `NovaDiskAllocationRatio` which allows to configure `cpu_allocation_ratio`,
`ram_allocation_ratio` and `disk_allocation_ratio`.
Default value for NovaCPUAllocationRatio is 0.0
Default value for NovaRAMAllocationRatio is 1.0
Default value for NovaDiskAllocationRatio is 0.0
The default values for CPU and Disk allocation ratio
are taken 0.0 as mentioned in [1].
[1] https://specs.openstack.org/openstack/nova-specs/specs/stein/implemented/initial-allocation-ratios.html