Merge "Add designate coordination backend url"

This commit is contained in:
Zuul 2020-08-12 20:30:17 +00:00 committed by Gerrit Code Review
commit ab38478bd8
3 changed files with 36 additions and 4 deletions

View File

@ -18,16 +18,40 @@
#
# === Parameters
#
# [*designate_redis_password*]
# (Required) Password for the neutron redis user for the coordination url
# Defaults to hiera('designate_redis_password'),
#
# [*redis_vip*]
# (Required) Redis ip address for the coordination url
# Defaults to hiera('redis_vip'),
#
# [*enable_internal_tls*]
# (Optional) Whether TLS in the internal network is enabled or not.
# Defaults to hiera('enable_internal_tls', false)
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
class tripleo::profile::base::designate::producer (
$step = Integer(hiera('step')),
$designate_redis_password = hiera('designate_redis_password'),
$redis_vip = hiera('redis_vip'),
$enable_internal_tls = hiera('enable_internal_tls', false),
$step = Integer(hiera('step')),
) {
include tripleo::profile::base::designate
if $enable_internal_tls {
$tls_query_param = '?ssl=true'
} else {
$tls_query_param = ''
}
if $step >= 4 {
include designate::producer
class { 'designate::producer':
backend_url => join(['redis://:', $designate_redis_password, '@', normalize_ip_for_uri($redis_vip), ':6379/', $tls_query_param])
}
}
}

View File

@ -0,0 +1,4 @@
---
fixes:
- Designate producers will no longer be deployed in standalone mode and
produce duplicates as they are now configured to coordinate via redis.

View File

@ -31,7 +31,9 @@ eos
context 'with step less than 4' do
let(:params) { {
:step => 1,
:designate_redis_password => 'password',
:redis_vip => '127.0.0.1',
:step => 1,
} }
it {
@ -43,7 +45,9 @@ eos
context 'with step 4' do
let(:params) { {
:step => 4,
:designate_redis_password => 'password',
:redis_vip => '127.0.0.1',
:step => 4,
} }
it {