Fixing the way we iterate over child states for tasks

Previously we were first checking the fail/run state of the child
state for tasks/rescue/always portions of the block. Instead we are now
always recursively iterating over the child state and then evaluating
whether the child state is failed or complete before changing the failed/
run state within the current block.

Fixes #14324
This commit is contained in:
James Cammarata 2016-04-25 11:05:33 -04:00
parent 3a3e69f830
commit 1211a0fa12
2 changed files with 9 additions and 9 deletions

View file

@ -92,7 +92,7 @@ class StrategyModule(StrategyBase):
num_rescue += 1
elif s.run_state == PlayIterator.ITERATING_ALWAYS:
num_always += 1
display.debug("done counting tasks in each state of execution")
display.debug("done counting tasks in each state of execution:\n\tnum_setups: %s\n\tnum_tasks: %s\n\tnum_rescue: %s\n\tnum_always: %s" % (num_setups, num_tasks, num_rescue, num_always))
def _advance_selected_hosts(hosts, cur_block, cur_state):
'''