diff --git a/heat/common/exception.py b/heat/common/exception.py index 48faa10bad..401dad9b4e 100644 --- a/heat/common/exception.py +++ b/heat/common/exception.py @@ -336,7 +336,7 @@ class ResourceFailure(HeatExceptionWithPath): path = res_path else: self.exc = None - res_failed = 'Resource %s failed: ' % action.upper() + res_failed = 'Resource %s failed: ' % self.action.upper() if res_failed in exception_or_error: (error, message, new_path) = self._from_status_reason( exception_or_error) diff --git a/heat/engine/resources/aws/ec2/instance.py b/heat/engine/resources/aws/ec2/instance.py index e35a5b3ad0..7311eb9956 100644 --- a/heat/engine/resources/aws/ec2/instance.py +++ b/heat/engine/resources/aws/ec2/instance.py @@ -558,6 +558,7 @@ class Instance(resource.Resource, sh.SchedulerHintsMixin): if server is not None: self.resource_id_set(server.id) + assert server is not None creator = progress.ServerCreateProgress(server.id) attachers = [] for vol_id, device in self.volumes(): diff --git a/heat/engine/resources/openstack/nova/server.py b/heat/engine/resources/openstack/nova/server.py index 3815b79381..32cc84c6ee 100644 --- a/heat/engine/resources/openstack/nova/server.py +++ b/heat/engine/resources/openstack/nova/server.py @@ -884,6 +884,7 @@ class Server(server_base.BaseServer, sh.SchedulerHintsMixin, if server is not None: self.resource_id_set(server.id) + assert server is not None return server.id def check_create_complete(self, server_id):