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
This commit is contained in:
parent
bb330ae1a6
commit
79cc0cc7b9
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user