Merge lp:~soren/nova/lp716427 into lp:~hudson-openstack/nova/trunk

Proposed by Soren Hansen on 2011-02-10
Status: Merged
Approved by: Soren Hansen on 2011-02-10
Approved revision: 660
Merged at revision: 660
Proposed branch: lp:~soren/nova/lp716427
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 12 lines (+1/-1)
1 file modified
nova/ (+1/-1)
To merge this branch: bzr merge lp:~soren/nova/lp716427
Reviewer Review Type Date Requested Status
Jay Pipes (community) Approve on 2011-02-10
Vish Ishaya (community) 2011-02-10 Approve on 2011-02-10
Review via email:

Commit message

Get a fresh connection in rpc.cast rather than using a recycled one.

Description of the change

Addresses bug 716427

Requests coming into the api server through wsgi get each their own thread. If two requests come in at almost the same time and both want to do an rpc.cast, we get into trouble because rpc.cast uses a recycled connection, meaning that the two calls to rpc.cast both use the same connection. This doesn't work.

This is a minimal patch to fix this particular problem. The greater question is: Is there really any point in recycling these connections anywhere?

To post a comment you must log in.
Vish Ishaya (vishvananda) wrote :


review: Approve
Jay Pipes (jaypipes) wrote :


review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nova/'
2--- nova/ 2011-01-21 21:10:26 +0000
3+++ nova/ 2011-02-10 14:30:33 +0000
4@@ -346,7 +346,7 @@
5 """Sends a message on a topic without waiting for a response"""
6 LOG.debug(_("Making asynchronous cast..."))
7 _pack_context(msg, context)
8- conn = Connection.instance()
9+ conn = Connection.instance(True)
10 publisher = TopicPublisher(connection=conn, topic=topic)
11 publisher.send(msg)
12 publisher.close()