From 4dac8ec975bd5fbab31a3e8c924a75316fe4f741 Mon Sep 17 00:00:00 2001 From: melissaml Date: Mon, 5 Mar 2018 12:35:49 +0800 Subject: [PATCH] fix mysql connection Change-Id: I520539b8397912e5b4b27b2c5384d6a727041942 --- README.md | 2 +- examples/neutron.pp | 2 +- examples/neutron_l3_with_to_uuid.pp | 2 +- examples/neutron_with_pacemaker.pp | 2 +- spec/classes/neutron_db_spec.rb | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6461cc072..3b79bcda1 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ class { '::neutron': # configure authentication class { 'neutron::server': auth_password => 'keystone_neutron_secret', - sql_connection => 'mysql://neutron:neutron_sql_secret@127.0.0.1/neutron?charset=utf8', + sql_connection => 'mysql+pymysql://neutron:neutron_sql_secret@127.0.0.1/neutron?charset=utf8', } # ml2 plugin with vxlan as ml2 driver and ovs as mechanism driver diff --git a/examples/neutron.pp b/examples/neutron.pp index 74c1ea23b..1b7fbd953 100644 --- a/examples/neutron.pp +++ b/examples/neutron.pp @@ -13,7 +13,7 @@ class { '::neutron': # The API server talks to keystone for authorisation class { '::neutron::server': auth_password => 'password', - database_connection => 'mysql://neutron:password@192.168.1.1/neutron', + database_connection => 'mysql+pymysql://neutron:password@192.168.1.1/neutron', } # Configure nova notifications system diff --git a/examples/neutron_l3_with_to_uuid.pp b/examples/neutron_l3_with_to_uuid.pp index 892e34890..45b1fa60e 100644 --- a/examples/neutron_l3_with_to_uuid.pp +++ b/examples/neutron_l3_with_to_uuid.pp @@ -16,7 +16,7 @@ class { '::neutron': class { '::neutron::server': auth_password => 'password', - database_connection => 'mysql://neutron:password@192.168.1.1/neutron', + database_connection => 'mysql+pymysql://neutron:password@192.168.1.1/neutron', } # configure l3-agent to use the new router by name diff --git a/examples/neutron_with_pacemaker.pp b/examples/neutron_with_pacemaker.pp index 72cca6f10..ef48db862 100644 --- a/examples/neutron_with_pacemaker.pp +++ b/examples/neutron_with_pacemaker.pp @@ -31,7 +31,7 @@ class { '::neutron::server': enabled => false, manage_service => false, keystone_password => 'password', - connection => 'mysql://neutron:password@192.168.1.1/neutron', + connection => 'mysql+pymysql://neutron:password@192.168.1.1/neutron', } class { '::neutron::agents::dhcp': diff --git a/spec/classes/neutron_db_spec.rb b/spec/classes/neutron_db_spec.rb index e64183366..35191a89a 100644 --- a/spec/classes/neutron_db_spec.rb +++ b/spec/classes/neutron_db_spec.rb @@ -47,11 +47,11 @@ describe 'neutron::db' do context 'with MySQL-python library as backend package' do let :params do - { :database_connection => 'mysql://neutron:neutron@localhost/neutron' } + { :database_connection => 'mysql+pymysql://neutron:neutron@localhost/neutron' } end it { is_expected.to contain_oslo__db('neutron_config').with( - :connection => 'mysql://neutron:neutron@localhost/neutron', + :connection => 'mysql+pymysql://neutron:neutron@localhost/neutron', )} end