Browse Source

Add compute_monitors config option

Change-Id: I317ca55358904e892a2a849bc272007fc8fa9df0
changes/14/761114/1
Rocky 9 months ago
parent
commit
8f5cb41d3b
  1. 8
      manifests/compute.pp
  2. 5
      releasenotes/notes/add_compute_monitors_option-454ba8fcc2d28744.yaml
  3. 3
      spec/classes/nova_compute_spec.rb

8
manifests/compute.pp

@ -243,6 +243,12 @@
# been marked as deleted in database to be eligible for cleanup.
# Defaults to $::os_service_default
#
# [*compute_monitors*]
# (optional) A comma-separated list of monitors that can be used for getting
# compute metrics. Only one monitor per namespace (For example: cpu) can be
# loaded at a time.
# Defaults to $::os_service_default
#
# DEPRECATED PARAMETERS
#
# [*neutron_enabled*]
@ -319,6 +325,7 @@ class nova::compute (
$running_deleted_instance_action = $::os_service_default,
$running_deleted_instance_poll_interval = $::os_service_default,
$running_deleted_instance_timeout = $::os_service_default,
$compute_monitors = $::os_service_default,
# DEPRECATED PARAMETERS
$neutron_enabled = undef,
$install_bridge_utils = undef,
@ -472,6 +479,7 @@ Use the same parameter in nova::api class.')
'DEFAULT/running_deleted_instance_poll_interval':
value => $running_deleted_instance_poll_interval;
'DEFAULT/running_deleted_instance_timeout': value => $running_deleted_instance_timeout;
'DEFAULT/compute_monitors': value => join(any2array($compute_monitors), ',');
}
if ($vnc_enabled) {

5
releasenotes/notes/add_compute_monitors_option-454ba8fcc2d28744.yaml

@ -0,0 +1,5 @@
---
features:
- |
Add ``compute_monitors`` parameter which specifies a list of monitors that
can be used for getting compute metrics.

3
spec/classes/nova_compute_spec.rb

@ -67,6 +67,7 @@ describe 'nova::compute' do
it { is_expected.to contain_nova_config('DEFAULT/running_deleted_instance_action').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('DEFAULT/running_deleted_instance_poll_interval').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('DEFAULT/running_deleted_instance_timeout').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('DEFAULT/compute_monitors').with_value('<SERVICE DEFAULT>') }
it { is_expected.to_not contain_package('bridge-utils').with(
:ensure => 'present',
@ -118,6 +119,7 @@ describe 'nova::compute' do
:running_deleted_instance_action => 'shutdown',
:running_deleted_instance_poll_interval => '900',
:running_deleted_instance_timeout => '200',
:compute_monitors => ['cpu.virt_driver','fake'],
}
end
@ -180,6 +182,7 @@ describe 'nova::compute' do
it { is_expected.to contain_nova_config('DEFAULT/running_deleted_instance_action').with_value('shutdown') }
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 'configures nova config_drive_format to vfat' do
is_expected.to contain_nova_config('DEFAULT/config_drive_format').with_value('vfat')

Loading…
Cancel
Save