Merge lp:~rconradharris/nova/lp829019 into lp:~hudson-openstack/nova/trunk

Proposed by Rick Harris
Status: Merged
Approved by: Matt Dietz
Approved revision: 1454
Merged at revision: 1459
Proposed branch: lp:~rconradharris/nova/lp829019
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 16 lines (+3/-1)
1 file modified
nova/db/sqlalchemy/session.py (+3/-1)
To merge this branch: bzr merge lp:~rconradharris/nova/lp829019
Reviewer Review Type Date Requested Status
Matt Dietz (community) Approve
Ed Leafe (community) Approve
Review via email: mp+72102@code.launchpad.net

Description of the change

Passes empty string instead of None to MySQLdb driver if the DB password isn't set.

To post a comment you must log in.
Revision history for this message
Ed Leafe (ed-leafe) wrote :

lgtm

review: Approve
Revision history for this message
Matt Dietz (cerberus) wrote :

sho'nuff

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'nova/db/sqlalchemy/session.py'
--- nova/db/sqlalchemy/session.py 2011-08-11 18:36:29 +0000
+++ nova/db/sqlalchemy/session.py 2011-08-18 20:28:54 +0000
@@ -73,9 +73,11 @@
7373
74 elif MySQLdb and "mysql" in connection_dict.drivername:74 elif MySQLdb and "mysql" in connection_dict.drivername:
75 LOG.info(_("Using mysql/eventlet db_pool."))75 LOG.info(_("Using mysql/eventlet db_pool."))
76 # MySQLdb won't accept 'None' in the password field
77 password = connection_dict.password or ''
76 pool_args = {78 pool_args = {
77 "db": connection_dict.database,79 "db": connection_dict.database,
78 "passwd": connection_dict.password,80 "passwd": password,
79 "host": connection_dict.host,81 "host": connection_dict.host,
80 "user": connection_dict.username,82 "user": connection_dict.username,
81 "min_size": FLAGS.sql_min_pool_size,83 "min_size": FLAGS.sql_min_pool_size,