diff --git a/defaults/main.yml b/defaults/main.yml index 0a482dae..43e88cf1 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -70,9 +70,11 @@ octavia_galera_user: octavia octavia_galera_database: octavia octavia_galera_use_ssl: "{{ galera_use_ssl | default(False) }}" octavia_galera_ssl_ca_cert: "{{ galera_ssl_ca_cert | default('') }}" -octavia_db_max_overflow: 20 -octavia_db_pool_size: 120 -octavia_db_pool_timeout: 30 +octavia_db_max_overflow: "{{ openstack_db_max_overflow | default('50') }}" +# TODO(damiandabrowski): Remove octavia_db_pool_size in Yoga release +octavia_db_max_pool_size: "{{ openstack_db_max_pool_size | default(octavia_db_pool_size | default('5')) }}" +octavia_db_pool_timeout: "{{ openstack_db_pool_timeout | default('30') }}" +octavia_db_connection_recycle_time: "{{ openstack_db_connection_recycle_time | default('600') }}" octavia_galera_port: "{{ galera_port | default('3306') }}" ## Oslo Messaging diff --git a/releasenotes/notes/db-pooling-15b6222fedc2cb8c.yaml b/releasenotes/notes/db-pooling-15b6222fedc2cb8c.yaml new file mode 100644 index 00000000..36fe8791 --- /dev/null +++ b/releasenotes/notes/db-pooling-15b6222fedc2cb8c.yaml @@ -0,0 +1,7 @@ +--- +deprecations: + - | + For consistency reasons, ``octavia_db_pool_size`` was deprecated in favor of + ``octavia_db_max_pool_size`` which is in a standardized format used in other + repositories. + ``octavia_db_pool_size`` support it will be removed in Yoga release. diff --git a/templates/octavia.conf.j2 b/templates/octavia.conf.j2 index ef597931..7ce280c5 100644 --- a/templates/octavia.conf.j2 +++ b/templates/octavia.conf.j2 @@ -25,11 +25,11 @@ driver = {{ (octavia_ceilometer_enabled | bool) | ternary('messagingv2', 'noop') transport_url = {{ octavia_oslomsg_notify_transport }}://{% for host in octavia_oslomsg_notify_servers.split(',') %}{{ octavia_oslomsg_notify_userid }}:{{ octavia_oslomsg_notify_password }}@{{ host }}:{{ octavia_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ octavia_oslomsg_notify_vhost }}{% if octavia_oslomsg_notify_use_ssl | bool %}?ssl=1&ssl_version={{ octavia_oslomsg_notify_ssl_version }}&ssl_ca_file={{ octavia_oslomsg_notify_ssl_ca_file }}{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} [database] -connection = mysql+pymysql://{{ octavia_galera_user }}:{{ octavia_container_mysql_password }}@{{ octavia_galera_address }}/{{ octavia_galera_database }}?charset=utf8{% if octavia_galera_use_ssl | bool %}&ssl_verify_cert=true{% if octavia_galera_ssl_ca_cert | length > 0 %}&ssl_ca={{ octavia_galera_ssl_ca_cert }}{% endif %}{% endif %} - +connection = mysql+pymysql://{{ octavia_galera_user }}:{{ octavia_container_mysql_password }}@{{ octavia_galera_address }}/{{ octavia_galera_database }}?charset=utf8{% if octavia_galera_use_ssl | bool %}&ssl_verify_cert=true{% if octavia_galera_ssl_ca_cert | length > 0 %}&ssl_ca={{ octavia_galera_ssl_ca_cert }}{% endif %}{% endif +%} max_overflow = {{ octavia_db_max_overflow }} -max_pool_size = {{ octavia_db_pool_size }} +max_pool_size = {{ octavia_db_max_pool_size }} pool_timeout = {{ octavia_db_pool_timeout }} +connection_recycle_time = {{ octavia_db_connection_recycle_time }} [health_manager] bind_ip = 0.0.0.0