Exceptions Error and ResourceFailure cannot be serialized over RPC
Bug #1304743 reported by
Steve Baker
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Medium
|
Jeff Peeler |
Bug Description
Deserialization silently fails for these exceptions because their __init__ methods have mandatory arguments.
This results in heat-api treating these exceptions as unknown and logging a stack trace.
The fix for this bug should include tests which put every subclass of HeatException through rpc_common.
description: | updated |
tags: | removed: in-stable-icehouse |
Changed in heat: | |
milestone: | juno-1 → juno-2 |
Changed in heat: | |
milestone: | juno-2 → juno-3 |
Changed in heat: | |
milestone: | juno-3 → juno-rc1 |
Changed in heat: | |
assignee: | nobody → Jeff Peeler (jpeeler-z) |
Changed in heat: | |
status: | Triaged → In Progress |
Changed in heat: | |
status: | Fix Committed → Fix Released |
Changed in heat: | |
milestone: | juno-rc1 → 2014.2 |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/86195 /git.openstack. org/cgit/ openstack/ heat/commit/ ?id=712faf17177 60da16a60e9528a 564b6dcd6acddc
Committed: https:/
Submitter: Jenkins
Branch: master
commit 712faf1717760da 16a60e9528a564b 6dcd6acddc
Author: Steve Baker <email address hidden>
Date: Wed Apr 9 14:38:48 2014 +1200
Allow NotFound to be created without args
It appears that the serialization used to wrap RPC exceptions
requires that the class be instantiated without any arguments.
Since the NotFound exception required a msg_fmt it could not be
deserialized in heat-api, which lead to no mapping in the FaultWrapper
so a 500 was raised instead of a 404.
This change adds a default value for msg_fmt for the NotFound exception.
The classes Error and ResourceFailure likely have this issue too, but it
is not as serious since they will raise a 500 error anyway.
Config/ deployment API tests now check that NotFound can be deserialized by
calling to_remote_error, and checks that FaultWrapper converts that to
HTTPNotFound.
Change-Id: Ieb8de26465cb26 aa015f15c134f80 a06ebcae95c
Closes-Bug: #1301657
Related-Bug: #1304743