From 6bbbf1bbead1e65ad6231d2256fc60169822e20e Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Tue, 29 May 2012 07:46:27 -0400 Subject: [PATCH] Fix the conf argument to get_connection_pool(). The first argument to amqp.get_connection_pool() should be a global config object, not the Connection. Change-Id: Ic0b8f32ea42bdebdd883175a1351b3a52f26942d --- nova/rpc/impl_kombu.py | 4 ++-- nova/rpc/impl_qpid.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nova/rpc/impl_kombu.py b/nova/rpc/impl_kombu.py index ecabf4de..3607e517 100644 --- a/nova/rpc/impl_kombu.py +++ b/nova/rpc/impl_kombu.py @@ -657,7 +657,7 @@ class Connection(object): def create_consumer(self, topic, proxy, fanout=False): """Create a consumer that calls a method in a proxy object""" proxy_cb = rpc_amqp.ProxyCallback(self.conf, proxy, - rpc_amqp.get_connection_pool(self, Connection)) + rpc_amqp.get_connection_pool(self.conf, Connection)) if fanout: self.declare_fanout_consumer(topic, proxy_cb) @@ -667,7 +667,7 @@ class Connection(object): def create_worker(self, topic, proxy, pool_name): """Create a worker that calls a method in a proxy object""" proxy_cb = rpc_amqp.ProxyCallback(self.conf, proxy, - rpc_amqp.get_connection_pool(self, Connection)) + rpc_amqp.get_connection_pool(self.conf, Connection)) self.declare_topic_consumer(topic, proxy_cb, pool_name) diff --git a/nova/rpc/impl_qpid.py b/nova/rpc/impl_qpid.py index dad47def..bfaa8661 100644 --- a/nova/rpc/impl_qpid.py +++ b/nova/rpc/impl_qpid.py @@ -501,7 +501,7 @@ class Connection(object): def create_consumer(self, topic, proxy, fanout=False): """Create a consumer that calls a method in a proxy object""" proxy_cb = rpc_amqp.ProxyCallback(self.conf, proxy, - rpc_amqp.get_connection_pool(self, Connection)) + rpc_amqp.get_connection_pool(self.conf, Connection)) if fanout: consumer = FanoutConsumer(self.conf, self.session, topic, proxy_cb) @@ -515,7 +515,7 @@ class Connection(object): def create_worker(self, topic, proxy, pool_name): """Create a worker that calls a method in a proxy object""" proxy_cb = rpc_amqp.ProxyCallback(self.conf, proxy, - rpc_amqp.get_connection_pool(self, Connection)) + rpc_amqp.get_connection_pool(self.conf, Connection)) consumer = TopicConsumer(self.conf, self.session, topic, proxy_cb, name=pool_name)