Add resize_confirm_window option to nova::compute

Adds the resize_confirm_window nova configuration option
to nova::compute. Setting this value will make sure resizes
are automically confirmed after the N number of seconds.

Change-Id: Ibcc43a7a68b2df04155c56bf9d834c5f972d189c
This commit is contained in:
Tobias Urdin 2016-12-19 16:40:54 +01:00
parent 4801dd0ce3
commit 5f53217569
3 changed files with 20 additions and 0 deletions

View File

@ -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;

View File

@ -0,0 +1,3 @@
---
features:
- Adds the resize_confirm_window parameter to nova configuration for compute service.

View File

@ -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('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('DEFAULT/vcpu_pin_set').with(:value => '<SERVICE DEFAULT>') }
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('<SERVICE DEFAULT>') }
@ -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