diff options
Diffstat (limited to 'heat/engine/service.py')
-rw-r--r-- | heat/engine/service.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/heat/engine/service.py b/heat/engine/service.py index 52d42ea59..615c52897 100644 --- a/heat/engine/service.py +++ b/heat/engine/service.py @@ -1418,14 +1418,19 @@ class EngineService(service.ServiceBase): self.resource_enforcer.enforce_stack(stack) if stack.convergence and cfg.CONF.convergence_engine: - def convergence_delete(): - stack.thread_group_mgr = self.thread_group_mgr + stack.thread_group_mgr = self.thread_group_mgr + template = templatem.Template.create_empty_template( + from_template=stack.t) + + # stop existing traversal; mark stack as FAILED + if stack.status == stack.IN_PROGRESS: + self.worker_service.stop_traversal(stack) + + def stop_workers(): self.worker_service.stop_all_workers(stack) - template = templatem.Template.create_empty_template( - from_template=stack.t) - stack.converge_stack(template=template, action=stack.DELETE) - self.thread_group_mgr.start(stack.id, convergence_delete) + stack.converge_stack(template=template, action=stack.DELETE, + pre_converge=stop_workers) return lock = stack_lock.StackLock(cnxt, stack.id, self.engine_id) |