Add database pool size/overflow config options
Introduces two new config options, 'db-max-pool-size' and 'db-max-overflow', allowing charms to configure oslo.db connection pool behaviour when rendering database connection settings. Closes-Bug: #2132315 Change-Id: I5c4088b631c5a5b6ed99b621b0ee245576307e0f Signed-off-by: Raven Kaur <raven.kaur@canonical.com>
This commit is contained in:
1 parent
13c9c7eff9
commit
622f3a163d
3 files changed
+20
No files matched your search
+13
@@ -112,6 +112,19 @@ options:
|
||||
type: string
|
||||
default: neutron
|
||||
description: Database name for Neutron (if enabled).
|
||||
db-max-pool-size:
|
||||
type: int
|
||||
default:
|
||||
description: |
|
||||
Optional override for the maximum number of SQL connections to keep
|
||||
open in a pool. Leave unset to use the service default. Setting a
|
||||
value of 0 indicates no limit.
|
||||
db-max-overflow:
|
||||
type: int
|
||||
default:
|
||||
description: |
|
||||
Optional override for the maximum number of connections to allow for
|
||||
connection pool overflow. Leave unset to use the service default.
|
||||
region:
|
||||
type: string
|
||||
default: RegionOne
|
||||
|
||||
@@ -188,6 +188,7 @@ BASE_RESOURCE_MAP = OrderedDict([
|
||||
context.WorkerConfigContext(),
|
||||
context.InternalEndpointContext(),
|
||||
context.MemcacheContext(),
|
||||
context.OsloDBContext(),
|
||||
neutron_api_context.DesignateContext(),
|
||||
neutron_api_context.NeutronInfobloxContext(),
|
||||
context.KeystoneAuditMiddleware(service=SERVICE)],
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{% if database_host -%}
|
||||
[database]
|
||||
connection = {{ database_type }}://{{ database_user }}:{{ database_password }}@{{ database_host }}/{{ database }}{% if database_ssl_ca %}?ssl_ca={{ database_ssl_ca }}{% if database_ssl_cert %}&ssl_cert={{ database_ssl_cert }}&ssl_key={{ database_ssl_key }}{% endif %}{% endif %}
|
||||
{% if db_max_pool_size is number %}
|
||||
max_pool_size = {{ db_max_pool_size }}
|
||||
{% endif %}
|
||||
{% if db_max_overflow is number %}
|
||||
max_overflow = {{ db_max_overflow }}
|
||||
{% endif %}
|
||||
{% endif -%}
|
||||
Reference in new issue
Block a user