From 8a59d08d5e9a501b525a6219fc173a7590660db9 Mon Sep 17 00:00:00 2001 From: Rocky Date: Thu, 29 Oct 2020 11:39:41 +1100 Subject: [PATCH] Add default_ephemeral_format config option Change-Id: Id8b024f2ff5002a564d1719a3ca3251fe5d1ccf0 (cherry picked from commit 1c19eb0a87a69289e72c8d0ec778aa766a3139a9) --- manifests/compute.pp | 7 +++++++ ..._compute_default_ephemeral_format-c30f5463c1616903.yaml | 5 +++++ spec/classes/nova_compute_spec.rb | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 releasenotes/notes/add_compute_default_ephemeral_format-c30f5463c1616903.yaml diff --git a/manifests/compute.pp b/manifests/compute.pp index 560547fc6..4371baf89 100644 --- a/manifests/compute.pp +++ b/manifests/compute.pp @@ -249,6 +249,11 @@ # loaded at a time. # Defaults to $::os_service_default # +# [*default_ephemeral_format*] +# (optional) The default format an ephemeral_volume will be formatted with +# on creation. +# Defaults to $::os_service_default +# # DEPRECATED PARAMETERS # # [*neutron_enabled*] @@ -326,6 +331,7 @@ class nova::compute ( $running_deleted_instance_poll_interval = $::os_service_default, $running_deleted_instance_timeout = $::os_service_default, $compute_monitors = $::os_service_default, + $default_ephemeral_format = $::os_service_default, # DEPRECATED PARAMETERS $neutron_enabled = undef, $install_bridge_utils = undef, @@ -480,6 +486,7 @@ Use the same parameter in nova::api class.') value => $running_deleted_instance_poll_interval; 'DEFAULT/running_deleted_instance_timeout': value => $running_deleted_instance_timeout; 'DEFAULT/compute_monitors': value => join(any2array($compute_monitors), ','); + 'DEFAULT/default_ephemeral_format': value => $default_ephemeral_format; } if ($vnc_enabled) { diff --git a/releasenotes/notes/add_compute_default_ephemeral_format-c30f5463c1616903.yaml b/releasenotes/notes/add_compute_default_ephemeral_format-c30f5463c1616903.yaml new file mode 100644 index 000000000..575872f8f --- /dev/null +++ b/releasenotes/notes/add_compute_default_ephemeral_format-c30f5463c1616903.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Add the ``default_ephemeral_format`` parameter which specifies default format + an ephemeral_volume will be formatted with on creation. diff --git a/spec/classes/nova_compute_spec.rb b/spec/classes/nova_compute_spec.rb index 37a0ee0fa..3e73f6190 100644 --- a/spec/classes/nova_compute_spec.rb +++ b/spec/classes/nova_compute_spec.rb @@ -68,6 +68,7 @@ describe 'nova::compute' do it { is_expected.to contain_nova_config('DEFAULT/running_deleted_instance_poll_interval').with_value('') } it { is_expected.to contain_nova_config('DEFAULT/running_deleted_instance_timeout').with_value('') } it { is_expected.to contain_nova_config('DEFAULT/compute_monitors').with_value('') } + it { is_expected.to contain_nova_config('DEFAULT/default_ephemeral_format').with_value('') } it { is_expected.to_not contain_package('bridge-utils').with( :ensure => 'present', @@ -120,6 +121,7 @@ describe 'nova::compute' do :running_deleted_instance_poll_interval => '900', :running_deleted_instance_timeout => '200', :compute_monitors => ['cpu.virt_driver','fake'], + :default_ephemeral_format => 'ext4', } end @@ -183,6 +185,7 @@ describe 'nova::compute' do it { is_expected.to contain_nova_config('DEFAULT/running_deleted_instance_poll_interval').with_value('900') } it { is_expected.to contain_nova_config('DEFAULT/running_deleted_instance_timeout').with_value('200') } it { is_expected.to contain_nova_config('DEFAULT/compute_monitors').with_value('cpu.virt_driver,fake') } + it { is_expected.to contain_nova_config('DEFAULT/default_ephemeral_format').with_value('ext4') } it 'configures nova config_drive_format to vfat' do is_expected.to contain_nova_config('DEFAULT/config_drive_format').with_value('vfat')