From 17889420fc81fe3d47288085040fa48feeb19a37 Mon Sep 17 00:00:00 2001 From: Georgiy Kutsurua Date: Tue, 5 Dec 2017 15:52:57 +0400 Subject: [PATCH] Fix database engine --- glance/files/mitaka/glance-api.conf.Debian | 2 +- glance/files/mitaka/glance-registry.conf.Debian | 2 +- glance/files/newton/glance-api.conf.Debian | 2 +- glance/files/newton/glance-glare.conf.Debian | 2 +- glance/files/newton/glance-registry.conf.Debian | 2 +- glance/files/ocata/glance-api.conf.Debian | 2 +- glance/files/ocata/glance-glare.conf.Debian | 2 +- glance/files/ocata/glance-registry.conf.Debian | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/glance/files/mitaka/glance-api.conf.Debian b/glance/files/mitaka/glance-api.conf.Debian index 50ebbdd..4ab6953 100644 --- a/glance/files/mitaka/glance-api.conf.Debian +++ b/glance/files/mitaka/glance-api.conf.Debian @@ -688,7 +688,7 @@ backend = sqlalchemy # Deprecated group/name - [DATABASE]/sql_connection # Deprecated group/name - [sql]/connection #connection = -connection = {{ server.database.engine }}+pymysql://{{ server.database.user }}:{{ server.database.password }}@{{ server.database.host }}/{{ server.database.name }}{%- if server.database.get('ssl',{}).get('enabled',False) %}?ssl_ca={{ server.database.ssl.get('cacert_file', system_cacerts_file) }}{% endif %} +connection = {%- if server.database.engine == 'mysql' -%}{{ server.database.engine }}+pymysql{%- else -%}{{ server.database.engine }}{%- endif -%}://{{ server.database.user }}:{{ server.database.password }}@{{ server.database.host }}/{{ server.database.name }}{%- if server.database.get('ssl',{}).get('enabled',False) %}?ssl_ca={{ server.database.ssl.get('cacert_file', system_cacerts_file) }}{% endif %} # The SQLAlchemy connection string to use to connect to the slave # database. (string value) diff --git a/glance/files/mitaka/glance-registry.conf.Debian b/glance/files/mitaka/glance-registry.conf.Debian index 3a2e8fb..1d617c0 100644 --- a/glance/files/mitaka/glance-registry.conf.Debian +++ b/glance/files/mitaka/glance-registry.conf.Debian @@ -391,7 +391,7 @@ backend = sqlalchemy # Deprecated group/name - [DATABASE]/sql_connection # Deprecated group/name - [sql]/connection #connection = -connection = {{ server.database.engine }}+pymysql://{{ server.database.user }}:{{ server.database.password }}@{{ server.database.host }}/{{ server.database.name }}{%- if server.database.get('ssl',{}).get('enabled',False) %}?ssl_ca={{ server.database.ssl.get('cacert_file', system_cacerts_file) }}{% endif %} +connection = {%- if server.database.engine == 'mysql' -%}{{ server.database.engine }}+pymysql{%- else -%}{{ server.database.engine }}{%- endif -%}://{{ server.database.user }}:{{ server.database.password }}@{{ server.database.host }}/{{ server.database.name }}{%- if server.database.get('ssl',{}).get('enabled',False) %}?ssl_ca={{ server.database.ssl.get('cacert_file', system_cacerts_file) }}{% endif %} # The SQLAlchemy connection string to use to connect to the slave # database. (string value) diff --git a/glance/files/newton/glance-api.conf.Debian b/glance/files/newton/glance-api.conf.Debian index 881a62f..a8e4a16 100644 --- a/glance/files/newton/glance-api.conf.Debian +++ b/glance/files/newton/glance-api.conf.Debian @@ -1810,7 +1810,7 @@ backend = sqlalchemy # Deprecated group/name - [DATABASE]/sql_connection # Deprecated group/name - [sql]/connection #connection = -connection = {{ server.database.engine }}+pymysql://{{ server.database.user }}:{{ server.database.password }}@{{ server.database.host }}/{{ server.database.name }}{%- if server.database.get('ssl',{}).get('enabled',False) %}?ssl_ca={{ server.database.ssl.get('cacert_file', system_cacerts_file) }}{% endif %} +connection = {%- if server.database.engine == 'mysql' -%}{{ server.database.engine }}+pymysql{%- else -%}{{ server.database.engine }}{%- endif -%}://{{ server.database.user }}:{{ server.database.password }}@{{ server.database.host }}/{{ server.database.name }}{%- if server.database.get('ssl',{}).get('enabled',False) %}?ssl_ca={{ server.database.ssl.get('cacert_file', system_cacerts_file) }}{% endif %} # The SQLAlchemy connection string to use to connect to the slave database. diff --git a/glance/files/newton/glance-glare.conf.Debian b/glance/files/newton/glance-glare.conf.Debian index 0076336..2648dff 100644 --- a/glance/files/newton/glance-glare.conf.Debian +++ b/glance/files/newton/glance-glare.conf.Debian @@ -567,7 +567,7 @@ log_dir = /var/log/glance # Deprecated group/name - [DATABASE]/sql_connection # Deprecated group/name - [sql]/connection #connection = -connection = {{ server.database.engine }}+pymysql://{{ server.database.user }}:{{ server.database.password }}@{{ server.database.host }}/{{ server.database.name }}?charset=utf8&read_timeout=60{%- if server.database.get('ssl',{}).get('enabled',False) %}&ssl_ca={{ server.database.ssl.get('cacert_file', system_cacerts_file) }}{% endif %} +connection = {%- if server.database.engine == 'mysql' -%}{{ server.database.engine }}+pymysql{%- else -%}{{ server.database.engine }}{%- endif -%}://{{ server.database.user }}:{{ server.database.password }}@{{ server.database.host }}/{{ server.database.name }}?charset=utf8&read_timeout=60{%- if server.database.get('ssl',{}).get('enabled',False) %}&ssl_ca={{ server.database.ssl.get('cacert_file', system_cacerts_file) }}{% endif %} # The SQLAlchemy connection string to use to connect to the slave database. diff --git a/glance/files/newton/glance-registry.conf.Debian b/glance/files/newton/glance-registry.conf.Debian index 7615b05..13815f6 100644 --- a/glance/files/newton/glance-registry.conf.Debian +++ b/glance/files/newton/glance-registry.conf.Debian @@ -1058,7 +1058,7 @@ backend = sqlalchemy # Deprecated group/name - [DATABASE]/sql_connection # Deprecated group/name - [sql]/connection #connection = -connection = {{ server.database.engine }}+pymysql://{{ server.database.user }}:{{ server.database.password }}@{{ server.database.host }}/{{ server.database.name }}{%- if server.database.get('ssl',{}).get('enabled',False) %}?ssl_ca={{ server.database.ssl.get('cacert_file', system_cacerts_file) }}{% endif %} +connection = {%- if server.database.engine == 'mysql' -%}{{ server.database.engine }}+pymysql{%- else -%}{{ server.database.engine }}{%- endif -%}://{{ server.database.user }}:{{ server.database.password }}@{{ server.database.host }}/{{ server.database.name }}{%- if server.database.get('ssl',{}).get('enabled',False) %}?ssl_ca={{ server.database.ssl.get('cacert_file', system_cacerts_file) }}{% endif %} # The SQLAlchemy connection string to use to connect to the slave database. diff --git a/glance/files/ocata/glance-api.conf.Debian b/glance/files/ocata/glance-api.conf.Debian index c2533c3..00029a3 100644 --- a/glance/files/ocata/glance-api.conf.Debian +++ b/glance/files/ocata/glance-api.conf.Debian @@ -1876,7 +1876,7 @@ backend = sqlalchemy # Deprecated group/name - [DATABASE]/sql_connection # Deprecated group/name - [sql]/connection #connection = -connection = {{ server.database.engine }}+pymysql://{{ server.database.user }}:{{ server.database.password }}@{{ server.database.host }}/{{ server.database.name }}{%- if server.database.get('ssl',{}).get('enabled',False) %}?ssl_ca={{ server.database.ssl.get('cacert_file', system_cacerts_file) }}{% endif %} +connection = {%- if server.database.engine == 'mysql' -%}{{ server.database.engine }}+pymysql{%- else -%}{{ server.database.engine }}{%- endif -%}://{{ server.database.user }}:{{ server.database.password }}@{{ server.database.host }}/{{ server.database.name }}{%- if server.database.get('ssl',{}).get('enabled',False) %}?ssl_ca={{ server.database.ssl.get('cacert_file', system_cacerts_file) }}{% endif %} # The SQLAlchemy connection string to use to connect to the slave database. # (string value) diff --git a/glance/files/ocata/glance-glare.conf.Debian b/glance/files/ocata/glance-glare.conf.Debian index e688edf..1f30635 100644 --- a/glance/files/ocata/glance-glare.conf.Debian +++ b/glance/files/ocata/glance-glare.conf.Debian @@ -567,7 +567,7 @@ log_dir = /var/log/glance # Deprecated group/name - [DATABASE]/sql_connection # Deprecated group/name - [sql]/connection #connection = -connection = {{ server.database.engine }}+pymysql://{{ server.database.user }}:{{ server.database.password }}@{{ server.database.host }}/{{ server.database.name }}?charset=utf8&read_timeout=60{%- if server.database.get('ssl',{}).get('enabled',False) %}&ssl_ca={{ server.database.ssl.get('cacert_file', system_cacerts_file) }}{% endif %} +connection = {%- if server.database.engine == 'mysql' -%}{{ server.database.engine }}+pymysql{%- else -%}{{ server.database.engine }}{%- endif -%}://{{ server.database.user }}:{{ server.database.password }}@{{ server.database.host }}/{{ server.database.name }}?charset=utf8&read_timeout=60{%- if server.database.get('ssl',{}).get('enabled',False) %}&ssl_ca={{ server.database.ssl.get('cacert_file', system_cacerts_file) }}{% endif %} # The SQLAlchemy connection string to use to connect to the slave database. # (string value) diff --git a/glance/files/ocata/glance-registry.conf.Debian b/glance/files/ocata/glance-registry.conf.Debian index f62a7e3..8311652 100644 --- a/glance/files/ocata/glance-registry.conf.Debian +++ b/glance/files/ocata/glance-registry.conf.Debian @@ -1058,7 +1058,7 @@ backend = sqlalchemy # Deprecated group/name - [DATABASE]/sql_connection # Deprecated group/name - [sql]/connection #connection = -connection = {{ server.database.engine }}+pymysql://{{ server.database.user }}:{{ server.database.password }}@{{ server.database.host }}/{{ server.database.name }}{%- if server.database.get('ssl',{}).get('enabled',False) %}?ssl_ca={{ server.database.ssl.get('cacert_file', system_cacerts_file) }}{% endif %} +connection = {%- if server.database.engine == 'mysql' -%}{{ server.database.engine }}+pymysql{%- else -%}{{ server.database.engine }}{%- endif -%}://{{ server.database.user }}:{{ server.database.password }}@{{ server.database.host }}/{{ server.database.name }}{%- if server.database.get('ssl',{}).get('enabled',False) %}?ssl_ca={{ server.database.ssl.get('cacert_file', system_cacerts_file) }}{% endif %} # The SQLAlchemy connection string to use to connect to the slave database. # (string value)