Merge "Enable mutable config in Masakari"
This commit is contained in:
commit
ccc3f93026
@ -90,6 +90,7 @@ notification_opts = [
|
||||
'are in error or new state.'),
|
||||
cfg.IntOpt('retry_notification_new_status_interval',
|
||||
default=60,
|
||||
mutable=True,
|
||||
help="Interval in seconds for identifying notifications which "
|
||||
"are in new state. If the notification is in new state "
|
||||
"till this config option value after it's "
|
||||
|
@ -271,7 +271,7 @@ class WSGIService(service.Service):
|
||||
|
||||
|
||||
def process_launcher():
|
||||
return service.ProcessLauncher(CONF)
|
||||
return service.ProcessLauncher(CONF, restart_method='mutate')
|
||||
|
||||
|
||||
# NOTE: the global launcher is to maintain the existing
|
||||
@ -285,7 +285,8 @@ def serve(server, workers=None):
|
||||
if _launcher:
|
||||
raise RuntimeError(_('serve() can only be called once'))
|
||||
|
||||
_launcher = service.launch(CONF, server, workers=workers)
|
||||
_launcher = service.launch(CONF, server, workers=workers,
|
||||
restart_method='mutate')
|
||||
|
||||
|
||||
def wait():
|
||||
|
@ -160,7 +160,8 @@ class TestLauncher(test.NoDBTestCase):
|
||||
service.serve(mock.sentinel.service)
|
||||
mock_launch.assert_called_once_with(mock.ANY,
|
||||
mock.sentinel.service,
|
||||
workers=None)
|
||||
workers=None,
|
||||
restart_method='mutate')
|
||||
|
||||
@mock.patch.object(_service, 'launch')
|
||||
def test_launch_app_with_workers(self, mock_launch):
|
||||
@ -168,7 +169,8 @@ class TestLauncher(test.NoDBTestCase):
|
||||
service.serve(mock.sentinel.service, workers=mock.sentinel.workers)
|
||||
mock_launch.assert_called_once_with(mock.ANY,
|
||||
mock.sentinel.service,
|
||||
workers=mock.sentinel.workers)
|
||||
workers=mock.sentinel.workers,
|
||||
restart_method='mutate')
|
||||
|
||||
@mock.patch.object(_service, 'launch')
|
||||
def test_launch_app_more_than_once_raises(self, mock_launch):
|
||||
|
@ -0,0 +1,8 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Masakari has been enabled for mutable config.
|
||||
Below option may be reloaded by sending SIGHUP to the correct process.
|
||||
|
||||
'retry_notification_new_status_interval' option will apply to process
|
||||
unfinished notifications.
|
Loading…
Reference in New Issue
Block a user