Replace deprecated [coordination] heartbeat
... by the new heartbeat_interval parameter. Depends-on: https://review.opendev.org/799600 Change-Id: I1a5e49e72a5082cdeaff79b3739d4246e7f01879
This commit is contained in:
parent
75892ddf3a
commit
49eb825204
@ -8,7 +8,7 @@
|
||||
# (Optional) Coordination backend URL.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*heartbeat*]
|
||||
# [*heartbeat_interval*]
|
||||
# (Optional) Number of seconds between hearbeats for distributed
|
||||
# coordintation.
|
||||
# Defaults to $::os_service_default
|
||||
@ -23,24 +23,43 @@
|
||||
# group
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*heartbeat*]
|
||||
# (Optional) Number of seconds between hearbeats for distributed
|
||||
# coordintation.
|
||||
# Defaults to undef
|
||||
#
|
||||
class aodh::coordination (
|
||||
$backend_url = $::os_service_default,
|
||||
$heartbeat = $::os_service_default,
|
||||
$heartbeat_interval = $::os_service_default,
|
||||
$retry_backoff = $::os_service_default,
|
||||
$max_retry_interval = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$heartbeat = undef,
|
||||
) {
|
||||
|
||||
include aodh::deps
|
||||
|
||||
$backend_url_real = pick($::aodh::evaluator::coordination_url, $backend_url)
|
||||
|
||||
if $heartbeat != undef {
|
||||
warning('The heartbeat parmaeter is deprecated. Use the heartbeat_interval parameter instead')
|
||||
}
|
||||
$heartbeat_interval_real = pick($heartbeat, $heartbeat_interval)
|
||||
|
||||
oslo::coordination{ 'aodh_config':
|
||||
backend_url => $backend_url_real
|
||||
}
|
||||
|
||||
aodh_config {
|
||||
'coordination/heartbeat': value => $heartbeat;
|
||||
'coordination/heartbeat_interval': value => $heartbeat_interval_real;
|
||||
'coordination/retry_backoff': value => $retry_backoff;
|
||||
'coordination/max_retry_interval': value => $max_retry_interval;
|
||||
}
|
||||
|
||||
# TODO(tkajinam): Remove this when the hearbeat parameter is removed.
|
||||
aodh_config {
|
||||
'coordination/heartbeat': ensure => absent;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The ``aodh::coordination::heartbeat`` parameter has been deprecated. This
|
||||
parameter is left to keep backword compatibility but will be fully
|
||||
replaced by the new ``heartbeat_interval`` parameter.
|
@ -7,7 +7,7 @@ describe 'aodh::coordination' do
|
||||
is_expected.to contain_oslo__coordination('aodh_config').with(
|
||||
:backend_url => '<SERVICE DEFAULT>'
|
||||
)
|
||||
is_expected.to contain_aodh_config('coordination/heartbeat').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('coordination/heartbeat_interval').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('coordination/retry_backoff').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('coordination/max_retry_interval').with_value('<SERVICE DEFAULT>')
|
||||
}
|
||||
@ -17,7 +17,7 @@ describe 'aodh::coordination' do
|
||||
let :params do
|
||||
{
|
||||
:backend_url => 'etcd3+http://127.0.0.1:2379',
|
||||
:heartbeat => 1,
|
||||
:heartbeat_interval => 1,
|
||||
:retry_backoff => 1,
|
||||
:max_retry_interval => 30,
|
||||
}
|
||||
@ -27,7 +27,7 @@ describe 'aodh::coordination' do
|
||||
is_expected.to contain_oslo__coordination('aodh_config').with(
|
||||
:backend_url => 'etcd3+http://127.0.0.1:2379'
|
||||
)
|
||||
is_expected.to contain_aodh_config('coordination/heartbeat').with_value(1)
|
||||
is_expected.to contain_aodh_config('coordination/heartbeat_interval').with_value(1)
|
||||
is_expected.to contain_aodh_config('coordination/retry_backoff').with_value(1)
|
||||
is_expected.to contain_aodh_config('coordination/max_retry_interval').with_value(30)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user