The resource delete operation attempts to delete CREATE_FAILED
resources. Further it attempts to delete resources that were
not created during a creation operation because further processing
of the template does not take place.
This patch special cases these two conditions in the delete operation.
Change-Id: I1c83ba68754f38a0f7e91e77fcf02177c457504e
Fixes: Bug #1155824
return
if self.state == self.DELETE_IN_PROGRESS:
return 'Resource deletion already in progress'
+ if self.state == self.CREATE_FAILED:
+ return
+ # Further resources will not be created in a CREATE_FAILED stack.
+ # The state of these resources is None. Do not delete as an
+ # undeleteable stack will result
+ if self.state is None:
+ return
logger.info('deleting %s (inst:%s db_id:%s)' %
(str(self), self.resource_id, str(self.id)))