When generating the node_data() for a resource, catch and store any
exceptions (other than InvalidTemplateAttribute) encountered while
getting attributes. Re-raise the exception at the point where we try to
read the attribute value, including where we try to serialise the
NodeData object to store in the database.
In convergence, we generate and immediately serialise the NodeData, so
this should result in no substantial change in behaviour there.
In other situations (e.g. when we're just loading the data to show the
stack), this prevents an error in attribute calculation from aborting
the whole operation. The exception will still be raised if (and only if)
the erroneous attribute is accessed, but may be handled more
appropriately. For example, errors in calculating output values are
handled by reporting an error only for that particular output.
Reviewed: https:/ /review. openstack. org/515454 /git.openstack. org/cgit/ openstack/ heat/commit/ ?id=31175a56410 35abeec58c3f135 ad09d3f231ac41
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit 31175a5641035ab eec58c3f135ad09 d3f231ac41
Author: Thomas Herve <email address hidden>
Date: Fri Sep 22 16:44:51 2017 +0200
Defer exceptions in calculating node_data()
When generating the node_data() for a resource, catch and store any Attribute) encountered while
exceptions (other than InvalidTemplate
getting attributes. Re-raise the exception at the point where we try to
read the attribute value, including where we try to serialise the
NodeData object to store in the database.
In convergence, we generate and immediately serialise the NodeData, so
this should result in no substantial change in behaviour there.
In other situations (e.g. when we're just loading the data to show the
stack), this prevents an error in attribute calculation from aborting
the whole operation. The exception will still be raised if (and only if)
the erroneous attribute is accessed, but may be handled more
appropriately. For example, errors in calculating output values are
handled by reporting an error only for that particular output.
Change-Id: Idc97aee87405cc 13e83be3373078b 52e725850ea 88e9a44f06b952c 882474729e)
Co-Authored-By: Zane Bitter <email address hidden>
Closes-Bug: #1712280
(cherry picked from commit 4f4932c7900ae0e