From 4feba93488a4757d0ba8b448bc73ae532eb7b924 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Tue, 30 Jul 2024 22:50:14 +0900 Subject: [PATCH] Deprecate conductor_life_check_timeout This option has been unused, and was removed from magnum. Depneds-on: https://review.opendev.org/912027 Change-Id: I055ef530f164f80646ab70ac91a10c2f584048e7 --- manifests/conductor.pp | 28 +++++++++++++------ ...r_life_check_timeout-256bd693848a296c.yaml | 5 ++++ spec/classes/magnum_conductor_spec.rb | 9 ------ 3 files changed, 25 insertions(+), 17 deletions(-) create mode 100644 releasenotes/notes/deprecate-conductor_life_check_timeout-256bd693848a296c.yaml diff --git a/manifests/conductor.pp b/manifests/conductor.pp index 76f6738..e49f485 100644 --- a/manifests/conductor.pp +++ b/manifests/conductor.pp @@ -16,11 +16,6 @@ # (optional) The state of the magnum conductor package # Defaults to 'present' # -# [*conductor_life_check_timeout*] -# (optional) RPC timeout for the conductor liveness check that is -# used for bay locking. -# Defaults to $facts['os_service_default'] -# # [*auth_strategy*] # (optional) Type of authentication to be used. # Defaults to 'keystone' @@ -29,19 +24,32 @@ # (optional) Number of conductor workers. # Defaults to $facts['os_workers'] # +# DEPRECATED PARAMETERS +# +# [*conductor_life_check_timeout*] +# (optional) RPC timeout for the conductor liveness check that is +# used for bay locking. +# Defaults to undef +# class magnum::conductor( Boolean $enabled = true, Boolean $manage_service = true, $package_ensure = 'present', - $conductor_life_check_timeout = $facts['os_service_default'], $auth_strategy = 'keystone', $workers = $facts['os_workers'], + # DEPRECATED PARAMETERS + $conductor_life_check_timeout = undef, ) { include magnum::db include magnum::deps include magnum::params + if $conductor_life_check_timeout != undef { + warning("The conductor_life_check_timeout parameter has been deprecated \ +and has no effect.") + } + # Install package package { 'magnum-conductor': ensure => $package_ensure, @@ -67,8 +75,12 @@ class magnum::conductor( } magnum_config { - 'conductor/conductor_life_check_timeout': value => $conductor_life_check_timeout; - 'conductor/workers': value => $workers; + 'conductor/workers': value => $workers; + } + + # Remove this and conductor_life_check_timeout after 2025.1 release + magnum_config { + 'conductor/conductor_life_check_timeout': ensure => absent; } if $auth_strategy == 'keystone' { diff --git a/releasenotes/notes/deprecate-conductor_life_check_timeout-256bd693848a296c.yaml b/releasenotes/notes/deprecate-conductor_life_check_timeout-256bd693848a296c.yaml new file mode 100644 index 0000000..114a08b --- /dev/null +++ b/releasenotes/notes/deprecate-conductor_life_check_timeout-256bd693848a296c.yaml @@ -0,0 +1,5 @@ +--- +deprecations: + - | + The ``magnum::conductor::conductor_life_check_timeout`` parameter has been + deprecated and has no effect now. diff --git a/spec/classes/magnum_conductor_spec.rb b/spec/classes/magnum_conductor_spec.rb index 1a828c2..154fc14 100644 --- a/spec/classes/magnum_conductor_spec.rb +++ b/spec/classes/magnum_conductor_spec.rb @@ -23,18 +23,9 @@ describe 'magnum::conductor' do ) } it { - is_expected.to contain_magnum_config('conductor/conductor_life_check_timeout').with_value('') is_expected.to contain_magnum_config('conductor/workers').with_value(facts[:os_workers]) } - context 'with conductor_life_check_timeout specified' do - let :params do - { :conductor_life_check_timeout => '4' } - end - - it { is_expected.to contain_magnum_config('conductor/conductor_life_check_timeout').with_value('4') } - end - context 'with manage_service as false' do let :params do { :enabled => true,