Remote exception from nested stack can break all future exceptions of that type
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Critical
|
Angus Salkeld | ||
Kilo |
Fix Released
|
Critical
|
Steve Baker |
Bug Description
The change at line 282 here:
https:/
uses the copy module to make a copy of an exception class, and then modifies instance variables of the local 'copy':
local_ex = copy.copy(
local_ex.msg_fmt = "%(message)s"
raise local_ex(
THIS DOES NOT MAKE A COPY. To wit:
>>> import copy
>>> class A(Exception):
... msg_fmt = 'foo'
...
>>>
>>> B = copy.copy(A)
>>> B.msg_fmt = 'bar'
>>> A.msg_fmt
'bar'
>>> B is A
True
As a result, once the engine has received a remote exception from this code, all future exceptions of this type will have the wrong formatting string, likely causing them to fail if they take different keyword arguments. (It's something of a mystery why we haven't seen a failure of this type reported.)
no longer affects: | heat/liberty |
Changed in heat: | |
assignee: | Zane Bitter (zaneb) → Angus Salkeld (asalkeld) |
Changed in heat: | |
status: | Fix Committed → Fix Released |
tags: |
added: in-stable-kilo removed: kilo-backport-potential |
Changed in heat: | |
milestone: | liberty-2 → 5.0.0 |
Fix proposed to branch: master /review. openstack. org/201389
Review: https:/