utils.to_primitive still tripping up on some objects ...
Bug #829624 reported by
Sandy Walsh
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Sandy Walsh |
Bug Description
Recent changes were made to utils/to_primitive to support classes/instances, but json still trips up over things like built-ins, modules, etc.
Related branches
lp:~sandy-walsh/nova/lp829624
- Devin Carlen (community): Approve
- Josh Kearney (community): Approve
-
Diff: 42 lines (+19/-3)2 files modifiednova/tests/test_utils.py (+10/-0)
nova/utils.py (+9/-3)
lp:~sandy-walsh/nova/lp829624-b
- Vish Ishaya (community): Approve
- Alex Meade (community): Approve
- Devin Carlen (community): Approve
-
Diff: 10 lines (+2/-1)1 file modifiednova/notifier/api.py (+2/-1)
Changed in nova: | |
status: | In Progress → Fix Committed |
Changed in nova: | |
milestone: | none → diablo-4 |
Changed in nova: | |
status: | Fix Committed → Incomplete |
Changed in nova: | |
status: | In Progress → Fix Committed |
milestone: | diablo-4 → diablo-rbp |
Changed in nova: | |
milestone: | diablo-rbp → 2011.3 |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Seems like "all" is causing grief, although it is handled by inspect.isbuiltin()
I think the "ERROR" part of this trace is a different issue.
2011-08-27 03:05:24,701 ERROR nova.exception [-] Problem '<built-in function all> is not JSON serializable' attempting to send to notification system. pymodules/ python2. 6/nova/ notifier/ api.py" , line 95, in notify pymodules/ python2. 6/nova/ notifier/ rabbit_ notifier. py", line 36, in notify pymodules/ python2. 6/nova/ rpc/__init_ _.py", line 58, in cast cast(context, topic, msg) pymodules/ python2. 6/nova/ rpc/amqp. py", line 539, in cast pymodules/ python2. 6/carrot/ messaging. py", line 758, in send serializer) pymodules/ python2. 6/carrot/ messaging. py", line 687, in create_message serializer) pymodules/ python2. 6/carrot/ serialization. py", line 144, in encode pymodules/ python2. 6/anyjson/ __init_ _.py", line 123, in <lambda> serialize( value) pymodules/ python2. 6/anyjson/ __init_ _.py", line 85, in serialize *exc.args) pymodules/ python2. 6/nova/ rpc/amqp. py", line 230, in _process_data context= ctxt, **node_args) pymodules/ python2. 6/nova/ exception. py", line 98, in wrapped pymodules/ python2. 6/nova/ compute/ manager. py", line 459, in run_instance instance( context, instance_id, **kwargs) pymodules/ python2. 6/nova/ compute/ manager. py", line 414, in _run_instance pymodules/ python2. 6/nova/ network/ api.py" , line 156, in allocate_ for_instance pymodules/ python2. 6/nova/ rpc/__init_ _.py", line 54, in call call(context, topic, msg) pymodules/ python2. 6/nova/ rpc/amqp. py", line 527, in call pymodules/ python2. 6/nova/ rpc/amqp. py", line 516, in wait
(nova.exception): TRACE: Traceback (most recent call last):
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: driver.notify(msg)
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: rpc.cast(context, topic, message)
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: return RPCIMPL.
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: publisher.send(msg)
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: serializer=
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: serializer=
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: payload = encoder(data)
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: serialize = lambda value: implementation.
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: raise TypeError(
(nova.exception): TRACE: TypeError: <built-in function all> is not JSON serializable
(nova.exception): TRACE:
2011-08-27 03:05:24,760 ERROR nova [-] Exception during message handling
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/lib/
(nova): TRACE: rval = node_func(
(nova): TRACE: File "/usr/lib/
(nova): TRACE: return f(*args, **kw)
(nova): TRACE: File "/usr/lib/
(nova): TRACE: self._run_
(nova): TRACE: File "/usr/lib/
(nova): TRACE: instance, vpn=is_vpn)
(nova): TRACE: File "/usr/lib/
(nova): TRACE: 'args': args})
(nova): TRACE: File "/usr/lib/
(nova): TRACE: return RPCIMPL.
(nova): TRACE: File "/usr/lib/
(nova): TRACE: rv = list(rv)
(nova): TRACE: File "/usr/lib/
(nova)...