summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZane Bitter <zbitter@redhat.com>2018-10-05 18:22:37 -0400
committerRabi Mishra <ramishra@redhat.com>2018-10-17 05:17:20 +0000
commitab5bfa7c7177bcda093ddb55c83ad79dee3041f1 (patch)
tree113d5d854d2fb9ca8265e381bb74cce684bf1b1d
parent46aacaba612a3e988d1490c3f67b681f944e0c77 (diff)
downloadheat-ab5bfa7c7177bcda093ddb55c83ad79dee3041f1.tar.gz
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 (cherry picked from commit b4038c44b5a9929962058790e9444af7106c0be7)
-rw-r--r--heat/engine/service.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/heat/engine/service.py b/heat/engine/service.py
index aca026c5e..3b5b7c1d7 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()