From b4038c44b5a9929962058790e9444af7106c0be7 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Fri, 5 Oct 2018 18:22:37 -0400 Subject: [PATCH] Don't assert that we haven't signalled the calling thread We use the notify.signal() call to notify the main thread that the stack status has moved to IN_PROGRESS so that it can wait before returning control to the user. Therefore it is expected that if an operation eventually fails (or succeeds), signal() will have been called a long time previously. The only reason it is there is to guard against failures before the resource attains the IN_PROGRESS state, where the persistence of the state has been deferred to coincide with the lock release. Story #2003988 Task: 26931 Change-Id: Ie0519ee78607f71855c2c0ace2cb4ff52c5809b6 --- heat/engine/service.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/heat/engine/service.py b/heat/engine/service.py index 8745863455..7cac61d2b3 100644 --- a/heat/engine/service.py +++ b/heat/engine/service.py @@ -184,8 +184,7 @@ class ThreadGroupManager(object): stack.persist_state_and_release_lock(lock.engine_id) notify = kwargs.get('notify') - if notify is not None: - assert not notify.signalled() + if notify is not None and not notify.signalled(): notify.signal() else: lock.release()