Move some options from mdns to worker
... following the migration in designate itself. Depends-on: https://review.opendev.org/c/openstack/designate/+/845508 Change-Id: I6528d7cbae72b8f6f9ae8d26f9258f3b9e82e560
This commit is contained in:
parent
d11f87554d
commit
68ceda6a23
|
@ -36,10 +36,6 @@
|
||||||
# (Optional) mDNS TCP Receive Timeout.
|
# (Optional) mDNS TCP Receive Timeout.
|
||||||
# Defaults to $facts['os_service_default'].
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*all_tcp*]
|
|
||||||
# (Optional) Send all traffic over TCP.
|
|
||||||
# Defaults to $facts['os_service_default'].
|
|
||||||
#
|
|
||||||
# [*query_enforce_tsig*]
|
# [*query_enforce_tsig*]
|
||||||
# (Optional) Enforce all incoming queries (including AXFR) are TSIG signed.
|
# (Optional) Enforce all incoming queries (including AXFR) are TSIG signed.
|
||||||
# Defaults to $facts['os_service_default'].
|
# Defaults to $facts['os_service_default'].
|
||||||
|
@ -60,9 +56,15 @@
|
||||||
# (Optional) RPC topic name for mdns.
|
# (Optional) RPC topic name for mdns.
|
||||||
# Defaults to $facts['os_service_default'].
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
#
|
||||||
|
# [*all_tcp*]
|
||||||
|
# (Optional) Send all traffic over TCP.
|
||||||
|
# Defaults to undef.
|
||||||
|
#
|
||||||
# [*xfr_timeout*]
|
# [*xfr_timeout*]
|
||||||
# (Optional) Timeout in seconds for XFR's.
|
# (Optional) Timeout in seconds for XFR's.
|
||||||
# Defaults to $facts['os_service_default'].
|
# Defaults to undef.
|
||||||
#
|
#
|
||||||
class designate::mdns (
|
class designate::mdns (
|
||||||
$package_ensure = present,
|
$package_ensure = present,
|
||||||
|
@ -73,30 +75,38 @@ class designate::mdns (
|
||||||
$threads = $facts['os_service_default'],
|
$threads = $facts['os_service_default'],
|
||||||
$tcp_backlog = $facts['os_service_default'],
|
$tcp_backlog = $facts['os_service_default'],
|
||||||
$tcp_recv_timeout = $facts['os_service_default'],
|
$tcp_recv_timeout = $facts['os_service_default'],
|
||||||
$all_tcp = $facts['os_service_default'],
|
|
||||||
$query_enforce_tsig = $facts['os_service_default'],
|
$query_enforce_tsig = $facts['os_service_default'],
|
||||||
$storage_driver = $facts['os_service_default'],
|
$storage_driver = $facts['os_service_default'],
|
||||||
$max_message_size = $facts['os_service_default'],
|
$max_message_size = $facts['os_service_default'],
|
||||||
$listen = $facts['os_service_default'],
|
$listen = $facts['os_service_default'],
|
||||||
$topic = $facts['os_service_default'],
|
$topic = $facts['os_service_default'],
|
||||||
$xfr_timeout = $facts['os_service_default'],
|
# DEPRECATED PARAMETERS
|
||||||
|
$all_tcp = undef,
|
||||||
|
$xfr_timeout = undef,
|
||||||
) inherits designate::params {
|
) inherits designate::params {
|
||||||
|
|
||||||
include designate::deps
|
include designate::deps
|
||||||
include designate::db
|
include designate::db
|
||||||
|
|
||||||
|
['all_tcp', 'xfr_timeout'].each |$opt| {
|
||||||
|
if getvar($opt) != undef {
|
||||||
|
warning("The designate::mdns::${opt} parameter is deprecated. \
|
||||||
|
Use the designate::worker::${opt} parameter instead.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
designate_config {
|
designate_config {
|
||||||
'service:mdns/workers' : value => $workers;
|
'service:mdns/workers' : value => $workers;
|
||||||
'service:mdns/threads' : value => $threads;
|
'service:mdns/threads' : value => $threads;
|
||||||
'service:mdns/tcp_backlog' : value => $tcp_backlog;
|
'service:mdns/tcp_backlog' : value => $tcp_backlog;
|
||||||
'service:mdns/tcp_recv_timeout' : value => $tcp_recv_timeout;
|
'service:mdns/tcp_recv_timeout' : value => $tcp_recv_timeout;
|
||||||
'service:mdns/all_tcp' : value => $all_tcp;
|
'service:mdns/all_tcp' : value => pick($all_tcp, $facts['os_service_default']);
|
||||||
'service:mdns/query_enforce_tsig' : value => $query_enforce_tsig;
|
'service:mdns/query_enforce_tsig' : value => $query_enforce_tsig;
|
||||||
'service:mdns/storage_driver' : value => $storage_driver;
|
'service:mdns/storage_driver' : value => $storage_driver;
|
||||||
'service:mdns/max_message_size' : value => $max_message_size;
|
'service:mdns/max_message_size' : value => $max_message_size;
|
||||||
'service:mdns/listen' : value => join(any2array($listen), ',');
|
'service:mdns/listen' : value => join(any2array($listen), ',');
|
||||||
'service:mdns/topic' : value => $topic;
|
'service:mdns/topic' : value => $topic;
|
||||||
'service:mdns/xfr_timeout' : value => $xfr_timeout;
|
'service:mdns/xfr_timeout' : value => pick($xfr_timeout, $facts['os_service_default']);
|
||||||
}
|
}
|
||||||
|
|
||||||
designate::generic_service { 'mdns':
|
designate::generic_service { 'mdns':
|
||||||
|
|
|
@ -56,6 +56,14 @@
|
||||||
# (optional) RPC topic for worker component.
|
# (optional) RPC topic for worker component.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
|
# [*xfr_timeout*]
|
||||||
|
# (Optional) Timeout in seconds for XFR's.
|
||||||
|
# Defaults to $facts['os_service_default']
|
||||||
|
#
|
||||||
|
# [*all_tcp*]
|
||||||
|
# (Optional) Send all traffic over TCP.
|
||||||
|
# Defaults to $facts['os_service_default']
|
||||||
|
#
|
||||||
class designate::worker(
|
class designate::worker(
|
||||||
$package_ensure = present,
|
$package_ensure = present,
|
||||||
$worker_package_name = $::designate::params::worker_package_name,
|
$worker_package_name = $::designate::params::worker_package_name,
|
||||||
|
@ -70,6 +78,8 @@ class designate::worker(
|
||||||
$poll_delay = $facts['os_service_default'],
|
$poll_delay = $facts['os_service_default'],
|
||||||
$export_synchronous = $facts['os_service_default'],
|
$export_synchronous = $facts['os_service_default'],
|
||||||
$topic = $facts['os_service_default'],
|
$topic = $facts['os_service_default'],
|
||||||
|
$xfr_timeout = $facts['os_service_default'],
|
||||||
|
$all_tcp = $facts['os_service_default'],
|
||||||
) inherits designate::params {
|
) inherits designate::params {
|
||||||
|
|
||||||
include designate::deps
|
include designate::deps
|
||||||
|
@ -92,5 +102,7 @@ class designate::worker(
|
||||||
'service:worker/poll_delay': value => $poll_delay;
|
'service:worker/poll_delay': value => $poll_delay;
|
||||||
'service:worker/export_synchronous': value => $export_synchronous;
|
'service:worker/export_synchronous': value => $export_synchronous;
|
||||||
'service:worker/topic': value => $topic;
|
'service:worker/topic': value => $topic;
|
||||||
|
'service:worker/xfr_timeout': value => $xfr_timeout;
|
||||||
|
'service:worker/all_tcp': value => $all_tcp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
The following parameters of the ``designate::mdns`` class have been
|
||||||
|
deprecated. Use the same prameters of the ``designate::worker`` class.
|
||||||
|
|
||||||
|
- ``all_tcp``
|
||||||
|
- ``xfer_timeout``
|
|
@ -23,6 +23,8 @@ describe 'designate::worker' do
|
||||||
:poll_delay => 1,
|
:poll_delay => 1,
|
||||||
:export_synchronous => true,
|
:export_synchronous => true,
|
||||||
:topic => 'topic',
|
:topic => 'topic',
|
||||||
|
:xfr_timeout => 10,
|
||||||
|
:all_tcp => true,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -54,6 +56,8 @@ describe 'designate::worker' do
|
||||||
is_expected.to contain_designate_config('service:worker/poll_delay').with_value( '<SERVICE DEFAULT>' )
|
is_expected.to contain_designate_config('service:worker/poll_delay').with_value( '<SERVICE DEFAULT>' )
|
||||||
is_expected.to contain_designate_config('service:worker/export_synchronous').with_value( '<SERVICE DEFAULT>' )
|
is_expected.to contain_designate_config('service:worker/export_synchronous').with_value( '<SERVICE DEFAULT>' )
|
||||||
is_expected.to contain_designate_config('service:worker/topic').with_value( '<SERVICE DEFAULT>' )
|
is_expected.to contain_designate_config('service:worker/topic').with_value( '<SERVICE DEFAULT>' )
|
||||||
|
is_expected.to contain_designate_config('service:worker/xfr_timeout').with_value( '<SERVICE DEFAULT>' )
|
||||||
|
is_expected.to contain_designate_config('service:worker/all_tcp').with_value( '<SERVICE DEFAULT>' )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -86,6 +90,8 @@ describe 'designate::worker' do
|
||||||
is_expected.to contain_designate_config('service:worker/poll_delay').with_value( params[:poll_delay] )
|
is_expected.to contain_designate_config('service:worker/poll_delay').with_value( params[:poll_delay] )
|
||||||
is_expected.to contain_designate_config('service:worker/export_synchronous').with_value( params[:export_synchronous] )
|
is_expected.to contain_designate_config('service:worker/export_synchronous').with_value( params[:export_synchronous] )
|
||||||
is_expected.to contain_designate_config('service:worker/topic').with_value( params[:topic] )
|
is_expected.to contain_designate_config('service:worker/topic').with_value( params[:topic] )
|
||||||
|
is_expected.to contain_designate_config('service:worker/xfr_timeout').with_value( params[:xfr_timeout] )
|
||||||
|
is_expected.to contain_designate_config('service:worker/all_tcp').with_value( params[:all_tcp] )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue