aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliyuenan <liyuenan@huawei.com>2017-01-20 13:15:00 +0800
committerliyuenan <liyuenan@huawei.com>2017-01-20 13:29:56 +0800
commite5d3ebef36c73a8bcbad3d0236bdb663809033ea (patch)
treec3c1590789ef509828128e065f9f936111414699
parente479c2ffb9d0375092bb1c4ee9930867140b871e (diff)
FIX access database failed
JIRA: COMPASS-521 Number of separate API worker processes for service. The default is calculated by the number of CPUs available for best performance. But some pods have many CPUs, so that some service API worker processes is too many to access database. For example, huawei-pod2 has 47 CPUs, nova-api has 98 processes, cinder-api has 50 processes and heat-api has 33 processes, when aodh want to initialize the database, mysql can not deal with this processes. Change-Id: I00513883ff55cc28cd676c3085615aaac36eb744 Signed-off-by: liyuenan <liyuenan@huawei.com>
-rw-r--r--deploy/adapters/ansible/openstack/templates/nova.conf4
-rw-r--r--deploy/adapters/ansible/roles/cinder-controller/templates/cinder.conf3
-rw-r--r--deploy/adapters/ansible/roles/heat/templates/heat.j28
-rw-r--r--deploy/adapters/ansible/roles/heat/templates/heat_debian.j228
4 files changed, 15 insertions, 28 deletions
diff --git a/deploy/adapters/ansible/openstack/templates/nova.conf b/deploy/adapters/ansible/openstack/templates/nova.conf
index 4a7bb0a2..99071d78 100644
--- a/deploy/adapters/ansible/openstack/templates/nova.conf
+++ b/deploy/adapters/ansible/openstack/templates/nova.conf
@@ -39,6 +39,10 @@ notification_driver = nova.openstack.common.notifier.rpc_notifier
notification_driver = ceilometer.compute.nova_notifier
memcached_servers = {{ memcached_servers }}
+{% if ansible_processor_vcpus > 30 %}
+osapi_compute_workers = 30
+{% endif %}
+
[database]
# The SQLAlchemy connection string used to connect to the database
connection = mysql://nova:{{ NOVA_DBPASS }}@{{ db_host }}/nova
diff --git a/deploy/adapters/ansible/roles/cinder-controller/templates/cinder.conf b/deploy/adapters/ansible/roles/cinder-controller/templates/cinder.conf
index d428a078..05a1c8fd 100644
--- a/deploy/adapters/ansible/roles/cinder-controller/templates/cinder.conf
+++ b/deploy/adapters/ansible/roles/cinder-controller/templates/cinder.conf
@@ -35,6 +35,9 @@ 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 %}
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 72d4b61e..a7856103 100644
--- a/deploy/adapters/ansible/roles/heat/templates/heat.j2
+++ b/deploy/adapters/ansible/roles/heat/templates/heat.j2
@@ -12,6 +12,14 @@ 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 %}
+
+[heat_api]
+{% if ansible_processor_vcpus > 30 %}
+workers = 30
+{% endif %}
[database]
connection = mysql://heat:{{ HEAT_DBPASS }}@{{ db_host }}/heat
diff --git a/deploy/adapters/ansible/roles/heat/templates/heat_debian.j2 b/deploy/adapters/ansible/roles/heat/templates/heat_debian.j2
deleted file mode 100644
index 62df9fd9..00000000
--- a/deploy/adapters/ansible/roles/heat/templates/heat_debian.j2
+++ /dev/null
@@ -1,28 +0,0 @@
-[DEFAULT]
-heat_metadata_server_url = http://{{ internal_vip.ip }}:8000
-heat_waitcondition_server_url = http://{{ internal_vip.ip }}:8000/v1/waitcondition
-rpc_backend = rabbit
-rabbit_host = {{ rabbit_host }}
-rabbit_userid = {{ RABBIT_USER }}
-rabbit_password = {{ RABBIT_PASS }}
-log_dir = /var/log/heat
-stack_domain_admin = heat_domain_admin
-stack_domain_admin_password = {{ HEAT_PASS }}
-stack_user_domain_name = heat
-
-[database]
-connection = mysql://heat:{{ HEAT_DBPASS }}@{{ db_host }}/heat
-idle_timeout = 30
-use_db_reconnect = True
-pool_timeout = 10
-
-[ec2authtoken]
-auth_uri = http://{{ internal_vip.ip }}:5000/v2.0
-
-[keystone_authtoken]
-auth_uri = http://{{ internal_vip.ip }}:5000/v2.0
-identity_uri = http://{{ internal_vip.ip }}:35357
-admin_tenant_name = service
-admin_user = heat
-admin_password = {{ HEAT_PASS }}
-