Merge "Ignore spurious nested stack locks in convergence"

This commit is contained in:
Zuul 2018-09-03 13:56:45 +00:00 committed by Gerrit Code Review
commit 5e8d872c6a
1 changed files with 8 additions and 4 deletions

View File

@ -448,12 +448,16 @@ class StackResource(resource.Resource):
if status == self.IN_PROGRESS:
return False
elif status == self.COMPLETE:
ret = stack_lock.StackLock.get_engine_id(
self.context, self.resource_id) is None
if ret:
# For operations where we do not take a resource lock
# (i.e. legacy-style), check that the stack lock has been
# released before reporting completeness.
done = (self._should_lock_on_action(expected_action) or
stack_lock.StackLock.get_engine_id(
self.context, self.resource_id) is None)
if done:
# Reset nested, to indicate we changed status
self._nested = None
return ret
return done
elif status == self.FAILED:
raise exception.ResourceFailure(status_reason, self,
action=action)