diff --git a/manifests/compute.pp b/manifests/compute.pp index 225556bf4..1a768e2f8 100644 --- a/manifests/compute.pp +++ b/manifests/compute.pp @@ -100,6 +100,17 @@ # can also be set in the api.pp class. # Defaults to false # +# [*resize_confirm_window*] +# (optional) Automatically confirm resizes after N seconds. +# Resize functionality will save the existing server before resizing. +# After the resize completes, user is requested to confirm the resize. +# The user has the opportunity to either confirm or revert all +# changes. Confirm resize removes the original server and changes +# server status from resized to active. Setting this option to a time +# period (in seconds) will automatically confirm the resize if the +# server is in resized state longer than that time. +# Defaults to $::os_service_default +# # [*vcpu_pin_set*] # (optional) A list or range of physical CPU cores to reserve # for virtual machine processes @@ -165,6 +176,7 @@ class nova::compute ( $pci_passthrough = $::os_service_default, $config_drive_format = $::os_service_default, $allow_resize_to_same_host = false, + $resize_confirm_window = $::os_service_default, $vcpu_pin_set = $::os_service_default, $keymgr_api_class = $::os_service_default, $barbican_auth_endpoint = $::os_service_default, @@ -226,6 +238,7 @@ is used. It will be removed once Nova removes it.") 'DEFAULT/compute_manager': value => $compute_manager; 'DEFAULT/heal_instance_info_cache_interval': value => $heal_instance_info_cache_interval; 'DEFAULT/pci_passthrough_whitelist': value => $pci_passthrough_real; + 'DEFAULT/resize_confirm_window': value => $resize_confirm_window; 'DEFAULT/vcpu_pin_set': value => $vcpu_pin_set_real; 'key_manager/api_class': value => $keymgr_api_class; 'barbican/auth_endpoint': value => $barbican_auth_endpoint; diff --git a/releasenotes/notes/add_resize_confirm_window_parameter-e89c246e2f0f9d85.yaml b/releasenotes/notes/add_resize_confirm_window_parameter-e89c246e2f0f9d85.yaml new file mode 100644 index 000000000..abe6cc289 --- /dev/null +++ b/releasenotes/notes/add_resize_confirm_window_parameter-e89c246e2f0f9d85.yaml @@ -0,0 +1,3 @@ +--- +features: + - Adds the resize_confirm_window parameter to nova configuration for compute service. diff --git a/spec/classes/nova_compute_spec.rb b/spec/classes/nova_compute_spec.rb index e7300d715..022fb153b 100644 --- a/spec/classes/nova_compute_spec.rb +++ b/spec/classes/nova_compute_spec.rb @@ -25,6 +25,7 @@ describe 'nova::compute' do end it { is_expected.to contain_nova_config('DEFAULT/allow_resize_to_same_host').with(:value => 'false') } + it { is_expected.to contain_nova_config('DEFAULT/resize_confirm_window').with_value('') } it { is_expected.to contain_nova_config('DEFAULT/vcpu_pin_set').with(:value => '') } it { is_expected.to_not contain_nova_config('vnc/novncproxy_base_url') } it { is_expected.to contain_nova_config('key_manager/api_class').with_value('') } @@ -72,6 +73,7 @@ describe 'nova::compute' do :heal_instance_info_cache_interval => '120', :pci_passthrough => "[{\"vendor_id\":\"8086\",\"product_id\":\"0126\"},{\"vendor_id\":\"9096\",\"product_id\":\"1520\",\"physical_network\":\"physnet1\"}]", :config_drive_format => 'vfat', + :resize_confirm_window => '3', :vcpu_pin_set => ['4-12','^8','15'], :keymgr_api_class => 'castellan.key_manager.barbican_key_manager.BarbicanKeyManager', :barbican_endpoint => 'http://localhost', @@ -127,6 +129,8 @@ describe 'nova::compute' do it { is_expected.to contain_nova_config('DEFAULT/force_raw_images').with(:value => false) } + it { is_expected.to contain_nova_config('DEFAULT/resize_confirm_window').with_value('3') } + it { is_expected.to contain_nova_config('DEFAULT/vcpu_pin_set').with(:value => '4-12,^8,15') } it 'configures nova pci_passthrough_whitelist entries' do