Merge "Add scheduler_thread_pool_size configuration"

This commit is contained in:
Zuul 2018-07-17 22:16:06 +00:00 committed by Gerrit Code Review
commit 2776a86a03
4 changed files with 12 additions and 2 deletions

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Added scheduler thread pool size configuration value and changed default
thread pool size for scheduler from 10 to 1000. This fix prevents problems
when a large number of cluster operations are executed simultaneously.

View File

@ -107,6 +107,9 @@ engine_opts = [
default=60,
help=_('Maximum time since last check-in for a service to be '
'considered up.')),
cfg.IntOpt('scheduler_thread_pool_size',
default=1000,
help=_('Maximum number of threads to use for scheduler.')),
]
cfg.CONF.register_opts(engine_opts)

View File

@ -33,7 +33,8 @@ class ThreadGroupManager(object):
def __init__(self):
super(ThreadGroupManager, self).__init__()
self.group = threadgroup.ThreadGroup()
self.group = threadgroup.ThreadGroup(
thread_pool_size=cfg.CONF.scheduler_thread_pool_size)
# Create dummy service task, because when there is nothing queued
# on self.tg the process exits

View File

@ -974,7 +974,7 @@ class TestNode(base.SenlinTestCase):
'FAKE_KEY1': 'FAKE_VALUE1',
'FAKE_KEY2': 'FAKE_VALUE2',
}
final_inputs = jsonutils.dumps(final_dict)
final_inputs = jsonutils.dumps(final_dict, sort_keys=False)
wfc.execution_create.assert_called_once_with('foo', final_inputs)
def test_run_workflow_failed_creation(self):