Merge "Use (# of CPUs) api/conductor workers by default"
This commit is contained in:
commit
6f5c7db76c
@ -11,8 +11,9 @@ bind_host = 0.0.0.0
|
||||
# Port the bind the API server to
|
||||
bind_port = 8779
|
||||
|
||||
# Number of child processes to run
|
||||
#trove_api_workers=5
|
||||
# Number of workers for the API service. The default will
|
||||
# be the number of CPUs available. (integer value)
|
||||
#trove_api_workers=None
|
||||
|
||||
# The RabbitMQ broker address where a single node is used.
|
||||
# (string value)
|
||||
|
@ -34,8 +34,9 @@ bind_host = 0.0.0.0
|
||||
# Port the bind the API server to
|
||||
bind_port = 8779
|
||||
|
||||
# Number of child processes to run
|
||||
#trove_api_workers=5
|
||||
# Number of workers for the API service. The default will
|
||||
# be the number of CPUs available. (integer value)
|
||||
#trove_api_workers=None
|
||||
|
||||
# AMQP Connection info
|
||||
rabbit_password=f7999d1955c5014aa32c
|
||||
|
@ -13,12 +13,14 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from trove.cmd.common import with_initialize
|
||||
from trove.openstack.common import processutils
|
||||
|
||||
|
||||
@with_initialize
|
||||
def main(CONF):
|
||||
from trove.common import wsgi
|
||||
conf_file = CONF.find_file(CONF.api_paste_config)
|
||||
workers = CONF.trove_api_workers or processutils.get_worker_count()
|
||||
launcher = wsgi.launch('trove', CONF.bind_port or 8779, conf_file,
|
||||
workers=CONF.trove_api_workers)
|
||||
workers=workers)
|
||||
launcher.wait()
|
||||
|
@ -13,6 +13,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from trove.cmd.common import with_initialize
|
||||
from trove.openstack.common import processutils
|
||||
|
||||
|
||||
@with_initialize
|
||||
@ -23,6 +24,6 @@ def main(conf):
|
||||
topic = conf.conductor_queue
|
||||
server = rpc_service.RpcService(manager=conf.conductor_manager,
|
||||
topic=topic)
|
||||
launcher = openstack_service.launch(server,
|
||||
workers=conf.trove_conductor_workers)
|
||||
workers = conf.trove_conductor_workers or processutils.get_worker_count()
|
||||
launcher = openstack_service.launch(server, workers=workers)
|
||||
launcher.wait()
|
||||
|
@ -14,6 +14,7 @@
|
||||
# under the License.
|
||||
from oslo.config import cfg as openstack_cfg
|
||||
from trove.cmd.common import with_initialize
|
||||
from trove.openstack.common import processutils
|
||||
|
||||
|
||||
opts = [
|
||||
@ -57,7 +58,8 @@ def start_fake_taskmanager(conf):
|
||||
def start_server(conf):
|
||||
from trove.common import wsgi
|
||||
conf_file = conf.find_file(conf.api_paste_config)
|
||||
workers = conf.trove_api_workers or processutils.get_worker_count()
|
||||
launcher = wsgi.launch('trove', conf.bind_port or 8779, conf_file,
|
||||
workers=conf.trove_api_workers)
|
||||
workers=workers)
|
||||
start_fake_taskmanager(conf)
|
||||
launcher.wait()
|
||||
|
@ -119,7 +119,9 @@ common_opts = [
|
||||
help='Default driver to use for quota checks.'),
|
||||
cfg.StrOpt('taskmanager_queue', default='taskmanager'),
|
||||
cfg.StrOpt('conductor_queue', default='trove-conductor'),
|
||||
cfg.IntOpt('trove_conductor_workers', default=1),
|
||||
cfg.IntOpt('trove_conductor_workers',
|
||||
help="Number of workers for the Conductor service. The default "
|
||||
"will be the number of CPUs available."),
|
||||
cfg.BoolOpt('use_nova_server_volume', default=False),
|
||||
cfg.BoolOpt('use_heat', default=False),
|
||||
cfg.StrOpt('device_path', default='/dev/vdb'),
|
||||
@ -151,7 +153,9 @@ common_opts = [
|
||||
cfg.BoolOpt('trove_security_groups_support', default=True),
|
||||
cfg.StrOpt('trove_security_group_name_prefix', default='SecGroup'),
|
||||
cfg.StrOpt('trove_security_group_rule_cidr', default='0.0.0.0/0'),
|
||||
cfg.IntOpt('trove_api_workers', default=None),
|
||||
cfg.IntOpt('trove_api_workers',
|
||||
help="Number of workers for the API service. The default will "
|
||||
"be the number of CPUs available."),
|
||||
cfg.IntOpt('usage_sleep_time', default=5,
|
||||
help='Time to sleep during the check active guest.'),
|
||||
cfg.StrOpt('region', default='LOCAL_DEV',
|
||||
|
Loading…
Reference in New Issue
Block a user