Project

General

Profile

Bug #10557

NodeItem serializer causes msgpack to fail with "expected dict got SortedDictWithMetadata"

Added by Christina Meno over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Category:
Backend (REST API)
Target version:
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Crash signature (v1):
Crash signature (v2):

Description

this causes failures in the tests/test_crush.py

the error is:

2015-01-08 22:36:00,195 - ERROR - django.request Internal Server Error:
/api/v2/cluster/d6fbd102-db6b-4da6-b060-81aaeee154f7/crush_node
Traceback (most recent call last):
  File
"/opt/calamari/venv/lib/python2.7/site-packages/django/core/handlers/base.py",
line 115, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File
"/opt/calamari/venv/lib/python2.7/site-packages/rest_framework/viewsets.py",
line 78, in view
    return self.dispatch(request, *args, **kwargs)
  File "/home/ubuntu/calamari/rest-api/calamari_rest/views/rpc_view.py",
line 91, in dispatch
    return super(RPCViewSet, self).dispatch(request, *args, **kwargs)
  File
"/opt/calamari/venv/lib/python2.7/site-packages/django/views/decorators/csrf.py",
line 77, in wrapped_view
    return view_func(*args, **kwargs)
  File
"/opt/calamari/venv/lib/python2.7/site-packages/rest_framework/views.py", line
399, in dispatch
    response = self.handle_exception(exc)
  File "/home/ubuntu/calamari/rest-api/calamari_rest/views/rpc_view.py",
line 108, in handle_exception
    return super(RPCViewSet, self).handle_exception(exc)
  File
"/opt/calamari/venv/lib/python2.7/site-packages/rest_framework/views.py", line
396, in dispatch
    response = handler(request, *args, **kwargs)
  File "/home/ubuntu/calamari/rest-api/calamari_rest/views/v2.py", line
121, in create
    create_response = self.client.create(fsid, CRUSH_NODE,
serializer.get_data())
  File "/opt/calamari/venv/lib/python2.7/site-packages/zerorpc/core.py",
line 260, in <lambda>
    return lambda *args, **kargs: self(method, *args, **kargs)
  File "/opt/calamari/venv/lib/python2.7/site-packages/zerorpc/core.py",
line 241, in __call__
    bufchan.emit_event(request_event)
  File
"/opt/calamari/venv/lib/python2.7/site-packages/zerorpc/channel.py",
line 244, in emit_event
    self._channel.emit_event(event)
  File
"/opt/calamari/venv/lib/python2.7/site-packages/zerorpc/heartbeat.py",
line 111, in emit_event
    self._channel.emit_event(event)
  File
"/opt/calamari/venv/lib/python2.7/site-packages/zerorpc/channel.py",
line 160, in emit_event
    self._multiplexer.emit_event(event, self._zmqid)
  File
"/opt/calamari/venv/lib/python2.7/site-packages/zerorpc/channel.py",
line 67, in emit_event
    return self._events.emit_event(event, identity)
  File
"/opt/calamari/venv/lib/python2.7/site-packages/zerorpc/events.py", line
242, in emit_event
    parts = ('', event.pack())
  File
"/opt/calamari/venv/lib/python2.7/site-packages/zerorpc/events.py", line
140, in pack
    return msgpack.Packer().pack((self._header, self._name, self._args))
  File "_msgpack.pyx", line 152, in msgpack._msgpack.Packer.pack
(msgpack/_msgpack.c:2064)
  File "_msgpack.pyx", line 154, in msgpack._msgpack.Packer.pack
(msgpack/_msgpack.c:1972)
  File "_msgpack.pyx", line 143, in msgpack._msgpack.Packer._pack
(msgpack/_msgpack.c:1792)
  File "_msgpack.pyx", line 143, in msgpack._msgpack.Packer._pack
(msgpack/_msgpack.c:1792)
  File "_msgpack.pyx", line 137, in msgpack._msgpack.Packer._pack
(msgpack/_msgpack.c:1685)
  File "_msgpack.pyx", line 143, in msgpack._msgpack.Packer._pack
(msgpack/_msgpack.c:1792)
  File "_msgpack.pyx", line 131, in msgpack._msgpack.Packer._pack
(msgpack/_msgpack.c:1599)
TypeError: Expected dict, got SortedDictWithMetadata

Also available in: Atom PDF