From 79cc0cc7b93b98ebb1e7e0d7f838fc1186d7bc47 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Wed, 18 Oct 2017 16:46:39 -0400 Subject: [PATCH] Don't attempt to update tmpl ID when resource in progress If we attempt to do a convergence update on a resource and find it already locked by another traversal, don't try to update the resource's current template ID or requirements data. Doing so will usually fail with the same exception, but it is unnecessary and leaves ERROR-level messages in the log. However, there is a race which could result in the call succeeding (i.e. if the other task releases the lock just after we fail to get it), and that could result in the resource not being updated at all. Change-Id: I6bde1f9359cd52c99cca092e8abc660bac8b3065 Closes-Bug: #1722371 --- heat/engine/resource.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/heat/engine/resource.py b/heat/engine/resource.py index d8f0cb626c..57747d7ccd 100644 --- a/heat/engine/resource.py +++ b/heat/engine/resource.py @@ -1384,6 +1384,8 @@ class Resource(status.ResourceStatus): runner(timeout=timeout, progress_callback=progress_callback) except UpdateReplace: raise + except exception.UpdateInProgress: + raise except BaseException: with excutils.save_and_reraise_exception(): update_templ_id_and_requires(persist=True)