summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorJeremy Stanley <fungi@yuggoth.org>2015-05-20 01:04:01 +0000
committerVictor Stinner <vstinner@redhat.com>2016-06-30 08:47:01 +0200
commit42de1e7f7ef63bbc98688a9bcbedf18ea4ddb726 (patch)
tree779db8f5442c95fa3b157c8eb281f2d549da6104 /etc
parent21caa1373b4dac8a789cb37f1981f08b3adb2606 (diff)
downloadtrove-42de1e7f7ef63bbc98688a9bcbedf18ea4ddb726.tar.gz
Switch from MySQL-python to PyMySQL
As discussed in the Liberty Design Summit "Moving apps to Python 3" cross-project workshop, the way forward in the near future is to switch to the pure-python PyMySQL library as a default. https://etherpad.openstack.org/p/liberty-cross-project-python3 BaseMySqlRootAccess.enable_root(): catch also InternalError because the PyMySQL error is not wrapped into a SQLAlchemy OperationalError, but a generic SQLAlchemy InternalError. Similar change is made in 026_datastore_versions_unique_fix.py. This change requires a trove integration change to add the PyMySQL to the guest image: Id4d013d174ba40a453819f900aaa316a93e59b48. Partially implements: blueprint trove-python3 Co-Authored-By: Victor Stinner <vstinner@redhat.com> Depends-On: Id4d013d174ba40a453819f900aaa316a93e59b48 Change-Id: I65e8a8d5dc251a8b00529cdfb1a6ada3d5720f68
Diffstat (limited to 'etc')
-rw-r--r--etc/trove/trove-conductor.conf.sample2
-rw-r--r--etc/trove/trove-taskmanager.conf.sample4
-rw-r--r--etc/trove/trove.conf.sample2
-rw-r--r--etc/trove/trove.conf.test2
4 files changed, 5 insertions, 5 deletions
diff --git a/etc/trove/trove-conductor.conf.sample b/etc/trove/trove-conductor.conf.sample
index 9399a5a1..964303ea 100644
--- a/etc/trove/trove-conductor.conf.sample
+++ b/etc/trove/trove-conductor.conf.sample
@@ -27,7 +27,7 @@ control_exchange = trove
#trace_sqlalchemy = True
[database]
-connection = mysql://root:e1a2c042c828d3566d0a@localhost/trove
+connection = mysql+pymysql://root:e1a2c042c828d3566d0a@localhost/trove
[oslo_messaging_rabbit]
# The RabbitMQ broker address where a single node is used. (string value)
diff --git a/etc/trove/trove-taskmanager.conf.sample b/etc/trove/trove-taskmanager.conf.sample
index 57af2831..873ad406 100644
--- a/etc/trove/trove-taskmanager.conf.sample
+++ b/etc/trove/trove-taskmanager.conf.sample
@@ -163,8 +163,8 @@ pydev_debug = disabled
# SQLAlchemy connection string for the reference implementation
# registry server. Any valid SQLAlchemy connection string is fine.
# See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine
-connection = mysql://root:e1a2c042c828d3566d0a@localhost/trove
-# connection = mysql://root:root@localhost/trove
+connection = mysql+pymysql://root:e1a2c042c828d3566d0a@localhost/trove
+# connection = mysql+pymysql://root:root@localhost/trove
# Period in seconds after which SQLAlchemy should reestablish its connection
# to the database.
diff --git a/etc/trove/trove.conf.sample b/etc/trove/trove.conf.sample
index af81c820..6e4098bf 100644
--- a/etc/trove/trove.conf.sample
+++ b/etc/trove/trove.conf.sample
@@ -146,7 +146,7 @@ api_paste_config = api-paste.ini
# registry server. Any valid SQLAlchemy connection string is fine.
# See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine
# connection = sqlite:///trove_test.sqlite
-connection = mysql://root:e1a2c042c828d3566d0a@localhost/trove
+connection = mysql+pymysql://root:e1a2c042c828d3566d0a@localhost/trove
#connection = postgresql://trove:trove@localhost/trove
# Period in seconds after which SQLAlchemy should reestablish its connection
diff --git a/etc/trove/trove.conf.test b/etc/trove/trove.conf.test
index 72b04569..e22b4c0b 100644
--- a/etc/trove/trove.conf.test
+++ b/etc/trove/trove.conf.test
@@ -147,7 +147,7 @@ device_path = /dev/vdb
# registry server. Any valid SQLAlchemy connection string is fine.
# See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine
connection = sqlite:///trove_test.sqlite
-#connection = mysql://root:e1a2c042c828d3566d0a@localhost/trove
+#connection = mysql+pymysql://root:e1a2c042c828d3566d0a@localhost/trove
#connection = postgresql://trove:trove@localhost/trove
# Period in seconds after which SQLAlchemy should reestablish its connection