The wrap_exception decorator optionally emited a notification.
Based on the code comments the original intention was not to include the
context to that notification due to security reasons. However the
implementation did included the context to the payload of the legacy
notification.
Recently we saw circural reference errors during the payload serialization
of this notification. Based on the logs the only complex data structure
that could cause circural reference is the context. So this patch
removes the context from the legacy exception notification.
The versioned exception notification is not affected as it does not
contain the args of the decorated function.
Reviewed: https:/ /review. openstack. org/447075 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=305cdb38db4 7258909ef83d591 8c7c85ef9d7a5b
Committed: https:/
Submitter: Jenkins
Branch: stable/mitaka
commit 305cdb38db47258 909ef83d5918c7c 85ef9d7a5b
Author: Balazs Gibizer <email address hidden>
Date: Fri Mar 17 11:24:49 2017 +0100
do not include context to exception notification
The wrap_exception decorator optionally emited a notification.
Based on the code comments the original intention was not to include the
context to that notification due to security reasons. However the
implementation did included the context to the payload of the legacy
notification.
Recently we saw circural reference errors during the payload serialization
of this notification. Based on the logs the only complex data structure
that could cause circural reference is the context. So this patch
removes the context from the legacy exception notification.
The versioned exception notification is not affected as it does not
contain the args of the decorated function.
Conflicts:
nova/ exception_ wrapper. py
nova/ tests/unit/ test_exception. py
NOTE(mriedem): The conflict is due to some refactor in Newton: 26488d5d660e4f6 8febf563ed93ab
6329d721ef3
Closes-Bug: #1673375 595a3e0e49ed57b 4ab33cd1688 e74dba256c3466b a2ea9bfbf7) 04d23f215867da7 30d436fe33) 55561c15998c58a 0f11a5351b)
Change-Id: I1d217620e52d45
(cherry picked from commit 3bf177a59cfd0b4
(cherry picked from commit a8a1915456a86f5
(cherry picked from commit d0ee248bab67275