diff --git a/manifests/compute.pp b/manifests/compute.pp index 3b7898cb1..a4d12f517 100644 --- a/manifests/compute.pp +++ b/manifests/compute.pp @@ -116,6 +116,12 @@ # for virtual machine processes # Defaults to $::os_service_default # +# [*resume_guests_state_on_host_boot*] +# (optional) This option specifies whether to start guests that were running before the +# host rebooted. It ensures that all of the instances on a Nova compute node +# resume their state each time the compute node boots or restarts. +# Defaults to $::os_service_default +# # [*keymgr_api_class*] # (optional) Key Manager service. # Example of valid value: castellan.key_manager.barbican_key_manager.BarbicanKeyManager @@ -182,6 +188,7 @@ class nova::compute ( $allow_resize_to_same_host = false, $resize_confirm_window = $::os_service_default, $vcpu_pin_set = $::os_service_default, + $resume_guests_state_on_host_boot = $::os_service_default, $keymgr_api_class = $::os_service_default, $barbican_auth_endpoint = $::os_service_default, $barbican_endpoint = $::os_service_default, @@ -245,6 +252,7 @@ is used. It will be removed once Nova removes it.") '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; + 'DEFAULT/resume_guests_state_on_host_boot': value => $resume_guests_state_on_host_boot; 'key_manager/api_class': value => $keymgr_api_class; 'barbican/auth_endpoint': value => $barbican_auth_endpoint; 'barbican/barbican_endpoint': value => $barbican_endpoint; diff --git a/releasenotes/notes/add_resume_guests_state_on_host_boot_parameter-2fb7177a2898aed8.yaml b/releasenotes/notes/add_resume_guests_state_on_host_boot_parameter-2fb7177a2898aed8.yaml new file mode 100644 index 000000000..8b191054f --- /dev/null +++ b/releasenotes/notes/add_resume_guests_state_on_host_boot_parameter-2fb7177a2898aed8.yaml @@ -0,0 +1,3 @@ +--- +features: + - Adds the resume_guests_state_on_host_boot config parameter to nova compute diff --git a/spec/classes/nova_compute_spec.rb b/spec/classes/nova_compute_spec.rb index dd1d7804e..a6a9cd097 100644 --- a/spec/classes/nova_compute_spec.rb +++ b/spec/classes/nova_compute_spec.rb @@ -27,6 +27,7 @@ describe 'nova::compute' do 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 contain_nova_config('DEFAULT/resume_guests_state_on_host_boot').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('') } it { is_expected.to contain_nova_config('barbican/barbican_endpoint').with_value('') } @@ -76,6 +77,7 @@ describe 'nova::compute' do :config_drive_format => 'vfat', :resize_confirm_window => '3', :vcpu_pin_set => ['4-12','^8','15'], + :resume_guests_state_on_host_boot => true, :keymgr_api_class => 'castellan.key_manager.barbican_key_manager.BarbicanKeyManager', :barbican_endpoint => 'http://localhost', :barbican_api_version => 'v1', @@ -137,11 +139,14 @@ describe 'nova::compute' do it { is_expected.to contain_nova_config('DEFAULT/max_concurrent_live_migrations').with_value('4') } + it { is_expected.to contain_nova_config('DEFAULT/resume_guests_state_on_host_boot').with_value(true) } + it 'configures nova pci_passthrough_whitelist entries' do is_expected.to contain_nova_config('DEFAULT/pci_passthrough_whitelist').with( 'value' => "[{\"vendor_id\":\"8086\",\"product_id\":\"0126\"},{\"vendor_id\":\"9096\",\"product_id\":\"1520\",\"physical_network\":\"physnet1\"}]" ) end + it 'configures nova config_drive_format to vfat' do is_expected.to contain_nova_config('DEFAULT/config_drive_format').with_value('vfat') is_expected.to_not contain_package('genisoimage').with( @@ -252,6 +257,7 @@ describe 'nova::compute' do it { is_expected.to contain_nova_config('DEFAULT/instance_usage_audit').with_value(true) } it { is_expected.to contain_nova_config('DEFAULT/instance_usage_audit_period').with_value('year') } end + context 'with vnc_keymap set to fr' do let :params do { :vnc_keymap => 'fr', }