diff --git a/manifests/compute.pp b/manifests/compute.pp index d1c6356ca..3db22d801 100644 --- a/manifests/compute.pp +++ b/manifests/compute.pp @@ -144,37 +144,43 @@ # (optional) Maximum number of live migrations to run in parallel. # Defaults to $::os_service_default # +# [*consecutive_build_service_disable_threshold*] +# (optional) Max number of consecutive build failures before the nova-compute +# will disable itself. +# Defaults to $::os_service_default +# class nova::compute ( - $enabled = true, - $manage_service = true, - $ensure_package = 'present', - $vnc_enabled = true, - $vncserver_proxyclient_address = '127.0.0.1', - $vncproxy_host = false, - $vncproxy_protocol = 'http', - $vncproxy_port = '6080', - $vncproxy_path = '/vnc_auto.html', - $vnc_keymap = 'en-us', - $force_config_drive = false, - $virtio_nic = false, - $neutron_enabled = true, - $install_bridge_utils = true, - $instance_usage_audit = false, - $instance_usage_audit_period = 'month', - $force_raw_images = true, - $reserved_host_memory = '512', - $heal_instance_info_cache_interval = '60', - $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, - $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, - $barbican_api_version = $::os_service_default, - $max_concurrent_live_migrations = $::os_service_default, + $enabled = true, + $manage_service = true, + $ensure_package = 'present', + $vnc_enabled = true, + $vncserver_proxyclient_address = '127.0.0.1', + $vncproxy_host = false, + $vncproxy_protocol = 'http', + $vncproxy_port = '6080', + $vncproxy_path = '/vnc_auto.html', + $vnc_keymap = 'en-us', + $force_config_drive = false, + $virtio_nic = false, + $neutron_enabled = true, + $install_bridge_utils = true, + $instance_usage_audit = false, + $instance_usage_audit_period = 'month', + $force_raw_images = true, + $reserved_host_memory = '512', + $heal_instance_info_cache_interval = '60', + $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, + $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, + $barbican_api_version = $::os_service_default, + $max_concurrent_live_migrations = $::os_service_default, + $consecutive_build_service_disable_threshold = $::os_service_default, ) { include ::nova::deps @@ -213,6 +219,8 @@ class nova::compute ( 'barbican/barbican_endpoint': value => $barbican_endpoint; 'barbican/barbican_api_version': value => $barbican_api_version; 'DEFAULT/max_concurrent_live_migrations': value => $max_concurrent_live_migrations; + 'compute/consecutive_build_service_disable_threshold': + value => $consecutive_build_service_disable_threshold; } ensure_resource('nova_config', 'DEFAULT/allow_resize_to_same_host', { value => $allow_resize_to_same_host }) diff --git a/releasenotes/notes/configure-build-disable-threshold-41d0ba2f8259d467.yaml b/releasenotes/notes/configure-build-disable-threshold-41d0ba2f8259d467.yaml new file mode 100644 index 000000000..430b38556 --- /dev/null +++ b/releasenotes/notes/configure-build-disable-threshold-41d0ba2f8259d467.yaml @@ -0,0 +1,4 @@ +--- +features: | + - Add ability to configure compute/consecutive_build_service_disable_threshold + on the compute notes. diff --git a/spec/classes/nova_compute_spec.rb b/spec/classes/nova_compute_spec.rb index 3af6a9f94..32303a4c9 100644 --- a/spec/classes/nova_compute_spec.rb +++ b/spec/classes/nova_compute_spec.rb @@ -34,6 +34,7 @@ describe 'nova::compute' do it { is_expected.to contain_nova_config('barbican/barbican_api_version').with_value('') } it { is_expected.to contain_nova_config('barbican/auth_endpoint').with_value('') } it { is_expected.to contain_nova_config('DEFAULT/max_concurrent_live_migrations').with_value('') } + it { is_expected.to contain_nova_config('compute/consecutive_build_service_disable_threshold').with_value('') } it { is_expected.to contain_nova_config('pci/passthrough_whitelist').with(:value => '') } it { is_expected.to_not contain_package('cryptsetup').with( :ensure => 'present' )} @@ -79,6 +80,7 @@ describe 'nova::compute' do :barbican_api_version => 'v1', :barbican_auth_endpoint => 'http://127.0.0.1:5000/v3', :max_concurrent_live_migrations => '4', + :consecutive_build_service_disable_threshold => '9', } end @@ -128,6 +130,8 @@ 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('compute/consecutive_build_service_disable_threshold').with_value('9') } + it { is_expected.to contain_nova_config('DEFAULT/resume_guests_state_on_host_boot').with_value(true) } it 'configures nova config_drive_format to vfat' do