diff --git a/heat/engine/resource.py b/heat/engine/resource.py index 8c84c4fad9..7743e6191c 100644 --- a/heat/engine/resource.py +++ b/heat/engine/resource.py @@ -1629,7 +1629,9 @@ class Resource(status.ResourceStatus): exc = Exception(_('Resource %s not created yet.') % self.name) failure = exception.ResourceFailure(exc, self, action) raise failure - return self._do_action(action) + + with self.frozen_properties(): + return self._do_action(action) else: reason = '%s not supported for %s' % (action, self.type()) self.state_set(action, self.COMPLETE, reason) @@ -1668,7 +1670,8 @@ class Resource(status.ResourceStatus): raise exception.ResourceFailure(exc, self, action) LOG.info('suspending %s', self) - return self._do_action(action) + with self.frozen_properties(): + return self._do_action(action) def resume(self): """Return a task to resume the resource. @@ -1686,13 +1689,16 @@ class Resource(status.ResourceStatus): exc = exception.Error(_('State %s invalid for resume') % six.text_type(self.state)) raise exception.ResourceFailure(exc, self, action) + LOG.info('resuming %s', self) - return self._do_action(action) + with self.frozen_properties(): + return self._do_action(action) def snapshot(self): """Snapshot the resource and return the created data, if any.""" LOG.info('snapshotting %s', self) - return self._do_action(self.SNAPSHOT) + with self.frozen_properties(): + return self._do_action(self.SNAPSHOT) @scheduler.wrappertask def delete_snapshot(self, data):