diff options
author | Justin chi <chigang@huawei.com> | 2017-02-20 11:34:43 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-02-20 11:34:43 +0000 |
commit | a09ff1b112a52d8fbf167fb6e02fcbbd8be421b8 (patch) | |
tree | 791bf6d7c8d0c1819740b3c5aecdfd03a162114b /deploy/adapters/ansible/openstack | |
parent | f80d7239a4d0caba934f14dcb541dff387539378 (diff) | |
parent | 744d6f99424491429b0a307c9f85e2ae50a8826a (diff) |
Merge "FIX access database failed"
Diffstat (limited to 'deploy/adapters/ansible/openstack')
-rw-r--r-- | deploy/adapters/ansible/openstack/templates/nova.conf | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/deploy/adapters/ansible/openstack/templates/nova.conf b/deploy/adapters/ansible/openstack/templates/nova.conf index b648b030..3cd2c03b 100644 --- a/deploy/adapters/ansible/openstack/templates/nova.conf +++ b/deploy/adapters/ansible/openstack/templates/nova.conf @@ -3,6 +3,11 @@ {% set _ = memcached_servers.append('%s:11211'% host) %} {% endfor %} {% set memcached_servers = memcached_servers|join(',') %} +{% if ansible_processor_vcpus > 10 %} +{% set api_workers = ansible_processor_vcpus // 10 %} +{% else %} +{% set api_workers = 1 %} +{% endif %} [DEFAULT] dhcpbridge_flagfile=/etc/nova/nova.conf @@ -38,11 +43,8 @@ notify_on_state_change = vm_and_task_state notification_driver = nova.openstack.common.notifier.rpc_notifier notification_driver = ceilometer.compute.nova_notifier memcached_servers = {{ memcached_servers }} - -{% if ansible_processor_vcpus > 20 %} -osapi_compute_workers = 20 -metadata_workers = 20 -{% endif %} +osapi_compute_workers = {{ api_workers }} +metadata_workers = {{ api_workers }} [database] # The SQLAlchemy connection string used to connect to the database |