Fix mysql connection
URL mysql://scott:***@some_host/some_db does not contain a '+drivername'
portion, and will make use of a default driver. A full dbname+drivername://
protocol is recommended. For MySQL, it is strongly recommended that
mysql+pymysql:// be specified for maximum service compatibility.
Change-Id: I4249b1593bd39fa2c25b7c24189d2eaad90b3124
Closes-Bug: #1753342
(cherry picked from commit f2b71b1adb
)
This commit is contained in:
parent
e87e95d970
commit
d7ccce0c50
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
# [*database_connection*]
|
||||
# (Optional) Non-sqllite database for murano
|
||||
# Defaults to 'mysql://murano:secrete@localhost:3306/murano'
|
||||
# Defaults to 'mysql+pymysql://murano:secrete@localhost:3306/murano'
|
||||
#
|
||||
# [*database_max_retries*]
|
||||
# (Optional) Maximum number of database connection retries during startup.
|
||||
|
@ -39,7 +39,7 @@
|
|||
# Defaults to $::os_service_default
|
||||
#
|
||||
class murano::db (
|
||||
$database_connection = 'mysql://murano:secrete@localhost:3306/murano',
|
||||
$database_connection = 'mysql+pymysql://murano:secrete@localhost:3306/murano',
|
||||
$database_idle_timeout = $::os_service_default,
|
||||
$database_min_pool_size = $::os_service_default,
|
||||
$database_max_pool_size = $::os_service_default,
|
||||
|
|
|
@ -7,7 +7,7 @@ describe 'murano::db' do
|
|||
context 'with default parameters' do
|
||||
it { is_expected.to contain_oslo__db('murano_config').with(
|
||||
:db_max_retries => '<SERVICE DEFAULT>',
|
||||
:connection => 'mysql://murano:secrete@localhost:3306/murano',
|
||||
:connection => 'mysql+pymysql://murano:secrete@localhost:3306/murano',
|
||||
:idle_timeout => '<SERVICE DEFAULT>',
|
||||
:min_pool_size => '<SERVICE DEFAULT>',
|
||||
:max_pool_size => '<SERVICE DEFAULT>',
|
||||
|
@ -55,7 +55,7 @@ describe 'murano::db' do
|
|||
|
||||
context 'with MySQL-python library as backend package' do
|
||||
let :params do
|
||||
{ :database_connection => 'mysql://murano:murano@localhost/murano', }
|
||||
{ :database_connection => 'mysql+pymysql://murano:murano@localhost/murano', }
|
||||
end
|
||||
|
||||
it { is_expected.to contain_package('python-mysqldb').with(:ensure => 'present') }
|
||||
|
|
Loading…
Reference in New Issue