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
This commit is contained in:
Angus Salkeld 2015-03-31 07:55:18 +10:00
parent 34157ca28c
commit 8c5b3589e2
3 changed files with 6 additions and 2 deletions

View File

@ -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 = [

View File

@ -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

View File

@ -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