Merge "Designate: format listen addr properly when ipv6"

This commit is contained in:
Zuul 2022-10-04 07:41:19 +00:00 committed by Gerrit Code Review
commit 2b47459f5b

View File

@ -67,6 +67,10 @@ parameters:
conditions:
designate_workers_zero: {equals : [{get_param: DesignateWorkers}, 0]}
enable_sqlalchemy_collectd: {equals : [{get_param: EnableSQLAlchemyCollectd}, true]}
is_ipv6:
equals:
- {get_param: [ServiceData, net_ip_version_map, {get_param: [ServiceNetMap, DesignateMdnsNetwork]}]}
- 6
resources:
@ -126,11 +130,18 @@ outputs:
map_merge:
- get_attr: [DesignateBase, role_data, config_settings]
- designate::mdns::listen:
str_replace:
template:
"%{lookup('$NETWORK')}:5354"
params:
$NETWORK: {get_param: [ServiceNetMap, DesignateMdnsNetwork]}
if:
- is_ipv6
- str_replace:
template:
"[%{lookup('$NETWORK')}]:5354"
params:
$NETWORK: {get_param: [ServiceNetMap, DesignateMdnsNetwork]}
- str_replace:
template:
"%{lookup('$NETWORK')}:5354"
params:
$NETWORK: {get_param: [ServiceNetMap, DesignateMdnsNetwork]}
- designate::db::database_connection:
make_url:
scheme: {get_param: [EndpointMap, MysqlInternal, protocol]}