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
1=== modified file 'nova/db/sqlalchemy/session.py'
2--- nova/db/sqlalchemy/session.py 2011-08-11 18:36:29 +0000
3+++ nova/db/sqlalchemy/session.py 2011-08-18 20:28:54 +0000
4@@ -73,9 +73,11 @@
5
6 elif MySQLdb and "mysql" in connection_dict.drivername:
7 LOG.info(_("Using mysql/eventlet db_pool."))
8+ # MySQLdb won't accept 'None' in the password field
9+ password = connection_dict.password or ''
10 pool_args = {
11 "db": connection_dict.database,
12- "passwd": connection_dict.password,
13+ "passwd": password,
14 "host": connection_dict.host,
15 "user": connection_dict.username,
16 "min_size": FLAGS.sql_min_pool_size,