summaryrefslogtreecommitdiff
path: root/designate/worker/__init__.py
blob: 4e6c9e232c3ca35d0036c0cd7600dead0b636f8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Copyright 2016 Rackspace Inc.
#
# Author: Tim Simmons <tim.simmons@rackspace.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg

CONF = cfg.CONF

worker_group = cfg.OptGroup(
    name='service:worker', title="Configuration for the Worker Service"
)

OPTS = [
    cfg.BoolOpt('enabled', default=True,
                help='Whether to send events to worker instead of '
                     'Pool Manager',
                deprecated_for_removal=True,
                deprecated_reason='In Train, this option will disappear'
                                  'because pool manager will be removed'),
    cfg.IntOpt('workers',
               help='Number of Worker worker processes to spawn'),
    cfg.IntOpt('threads', default=200,
               help='Number of Worker threads to spawn per process'),
    # cfg.ListOpt('enabled_tasks',
    #             help='Enabled tasks to run'),
    cfg.StrOpt('storage-driver', default='sqlalchemy',
               help='The storage driver to use'),
    cfg.IntOpt('threshold-percentage', default=100,
               help='The percentage of servers requiring a successful update '
                    'for a domain change to be considered active'),
    cfg.IntOpt('poll-timeout', default=30,
               help='The time to wait for a response from a server'),
    cfg.IntOpt('poll-retry-interval', default=15,
               help='The time between retrying to send a request and '
                    'waiting for a response from a server'),
    cfg.IntOpt('poll-max-retries', default=10,
               help='The maximum number of times to retry sending a request '
                    'and wait for a response from a server'),
    cfg.IntOpt('poll-delay', default=5,
               help='The time to wait before sending the first request '
                    'to a server'),
    cfg.BoolOpt('notify', default=True,
                help='Whether to allow worker to send NOTIFYs, this will '
                     'noop NOTIFYs in mdns if true'),
    cfg.BoolOpt('export-synchronous', default=True,
                help='Whether to allow synchronous zone exports'),
    cfg.StrOpt('worker_topic', default='worker',
               help='RPC topic for worker component')
]


cfg.CONF.register_group(worker_group)
cfg.CONF.register_opts(OPTS, group=worker_group)


def list_opts():
    yield worker_group, OPTS