8e94ec9225
Beginning with the Queens release of OpenStack, idle_timeout in the database config group has been deprecated in favour of connection_recycle_time. Starting with Queens, the database type also changed from 'mysql' to 'mysql+pymysql'. This patch uses the context for database type to also determine idle_timeout vs. connection_recycle_time Change-Id: I875e54bbb0c43a9ad1b7f35c8d17939ca7739244 Closes-Bug: 1857041
10 lines
438 B
Plaintext
10 lines
438 B
Plaintext
{% 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 database_type == "mysql" -%}
|
|
idle_timeout = 3600
|
|
{% else -%}
|
|
connection_recycle_time = 3600
|
|
{% endif -%}
|
|
{% endif -%}
|