Comments (4)
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the component bot command.
from ansible.
TL;DR the following might be a quick fix:
diff --git a/lib/ansible/plugins/strategy/__init__.py b/lib/ansible/plugins/strategy/__init__.py
index efd69efe9b4..7665c8f6ff2 100644
--- a/lib/ansible/plugins/strategy/__init__.py
+++ b/lib/ansible/plugins/strategy/__init__.py
@@ -600,7 +600,7 @@ class StrategyBase:
# save the current state before failing it for later inspection
state_when_failed = iterator.get_state_for_host(original_host.name)
display.debug("marking %s as failed" % original_host.name)
- if original_task.run_once:
+ if original_task.run_once and not original_task.any_errors_fatal:
# if we're using run_once, we have to fail every host here
for h in self._inventory.get_hosts(iterator._play.hosts):
if h.name not in self._tqm._unreachable_hosts:
The underlying issue however I believe is that both run_once
and any_errors_fatal
are similar features. In the linear strategy run_once
implies any_errors_fatal
on the run_once
task. In #78680 we simplified the implementation of the any_errors_fatal
feature but it resulted in scenarios, like this issue describes, where these two features conflict with each other and hosts are failed twice.
I believe that a part of the problem is that run_once
and any_errors_fatal
are implemented in different places, in the general results processing in StrategyBase
and after the results are process in the linear
strategy, respectively. Since host_pinned
/free
do not support neither any_errors_fatal
or run_once
it might make sense to move both to the linear strategy although the compatibility for 3rd party strategies would have to be taken into account. Completion of #73483 would be beneficial to moving this forward too - it seems that the number of issues/PRs linked to that issue are slowly increasing.
from ansible.
FWIW I see the same behavior (RC=0 on 2.16 and RC=2 on 2.17) without setting any_errors_fatal: true
.
from ansible.
FWIW I see the same behavior (RC=0 on 2.16 and RC=2 on 2.17) without setting
any_errors_fatal: true
.
Yes, as I said:
In the linear strategy run_once implies any_errors_fatal on the run_once task.
so removing any_errors_fatal
from the play (block, task) in such a case does not effectively change anything internally.
from ansible.
Related Issues (20)
- dnf5 wildcard regression HOT 4
- missing example of to set 802-3-ethernet.wake-on-lan magic HOT 1
- ansible.builtin.replace incorrectly specifies after/before regexp HOT 1
- Ansible controller exponential memory usage when using handler listeners in collection HOT 5
- rpm_key module does nothing if it finds a partial match of already installed keys HOT 3
- Python 3.7 Support Removed To Early? HOT 6
- Avoid doing ssh connection if _remote_expand_user already failed HOT 2
- ansible.builtin.dnf doesn't install i686 packages HOT 1
- [ansible.builtin.copy] Fails on filesystems which do not support chmod HOT 7
- if ansible.builtin.fileglob plugin is used in ansible.builtin.template, it searches under files/ HOT 1
- Warnings about discovered Python interpreter on any play in version 2.17.0 HOT 3
- Regression with ansible_pkg_mgr discovery on Amazon Linux 2 HOT 7
- `file`: incomplete diff when creating parent directories HOT 1
- `file`: incomplete/misleading/missing diff when recursively setting attributes HOT 1
- systemd module silently fails to enable generated serviced unit HOT 8
- Add ability to break out of loop on a task HOT 2
- This breaks the ability to update RHEL-7 machines HOT 2
- `meta: end_host` returns `rc=2` when run in a rescue block HOT 1
- ansible.builtin.tempfile state:absent error HOT 5
- File descriptor leak in lib/ansible/plugins/connection/ssh.py HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible.