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/roles | |
parent | f80d7239a4d0caba934f14dcb541dff387539378 (diff) | |
parent | 744d6f99424491429b0a307c9f85e2ae50a8826a (diff) |
Merge "FIX access database failed"
Diffstat (limited to 'deploy/adapters/ansible/roles')
-rw-r--r-- | deploy/adapters/ansible/roles/cinder-controller/templates/cinder.conf | 9 | ||||
-rw-r--r-- | deploy/adapters/ansible/roles/heat/templates/heat.j2 | 13 |
2 files changed, 13 insertions, 9 deletions
diff --git a/deploy/adapters/ansible/roles/cinder-controller/templates/cinder.conf b/deploy/adapters/ansible/roles/cinder-controller/templates/cinder.conf index 05a1c8fd..8b035653 100644 --- a/deploy/adapters/ansible/roles/cinder-controller/templates/cinder.conf +++ b/deploy/adapters/ansible/roles/cinder-controller/templates/cinder.conf @@ -3,6 +3,11 @@ {% set _ = memcached_servers.append('%s:11211'% host) %} {% endfor %} {% set memcached_servers = memcached_servers|join(',') %} +{% if ansible_processor_vcpus > 5 %} +{% set api_workers = ansible_processor_vcpus // 5 %} +{% else %} +{% set api_workers = 1 %} +{% endif %} [DEFAULT] rootwrap_config = /etc/cinder/rootwrap.conf @@ -35,9 +40,7 @@ quota_driver = cinder.quota.DbQuotaDriver osapi_volume_listen = {{ storage_controller_host }} osapi_volume_listen_port = 8776 -{% if ansible_processor_vcpus > 30 %} -osapi_volume_workers = 30 -{% endif %} +osapi_volume_workers = {{ api_workers }} db_backend = sqlalchemy volume_name_template = volume-%s diff --git a/deploy/adapters/ansible/roles/heat/templates/heat.j2 b/deploy/adapters/ansible/roles/heat/templates/heat.j2 index a7856103..d73bd70b 100644 --- a/deploy/adapters/ansible/roles/heat/templates/heat.j2 +++ b/deploy/adapters/ansible/roles/heat/templates/heat.j2 @@ -3,6 +3,11 @@ {% set _ = memcached_servers.append('%s:11211'% host) %} {% endfor %} {% set memcached_servers = memcached_servers|join(',') %} +{% if ansible_processor_vcpus > 5 %} +{% set api_workers = ansible_processor_vcpus // 5 %} +{% else %} +{% set api_workers = 1 %} +{% endif %} [DEFAULT] heat_metadata_server_url = http://{{ internal_vip.ip }}:8000 @@ -12,14 +17,10 @@ log_dir = /var/log/heat stack_domain_admin = heat_domain_admin stack_domain_admin_password = {{ HEAT_PASS }} stack_user_domain_name = heat -{% if ansible_processor_vcpus > 30 %} -num_engine_workers = 30 -{% endif %} +num_engine_workers = {{ api_workers}} [heat_api] -{% if ansible_processor_vcpus > 30 %} -workers = 30 -{% endif %} +workers = {{ api_workers }} [database] connection = mysql://heat:{{ HEAT_DBPASS }}@{{ db_host }}/heat |