From d2b3430296f1715c604e8c0a9d430b0673aeb8c6 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 12 Jul 2023 22:16:33 +0900 Subject: [PATCH] Drop hard-coded default for service_down_time and report_interval ... because the hard-coded values exactly match the service default values. Change-Id: I37bf555f947e581b8076b55069943182e5668a24 --- manifests/init.pp | 8 ++++---- spec/classes/nova_init_spec.rb | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 29c60f8a0..75ed30f09 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -179,7 +179,7 @@ # # [*service_down_time*] # (optional) Maximum time since last check-in for up service. -# Defaults to 60 +# Defaults to $facts['os_service_default']. # # [*state_path*] # (optional) Directory for storing state. @@ -192,7 +192,7 @@ # # [*report_interval*] # (optional) Interval at which nodes report to data store. -# Defaults to '10' +# Defaults to $facts['os_service_default'] # # [*rootwrap_config*] # (optional) Path to the rootwrap configuration file to use for running commands as root @@ -407,10 +407,10 @@ class nova( $amqp_username = $facts['os_service_default'], $amqp_password = $facts['os_service_default'], $host = $facts['os_service_default'], - $service_down_time = 60, + $service_down_time = $facts['os_service_default'], $state_path = '/var/lib/nova', $lock_path = $::nova::params::lock_path, - $report_interval = '10', + $report_interval = $facts['os_service_default'], $rootwrap_config = '/etc/nova/rootwrap.conf', Boolean $use_ssl = false, Array[String[1]] $enabled_ssl_apis = ['metadata', 'osapi_compute'], diff --git a/spec/classes/nova_init_spec.rb b/spec/classes/nova_init_spec.rb index bd98740c9..a4196b0d8 100644 --- a/spec/classes/nova_init_spec.rb +++ b/spec/classes/nova_init_spec.rb @@ -80,9 +80,9 @@ describe 'nova' do is_expected.to contain_oslo__concurrency('nova_config').with( :lock_path => platform_params[:lock_path] ) - is_expected.to contain_nova_config('DEFAULT/service_down_time').with_value('60') + is_expected.to contain_nova_config('DEFAULT/service_down_time').with_value('') is_expected.to contain_nova_config('DEFAULT/rootwrap_config').with_value('/etc/nova/rootwrap.conf') - is_expected.to contain_nova_config('DEFAULT/report_interval').with_value('10') + is_expected.to contain_nova_config('DEFAULT/report_interval').with_value('') is_expected.to contain_nova_config('vif_plug_ovs/ovsdb_connection').with_value('') is_expected.to contain_nova_config('DEFAULT/long_rpc_timeout').with_value('') is_expected.to contain_nova_config('DEFAULT/cpu_allocation_ratio').with_value('') @@ -133,7 +133,7 @@ describe 'nova' do :amqp_password => 'password', :lock_path => '/var/locky/path', :state_path => '/var/lib/nova2', - :service_down_time => '120', + :service_down_time => '60', :auth_strategy => 'foo', :ensure_package => '2012.1.1-15.el6', :host => 'test-001.example.org', @@ -141,7 +141,7 @@ describe 'nova' do :notification_driver => 'ceilometer.compute.nova_notifier', :notification_topics => 'openstack', :notification_format => 'unversioned', - :report_interval => '60', + :report_interval => '10', :ovsdb_connection => 'tcp:127.0.0.1:6640', :upgrade_level_cert => '1.0.0', :upgrade_level_compute => '1.0.0', @@ -238,9 +238,9 @@ describe 'nova' do is_expected.to contain_oslo__concurrency('nova_config').with( :lock_path => '/var/locky/path' ) - is_expected.to contain_nova_config('DEFAULT/service_down_time').with_value('120') + is_expected.to contain_nova_config('DEFAULT/service_down_time').with_value('60') is_expected.to contain_nova_config('notifications/notification_format').with_value('unversioned') - is_expected.to contain_nova_config('DEFAULT/report_interval').with_value('60') + is_expected.to contain_nova_config('DEFAULT/report_interval').with_value('10') is_expected.to contain_nova_config('vif_plug_ovs/ovsdb_connection').with_value('tcp:127.0.0.1:6640') is_expected.to contain_nova_config('DEFAULT/long_rpc_timeout').with_value('1800') is_expected.to contain_nova_config('DEFAULT/ssl_only').with_value(true)