Add support for initial_*_allocation_ratio
This change introduces support for the initial_*_allocation_ratio parameters which were implemented in nova during the Stein cycle[1]. [1] 08f3ae960623c94bdd997cacb3e81f04b4bbba69 Change-Id: I422499f80963f74284809a3a63d51f8ab06c5817
This commit is contained in:
@@ -333,6 +333,18 @@
|
|||||||
# per compute node.
|
# per compute node.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
|
# [*initial_cpu_allocation_ratio*]
|
||||||
|
# (optional) Initial virtual CPU to physical CPU allocation ratio.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
|
# [*initial_ram_allocation_ratio*]
|
||||||
|
# (optional) Initial virtual RAM to physical RAM allocation ratio.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
|
# [*initial_disk_allocation_ratio*]
|
||||||
|
# (optional) Initial virtual disk to physical disk allocation ratio.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
# [*my_ip*]
|
# [*my_ip*]
|
||||||
# (optional) IP address of this host on the management network.
|
# (optional) IP address of this host on the management network.
|
||||||
# If unset, will determine the IP programmatically based on the default route.
|
# If unset, will determine the IP programmatically based on the default route.
|
||||||
@@ -501,6 +513,9 @@ class nova(
|
|||||||
$cpu_allocation_ratio = $::os_service_default,
|
$cpu_allocation_ratio = $::os_service_default,
|
||||||
$ram_allocation_ratio = $::os_service_default,
|
$ram_allocation_ratio = $::os_service_default,
|
||||||
$disk_allocation_ratio = $::os_service_default,
|
$disk_allocation_ratio = $::os_service_default,
|
||||||
|
$initial_cpu_allocation_ratio = $::os_service_default,
|
||||||
|
$initial_ram_allocation_ratio = $::os_service_default,
|
||||||
|
$initial_disk_allocation_ratio = $::os_service_default,
|
||||||
$purge_config = false,
|
$purge_config = false,
|
||||||
$my_ip = $::os_service_default,
|
$my_ip = $::os_service_default,
|
||||||
$cross_az_attach = $::os_service_default,
|
$cross_az_attach = $::os_service_default,
|
||||||
@@ -711,17 +726,20 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.")
|
|||||||
}
|
}
|
||||||
|
|
||||||
nova_config {
|
nova_config {
|
||||||
'DEFAULT/ssl_only': value => $ssl_only;
|
'DEFAULT/ssl_only': value => $ssl_only;
|
||||||
'DEFAULT/cert': value => $cert;
|
'DEFAULT/cert': value => $cert;
|
||||||
'DEFAULT/key': value => $key;
|
'DEFAULT/key': value => $key;
|
||||||
'console/ssl_ciphers': value => $console_ssl_ciphers;
|
'console/ssl_ciphers': value => $console_ssl_ciphers;
|
||||||
'console/ssl_minimum_version': value => $console_ssl_minimum_version;
|
'console/ssl_minimum_version': value => $console_ssl_minimum_version;
|
||||||
'DEFAULT/my_ip': value => $my_ip;
|
'DEFAULT/my_ip': value => $my_ip;
|
||||||
'DEFAULT/host': value => $host;
|
'DEFAULT/host': value => $host;
|
||||||
'DEFAULT/cpu_allocation_ratio': value => $cpu_allocation_ratio;
|
'DEFAULT/cpu_allocation_ratio': value => $cpu_allocation_ratio;
|
||||||
'DEFAULT/ram_allocation_ratio': value => $ram_allocation_ratio;
|
'DEFAULT/ram_allocation_ratio': value => $ram_allocation_ratio;
|
||||||
'DEFAULT/disk_allocation_ratio': value => $disk_allocation_ratio;
|
'DEFAULT/disk_allocation_ratio': value => $disk_allocation_ratio;
|
||||||
'DEFAULT/dhcp_domain': value => $dhcp_domain;
|
'DEFAULT/initial_cpu_allocation_ratio': value => $initial_cpu_allocation_ratio;
|
||||||
|
'DEFAULT/initial_ram_allocation_ratio': value => $initial_ram_allocation_ratio;
|
||||||
|
'DEFAULT/initial_disk_allocation_ratio': value => $initial_disk_allocation_ratio;
|
||||||
|
'DEFAULT/dhcp_domain': value => $dhcp_domain;
|
||||||
}
|
}
|
||||||
|
|
||||||
oslo::messaging::rabbit {'nova_config':
|
oslo::messaging::rabbit {'nova_config':
|
||||||
|
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The following parameters have been added to the ``nova`` class. These
|
||||||
|
parameters define allocation ratios used when nova initially creates
|
||||||
|
a resource provider record for each compute node.
|
||||||
|
|
||||||
|
- ``initial_cpu_allocation_ratio``
|
||||||
|
- ``initial_ram_allocation_ratio``
|
||||||
|
- ``initial_disk_allocation_ratio``
|
@@ -58,6 +58,9 @@ describe 'nova' do
|
|||||||
is_expected.to contain_nova_config('DEFAULT/cpu_allocation_ratio').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_nova_config('DEFAULT/cpu_allocation_ratio').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_nova_config('DEFAULT/ram_allocation_ratio').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_nova_config('DEFAULT/ram_allocation_ratio').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_nova_config('DEFAULT/disk_allocation_ratio').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_nova_config('DEFAULT/disk_allocation_ratio').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_nova_config('DEFAULT/initial_cpu_allocation_ratio').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_nova_config('DEFAULT/initial_ram_allocation_ratio').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_nova_config('DEFAULT/initial_disk_allocation_ratio').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_nova_config('DEFAULT/ssl_only').with_value(false)
|
is_expected.to contain_nova_config('DEFAULT/ssl_only').with_value(false)
|
||||||
is_expected.to contain_nova_config('DEFAULT/cert').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_nova_config('DEFAULT/cert').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_nova_config('DEFAULT/key').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_nova_config('DEFAULT/key').with_value('<SERVICE DEFAULT>')
|
||||||
@@ -496,15 +499,21 @@ describe 'nova' do
|
|||||||
context 'with allocation ratios set' do
|
context 'with allocation ratios set' do
|
||||||
let :params do
|
let :params do
|
||||||
{
|
{
|
||||||
:cpu_allocation_ratio => 32.0,
|
:cpu_allocation_ratio => 32.0,
|
||||||
:ram_allocation_ratio => 2.0,
|
:ram_allocation_ratio => 2.0,
|
||||||
:disk_allocation_ratio => 1.5,
|
:disk_allocation_ratio => 1.5,
|
||||||
|
:initial_cpu_allocation_ratio => 64.0,
|
||||||
|
:initial_ram_allocation_ratio => 4.0,
|
||||||
|
:initial_disk_allocation_ratio => 3.0,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
it { is_expected.to contain_nova_config('DEFAULT/cpu_allocation_ratio').with_value('32.0') }
|
it { is_expected.to contain_nova_config('DEFAULT/cpu_allocation_ratio').with_value(32.0) }
|
||||||
it { is_expected.to contain_nova_config('DEFAULT/ram_allocation_ratio').with_value('2.0') }
|
it { is_expected.to contain_nova_config('DEFAULT/ram_allocation_ratio').with_value(2.0) }
|
||||||
it { is_expected.to contain_nova_config('DEFAULT/disk_allocation_ratio').with_value('1.5') }
|
it { is_expected.to contain_nova_config('DEFAULT/disk_allocation_ratio').with_value(1.5) }
|
||||||
|
it { is_expected.to contain_nova_config('DEFAULT/initial_cpu_allocation_ratio').with_value(64.0) }
|
||||||
|
it { is_expected.to contain_nova_config('DEFAULT/initial_ram_allocation_ratio').with_value(4.0) }
|
||||||
|
it { is_expected.to contain_nova_config('DEFAULT/initial_disk_allocation_ratio').with_value(3.0) }
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user