]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Add RequestContextSerializer for rpc notifications
authorjohn-griffith <john.griffith@solidfire.com>
Wed, 19 Mar 2014 22:19:28 +0000 (16:19 -0600)
committerjohn-griffith <john.griffith@solidfire.com>
Wed, 19 Mar 2014 22:19:28 +0000 (16:19 -0600)
RequestContext should be serialized when sent via oslo.messaging. The
serializer is correctly used for the general RPC mechanism, but has been
forgotten in the notifier. This patch fixes that.

Thanks goes to eharney for noticing this and pointing it out!!!

Same bug existed in Nova (1275771)

Change-Id: I99a571ef74bbcd13bf801313eea145ea69f821e1
Closes-Bug: #1294724

cinder/rpc.py

index d539cfd30dc90b260e6fde2d4302458dcb59f493..bb34f950d496328aedb412347fe7c9d60dde76a8 100644 (file)
@@ -60,7 +60,8 @@ def init(conf):
     TRANSPORT = messaging.get_transport(conf,
                                         allowed_remote_exmods=exmods,
                                         aliases=TRANSPORT_ALIASES)
-    NOTIFIER = messaging.Notifier(TRANSPORT)
+    NOTIFIER = messaging.Notifier(TRANSPORT,
+                                  serializer=RequestContextSerializer(None))
 
 
 def initialized():