Merge "Enable mutable config in Watcher"

This commit is contained in:
Zuul
2018-04-16 11:39:39 +00:00
committed by Gerrit Code Review
4 changed files with 7 additions and 1 deletions

View File

@@ -289,7 +289,7 @@ class Service(service.ServiceBase):
return api_manager_version return api_manager_version
def launch(conf, service_, workers=1, restart_method='reload'): def launch(conf, service_, workers=1, restart_method='mutate'):
return service.launch(conf, service_, workers, restart_method) return service.launch(conf, service_, workers, restart_method)

View File

@@ -44,18 +44,21 @@ WATCHER_DECISION_ENGINE_OPTS = [
'execute strategies'), 'execute strategies'),
cfg.IntOpt('action_plan_expiry', cfg.IntOpt('action_plan_expiry',
default=24, default=24,
mutable=True,
help='An expiry timespan(hours). Watcher invalidates any ' help='An expiry timespan(hours). Watcher invalidates any '
'action plan for which its creation time ' 'action plan for which its creation time '
'-whose number of hours has been offset by this value-' '-whose number of hours has been offset by this value-'
' is older that the current time.'), ' is older that the current time.'),
cfg.IntOpt('check_periodic_interval', cfg.IntOpt('check_periodic_interval',
default=30 * 60, default=30 * 60,
mutable=True,
help='Interval (in seconds) for checking action plan expiry.') help='Interval (in seconds) for checking action plan expiry.')
] ]
WATCHER_CONTINUOUS_OPTS = [ WATCHER_CONTINUOUS_OPTS = [
cfg.IntOpt('continuous_audit_interval', cfg.IntOpt('continuous_audit_interval',
default=10, default=10,
mutable=True,
help='Interval (in seconds) for checking newly created ' help='Interval (in seconds) for checking newly created '
'continuous audits.') 'continuous audits.')
] ]

View File

@@ -32,9 +32,11 @@ GNOCCHI_CLIENT_OPTS = [
'The default is public.'), 'The default is public.'),
cfg.IntOpt('query_max_retries', cfg.IntOpt('query_max_retries',
default=10, default=10,
mutable=True,
help='How many times Watcher is trying to query again'), help='How many times Watcher is trying to query again'),
cfg.IntOpt('query_timeout', cfg.IntOpt('query_timeout',
default=1, default=1,
mutable=True,
help='How many seconds Watcher should wait to do query again')] help='How many seconds Watcher should wait to do query again')]

View File

@@ -25,6 +25,7 @@ from watcher._i18n import _
SERVICE_OPTS = [ SERVICE_OPTS = [
cfg.IntOpt('periodic_interval', cfg.IntOpt('periodic_interval',
default=60, default=60,
mutable=True,
help=_('Seconds between running periodic tasks.')), help=_('Seconds between running periodic tasks.')),
cfg.HostAddressOpt('host', cfg.HostAddressOpt('host',
default=socket.gethostname(), default=socket.gethostname(),