diff --git a/heat/common/config.py b/heat/common/config.py index 9d4a67b25c..7320a63e52 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 2a2d0442e7..ba3eb8cc8a 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 55f117394b..e2db0b192a 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