Clear blocked hosts when a role duplicate task is found in free strategy
In the free strategy, we mark a host as blocked when it has work to do (the PlayIterator returns a task) to prevent multiple tasks from being sent to the host. However, we check for role duplicates after setting the blocked flag, but were not clearing that when the task was skipped leading to an infinite loop. This patch corrects that by clearing the blocked flag when the task is skipped. Fixes #15681
This commit is contained in:
parent
08f6283c3f
commit
d391c53b4f
1 changed files with 1 additions and 0 deletions
|
@ -123,6 +123,7 @@ class StrategyModule(StrategyBase):
|
||||||
# if there is metadata, check to see if the allow_duplicates flag was set to true
|
# if there is metadata, check to see if the allow_duplicates flag was set to true
|
||||||
if task._role._metadata is None or task._role._metadata and not task._role._metadata.allow_duplicates:
|
if task._role._metadata is None or task._role._metadata and not task._role._metadata.allow_duplicates:
|
||||||
display.debug("'%s' skipped because role has already run" % task)
|
display.debug("'%s' skipped because role has already run" % task)
|
||||||
|
del self._blocked_hosts[host_name]
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if task.action == 'meta':
|
if task.action == 'meta':
|
||||||
|
|
Loading…
Reference in a new issue