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

Change-Id: Ia3c62668b0c1469e31aa8cd2c984b460eb06d970
This commit is contained in:
Rajesh Tailor 2019-08-12 14:38:02 +05:30
parent 3cdc1a4a0a
commit 5066737451
3 changed files with 38 additions and 2 deletions

View File

@ -351,7 +351,6 @@ outputs:
nova::cron::purge_shadow_tables::verbose: {get_param: NovaCronPurgeShadowTablesVerbose} nova::cron::purge_shadow_tables::verbose: {get_param: NovaCronPurgeShadowTablesVerbose}
nova::cron::purge_shadow_tables::all_cells: {get_param: NovaCronPurgeShadowTablesAllCells} nova::cron::purge_shadow_tables::all_cells: {get_param: NovaCronPurgeShadowTablesAllCells}
nova::compute::sync_power_state_interval: {get_param: NovaSyncPowerStateInterval} nova::compute::sync_power_state_interval: {get_param: NovaSyncPowerStateInterval}
nova::ram_allocation_ratio: '1.0'
nova_is_additional_cell: {get_param: NovaAdditionalCell} nova_is_additional_cell: {get_param: NovaAdditionalCell}
- get_attr: [RoleParametersValue, value] - get_attr: [RoleParametersValue, value]
- -

View File

@ -323,6 +323,24 @@ parameters:
description: The password for the nova service and db account description: The password for the nova service and db account
type: string type: string
hidden: true hidden: true
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
resources: resources:
@ -389,6 +407,9 @@ resources:
nova::compute::libvirt::mem_stats_period_seconds: NovaLibvirtMemStatsPeriodSeconds nova::compute::libvirt::mem_stats_period_seconds: NovaLibvirtMemStatsPeriodSeconds
nova::compute::rbd::ephemeral_storage: NovaEnableRbdBackend nova::compute::rbd::ephemeral_storage: NovaEnableRbdBackend
resume_guests_state_on_host_boot: NovaResumeGuestsStateOnHostBoot resume_guests_state_on_host_boot: NovaResumeGuestsStateOnHostBoot
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}
@ -411,6 +432,9 @@ resources:
NovaLibvirtNumPciePorts: {get_param: NovaLibvirtNumPciePorts} NovaLibvirtNumPciePorts: {get_param: NovaLibvirtNumPciePorts}
NovaLibvirtMemStatsPeriodSeconds: {get_param: NovaLibvirtMemStatsPeriodSeconds} NovaLibvirtMemStatsPeriodSeconds: {get_param: NovaLibvirtMemStatsPeriodSeconds}
NovaEnableRbdBackend: {get_param: NovaEnableRbdBackend} NovaEnableRbdBackend: {get_param: NovaEnableRbdBackend}
NovaCPUAllocationRatio: {get_param: NovaCPUAllocationRatio}
NovaRAMAllocationRatio: {get_param: NovaRAMAllocationRatio}
NovaDiskAllocationRatio: {get_param: NovaDiskAllocationRatio}
conditions: conditions:
enable_instance_ha: {equals: [{get_param: EnableInstanceHA}, true]} enable_instance_ha: {equals: [{get_param: EnableInstanceHA}, true]}
@ -546,7 +570,7 @@ outputs:
if: if:
- libvirt_file_backed_memory_enabled - libvirt_file_backed_memory_enabled
- '1.0' - '1.0'
- null - {get_attr: [RoleParametersValue, value, 'nova::ram_allocation_ratio']}
service_config_settings: service_config_settings:
fluentd: fluentd:
tripleo_fluentd_groups_nova_compute: tripleo_fluentd_groups_nova_compute:

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