diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-01-18 22:56:13 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-01-18 22:56:14 +0000 |
commit | ef2dbfae3ab379e6b4375c8cb1890ff84e49e7e1 (patch) | |
tree | dd25fb7a04c1dd78f97f59ba3719b68fde1cea6b /heat | |
parent | f4b8920d11b86c38f53b63d1804895cc8311366a (diff) | |
parent | 775acf52589647014ca916f2f6e43587a20f5f0b (diff) | |
download | heat-ef2dbfae3ab379e6b4375c8cb1890ff84e49e7e1.tar.gz |
Merge "Make minimum default num_engine_workers>=4" into stable/liberty
Diffstat (limited to 'heat')
-rwxr-xr-x | heat/cmd/engine.py | 8 | ||||
-rw-r--r-- | heat/common/config.py | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/heat/cmd/engine.py b/heat/cmd/engine.py index 1574a5a60..bee78f589 100755 --- a/heat/cmd/engine.py +++ b/heat/cmd/engine.py @@ -23,6 +23,7 @@ eventlet.monkey_patch() import sys +from oslo_concurrency import processutils from oslo_config import cfg import oslo_i18n as i18n from oslo_log import log as logging @@ -65,8 +66,11 @@ def main(): profiler.setup('heat-engine', cfg.CONF.host) gmr.TextGuruMeditation.setup_autorun(version) srv = engine.EngineService(cfg.CONF.host, rpc_api.ENGINE_TOPIC) - launcher = service.launch(cfg.CONF, srv, - workers=cfg.CONF.num_engine_workers) + workers = cfg.CONF.num_engine_workers + if not workers: + workers = max(4, processutils.get_worker_count()) + + launcher = service.launch(cfg.CONF, srv, workers=workers) if cfg.CONF.enable_cloud_watch_lite: # We create the periodic tasks here, which mean they are created # only in the parent process when num_engine_workers>1 is specified diff --git a/heat/common/config.py b/heat/common/config.py index b59815e9a..86c9f0e53 100644 --- a/heat/common/config.py +++ b/heat/common/config.py @@ -18,7 +18,6 @@ import logging as sys_logging import os from eventlet.green import socket -from oslo_concurrency import processutils from oslo_config import cfg from oslo_log import log as logging @@ -84,7 +83,6 @@ service_opts = [ default=5, help=_('Maximum depth allowed when using nested stacks.')), cfg.IntOpt('num_engine_workers', - default=processutils.get_worker_count(), help=_('Number of heat-engine processes to fork and run.'))] engine_opts = [ |