mirror of
https://github.com/saltstack/salt.git
synced 2025-04-10 14:51:40 +00:00
Fix batch mode hang indefinitely in some scenarios - unit tests to follow
This commit is contained in:
parent
17dcfa29fd
commit
6d10c20ea8
2 changed files with 11 additions and 2 deletions
1
changelog/66249.fixed.md
Normal file
1
changelog/66249.fixed.md
Normal file
|
@ -0,0 +1 @@
|
|||
Fix batch mode hang indefinitely in some scenarios
|
|
@ -83,7 +83,14 @@ class Batch:
|
|||
)
|
||||
break
|
||||
if m is not None:
|
||||
fret.add(m)
|
||||
if "failed" in ret[m] and ret[m]["failed"] is True:
|
||||
log.debug(
|
||||
"minion '%s' failed test.ping - will be returned as a down minion",
|
||||
m,
|
||||
)
|
||||
else:
|
||||
fret.add(m)
|
||||
|
||||
return (list(fret), ping_gen, nret.difference(fret))
|
||||
|
||||
def get_bnum(self):
|
||||
|
@ -292,11 +299,12 @@ class Batch:
|
|||
# We already know some minions didn't respond to the ping, so inform
|
||||
# inform user attempt to run a job failed
|
||||
salt.utils.stringutils.print_cli(
|
||||
"Minion '%s' failed to respond to job sent", minion
|
||||
f"Minion '{minion}' failed to respond to job sent"
|
||||
)
|
||||
|
||||
if self.opts.get("failhard"):
|
||||
failhard = True
|
||||
ret[minion] = data
|
||||
else:
|
||||
# If we are executing multiple modules with the same cmd,
|
||||
# We use the highest retcode.
|
||||
|
|
Loading…
Add table
Reference in a new issue