Add RequestContextSerializer for rpc notifications

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
This commit is contained in:
john-griffith
2014-03-19 16:19:28 -06:00
parent 2ba4af4de5
commit e145ef798d

View 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():