compute: manage force_raw_images parameter
In Nova, force_raw_images allows to force backing images to raw format. Some use-cases require to disable this feature. Let's use nova::compute class to manage this option, and let at True by default as this the case in Nova (Juno release). Change-Id: I4d700204bfd1d297667303b11e572f24dc9af2fc Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
@@ -69,6 +69,10 @@
|
||||
# Time period must be hour, day, month or year
|
||||
# Defaults to 'month'
|
||||
#
|
||||
# [*force_raw_images*]
|
||||
# (optional) Force backing images to raw format.
|
||||
# Defaults to true
|
||||
#
|
||||
class nova::compute (
|
||||
$enabled = false,
|
||||
$manage_service = true,
|
||||
@@ -85,7 +89,8 @@ class nova::compute (
|
||||
$neutron_enabled = true,
|
||||
$network_device_mtu = undef,
|
||||
$instance_usage_audit = false,
|
||||
$instance_usage_audit_period = 'month'
|
||||
$instance_usage_audit_period = 'month',
|
||||
$force_raw_images = true,
|
||||
) {
|
||||
|
||||
include nova::params
|
||||
@@ -159,4 +164,8 @@ class nova::compute (
|
||||
package { 'pm-utils':
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
nova_config {
|
||||
'DEFAULT/force_raw_images': value => $force_raw_images;
|
||||
}
|
||||
}
|
||||
|
@@ -33,6 +33,8 @@ describe 'nova::compute' do
|
||||
it { should contain_package('pm-utils').with(
|
||||
:ensure => 'present'
|
||||
) }
|
||||
|
||||
it { should contain_nova_config('DEFAULT/force_raw_images').with(:value => true) }
|
||||
end
|
||||
|
||||
context 'with overridden parameters' do
|
||||
@@ -40,7 +42,8 @@ describe 'nova::compute' do
|
||||
{ :enabled => true,
|
||||
:ensure_package => '2012.1-2',
|
||||
:vncproxy_host => '127.0.0.1',
|
||||
:network_device_mtu => 9999 }
|
||||
:network_device_mtu => 9999,
|
||||
:force_raw_images => false }
|
||||
end
|
||||
|
||||
it 'installs nova-compute package and service' do
|
||||
@@ -67,6 +70,8 @@ describe 'nova::compute' do
|
||||
'http://127.0.0.1:6080/vnc_auto.html'
|
||||
)
|
||||
end
|
||||
|
||||
it { should contain_nova_config('DEFAULT/force_raw_images').with(:value => false) }
|
||||
end
|
||||
|
||||
context 'with neutron_enabled set to false' do
|
||||
|
Reference in New Issue
Block a user