Merge lp:~smoser/nova/lp838581 into lp:~ubuntu-server-dev/nova/diablo

Proposed by Scott Moser
Status: Merged
Merged at revision: 220
Proposed branch: lp:~smoser/nova/lp838581
Merge into: lp:~ubuntu-server-dev/nova/diablo
Diff against target: 116 lines (+96/-0)
3 files modified
debian/changelog (+6/-0)
debian/patches/fix-lp838581-removed-db_pool-complexities.patch (+89/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~smoser/nova/lp838581
Reviewer Review Type Date Requested Status
Chuck Short (community) Approve
Review via email: mp+78528@code.launchpad.net

Description of the change

This is cherry picked from the upstream commit that fixed this bug.
I have not tested this. I'm in the process of doing so, but wanted to let others see the patch.

To post a comment you must log in.
lp:~smoser/nova/lp838581 updated
220. By Scott Moser

merge latest package change

Revision history for this message
Chuck Short (zulcss) wrote :

ok with me

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2011-10-05 16:39:38 +0000
3+++ debian/changelog 2011-10-07 00:37:23 +0000
4@@ -1,3 +1,9 @@
5+nova (2011.3-0ubuntu7) UNRELEASED; urgency=low
6+
7+ * Removed db_pool complexities from nova.db.sqlalchemy.session (LP: #838581)
8+
9+ -- Scott Moser <smoser@ubuntu.com> Thu, 06 Oct 2011 20:31:22 -0400
10+
11 nova (2011.3-0ubuntu6) oneiric; urgency=low
12
13 * debian/patches/backport-libvirt-console-pipe.patch:
14
15=== added file 'debian/patches/fix-lp838581-removed-db_pool-complexities.patch'
16--- debian/patches/fix-lp838581-removed-db_pool-complexities.patch 1970-01-01 00:00:00 +0000
17+++ debian/patches/fix-lp838581-removed-db_pool-complexities.patch 2011-10-07 00:37:23 +0000
18@@ -0,0 +1,89 @@
19+commit d6b460e2e87e573500f6b521939895c6d93f5fdf
20+Merge: d2ac401 f3dd56e
21+Author: Jenkins <jenkins@review.openstack.org>
22+Date: Tue Sep 27 17:00:53 2011 +0000
23+
24+ Merge "Removed db_pool complexities from nova.db.sqlalchemy.session. Fixes bug 838581."
25+
26+commit f3dd56e916232e38e74d9e2f24ce9a738cac63cf
27+Author: Brian Lamar <brian.lamar@rackspace.com>
28+Date: Mon Sep 26 11:52:21 2011 -0400
29+
30+ Removed db_pool complexities from nova.db.sqlalchemy.session. Fixes bug 838581.
31+
32+ Change-Id: I9b1f4790fcdb890a5113b853f1b1483f3212c530
33+
34+--- a/nova/db/sqlalchemy/session.py
35++++ b/nova/db/sqlalchemy/session.py
36+@@ -15,30 +15,16 @@
37+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
38+ # License for the specific language governing permissions and limitations
39+ # under the License.
40+-"""
41+-Session Handling for SQLAlchemy backend
42+-"""
43+
44+-import eventlet.patcher
45+-eventlet.patcher.monkey_patch()
46++"""Session Handling for SQLAlchemy backend."""
47+
48+-import eventlet.db_pool
49+ import sqlalchemy.orm
50+-import sqlalchemy.pool
51+
52+ import nova.exception
53+ import nova.flags
54+-import nova.log
55+
56+
57+ FLAGS = nova.flags.FLAGS
58+-LOG = nova.log.getLogger("nova.db.sqlalchemy")
59+-
60+-
61+-try:
62+- import MySQLdb
63+-except ImportError:
64+- MySQLdb = None
65+
66+
67+ _ENGINE = None
68+@@ -71,24 +57,6 @@ def get_engine():
69+ if "sqlite" in connection_dict.drivername:
70+ engine_args["poolclass"] = sqlalchemy.pool.NullPool
71+
72+- elif MySQLdb and "mysql" in connection_dict.drivername:
73+- LOG.info(_("Using mysql/eventlet db_pool."))
74+- # MySQLdb won't accept 'None' in the password field
75+- password = connection_dict.password or ''
76+- pool_args = {
77+- "db": connection_dict.database,
78+- "passwd": password,
79+- "host": connection_dict.host,
80+- "user": connection_dict.username,
81+- "min_size": FLAGS.sql_min_pool_size,
82+- "max_size": FLAGS.sql_max_pool_size,
83+- "max_idle": FLAGS.sql_idle_timeout,
84+- }
85+- creator = eventlet.db_pool.ConnectionPool(MySQLdb, **pool_args)
86+- engine_args["pool_size"] = FLAGS.sql_max_pool_size
87+- engine_args["pool_timeout"] = FLAGS.sql_pool_timeout
88+- engine_args["creator"] = creator.create
89+-
90+ return sqlalchemy.create_engine(FLAGS.sql_connection, **engine_args)
91+
92+
93+--- a/nova/flags.py
94++++ b/nova/flags.py
95+@@ -351,12 +351,6 @@ DEFINE_string('logdir', None, 'output to
96+ 'directory')
97+ DEFINE_integer('logfile_mode', 0644, 'Default file mode of the logs.')
98+ DEFINE_string('sqlite_db', 'nova.sqlite', 'file name for sqlite')
99+-DEFINE_integer('sql_pool_timeout', 30,
100+- 'seconds to wait for connection from pool before erroring')
101+-DEFINE_integer('sql_min_pool_size', 10,
102+- 'minimum number of SQL connections to pool')
103+-DEFINE_integer('sql_max_pool_size', 10,
104+- 'maximum number of SQL connections to pool')
105+ DEFINE_string('sql_connection',
106+ 'sqlite:///$state_path/$sqlite_db',
107+ 'connection string for sql database')
108
109=== modified file 'debian/patches/series'
110--- debian/patches/series 2011-09-30 20:06:42 +0000
111+++ debian/patches/series 2011-10-07 00:37:23 +0000
112@@ -10,3 +10,4 @@
113 backport-lxc-container-console-fix.patch
114 backport-snapshot-cleanup.patch
115 fix-lp863305-images-permission.patch
116+fix-lp838581-removed-db_pool-complexities.patch

Subscribers

People subscribed via source and target branches