diff options
author | Angus Salkeld <asalkeld@mirantis.com> | 2015-03-31 07:55:18 +1000 |
---|---|---|
committer | Angus Salkeld <asalkeld@mirantis.com> | 2015-03-31 07:55:18 +1000 |
commit | 8c5b3589e2a3ff11a25f5bf2cf9ad8cff7c8dbdf (patch) | |
tree | 3453049b7be48648603e759334a7bcef524008ec | |
parent | 34157ca28c1a6a75c92332413888b2a10b8157a5 (diff) | |
download | heat-8c5b3589e2a3ff11a25f5bf2cf9ad8cff7c8dbdf.tar.gz |
Change the default num_engine_workers to get_worker_count()
Now that we have decouple-nested merged, it makes sense
to enable more workers. oslo has a function just for this
processutils.get_worker_count()
Also set the number to 2 for functional tests to
not overly consume too much memory but still test
the multi worker path.
Change-Id: I86d1e8bb1813ccdee959f7a0fe78867dde7d21b5
Closes-bug: 1434339
-rw-r--r-- | heat/common/config.py | 3 | ||||
-rwxr-xr-x | heat_integrationtests/pre_test_hook.sh | 4 | ||||
-rw-r--r-- | requirements.txt | 1 |
3 files changed, 6 insertions, 2 deletions
diff --git a/heat/common/config.py b/heat/common/config.py index 9d4a67b25..7320a63e5 100644 --- a/heat/common/config.py +++ b/heat/common/config.py @@ -18,6 +18,7 @@ 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 +85,7 @@ service_opts = [ default=5, help=_('Maximum depth allowed when using nested stacks.')), cfg.IntOpt('num_engine_workers', - default=1, + default=processutils.get_worker_count(), help=_('Number of heat-engine processes to fork and run.'))] engine_opts = [ diff --git a/heat_integrationtests/pre_test_hook.sh b/heat_integrationtests/pre_test_hook.sh index 2a2d0442e..ba3eb8cc8 100755 --- a/heat_integrationtests/pre_test_hook.sh +++ b/heat_integrationtests/pre_test_hook.sh @@ -17,4 +17,6 @@ localrc_path=$BASE/new/devstack/localrc localconf=$BASE/new/devstack/local.conf echo "HEAT_ENABLE_ADOPT_ABANDON=True" >> $localrc_path -echo -e '[[post-config|$HEAT_CONF]]\n[DEFAULT]\nnotification_driver=messagingv2' >> $localconf +echo -e '[[post-config|$HEAT_CONF]]\n[DEFAULT]\n' >> $localconf +echo -e 'notification_driver=messagingv2\n' >> $localconf +echo -e 'num_engine_workers=2\n' >> $localconf diff --git a/requirements.txt b/requirements.txt index 55f117394..e2db0b192 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,6 +13,7 @@ kombu>=2.5.0 lxml>=2.3 netaddr>=0.7.12 oslo.config>=1.9.3,<1.10.0 # Apache-2.0 +oslo.concurrency>=1.8.0,<1.9.0 # Apache-2.0 oslo.context>=0.2.0,<0.3.0 # Apache-2.0 oslo.db>=1.7.0,<1.8.0 # Apache-2.0 oslo.i18n>=1.5.0,<1.6.0 # Apache-2.0 |