Retrigger new traversals after resource cancellation

If we force-cancel a resource check operation (i.e. by killing the thread)
then there was a short window where another traversal could have started
and been waiting on the not-yet-cancelled resource. That traversal would
then hang forever, as there was nothing to retrigger it. This change
ensures we retrigger the latest traversal on the resource after
cancellation.

Change-Id: Iae27c9cc5c0895b52aef2f2c72686dc48ec5983c
Closes-Bug: #1727007
changes/71/516471/5
Zane Bitter 5 years ago committed by rabi
parent c9792b96d2
commit 4a30b2ff56
  1. 7
      heat/engine/check_resource.py

@ -177,8 +177,11 @@ class CheckResource(object):
except scheduler.Timeout:
self._handle_resource_failure(cnxt, is_update, rsrc.id,
stack, u'Timed out')
except CancelOperation:
pass
except CancelOperation as ex:
# Stack is already marked FAILED, so we just need to retrigger
# in case a new traversal has started and is waiting on us.
self._retrigger_new_traversal(cnxt, current_traversal, is_update,
stack.id, rsrc.id)
return False

Loading…
Cancel
Save