From 58212d9b8a7e692d49ae2852f349829355f93a2b Mon Sep 17 00:00:00 2001 From: Satheesh Ulaganathan Date: Wed, 29 Apr 2015 16:07:29 -0700 Subject: [PATCH] Allow configuration of Nova SQLAlchemy options Add variables for the following 3 nova.conf vars: max_overflow (default 10) max_pool_size (default 5) pool_timeout (default 30) This allows for sql tuning to better support bulk operations (boot/delete) with the ability to define custom values in nova.conf based on business needs. Change-Id: Ic427e6822f636a304cbbfaab5ac74a13e912da0f Closes-Bug: #1447389 --- playbooks/roles/os_nova/defaults/main.yml | 3 +++ playbooks/roles/os_nova/templates/nova.conf.j2 | 3 +++ 2 files changed, 6 insertions(+) diff --git a/playbooks/roles/os_nova/defaults/main.yml b/playbooks/roles/os_nova/defaults/main.yml index 7d8fdd9f4c..128a9d372a 100644 --- a/playbooks/roles/os_nova/defaults/main.yml +++ b/playbooks/roles/os_nova/defaults/main.yml @@ -31,6 +31,9 @@ nova_system_home_folder: "/var/lib/{{ nova_system_user_name }}" ## DB nova_galera_user: nova nova_galera_database: nova +nova_db_max_overflow: 10 +nova_db_max_pool_size: 5 +nova_db_pool_timeout: 30 ## RPC nova_rpc_backend: nova.openstack.common.rpc.impl_kombu diff --git a/playbooks/roles/os_nova/templates/nova.conf.j2 b/playbooks/roles/os_nova/templates/nova.conf.j2 index 0b337b1bc6..7316629ebd 100644 --- a/playbooks/roles/os_nova/templates/nova.conf.j2 +++ b/playbooks/roles/os_nova/templates/nova.conf.j2 @@ -177,6 +177,9 @@ check_revocations_for_cached = False {% if inventory_hostname not in groups['nova_compute'] %} [database] connection = mysql://{{ nova_galera_user }}:{{ nova_container_mysql_password }}@{{ galera_address }}/{{ nova_galera_database }}?charset=utf8 +max_overflow = {{ nova_db_max_overflow }} +max_pool_size = {{ nova_db_max_pool_size }} +pool_timeout = {{ nova_db_pool_timeout }} {% endif %}