mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 02:41:25 -07:00
* fix race condition between module and its action plugin
See https://github.com/ansible-collections/community.general/issues/1136.
Also remove irrelevant/unneeded display.v() and display.warning() around
connection reset.
* do not check for cookie if not in async mode
* add changelog fragment
(cherry picked from commit 3bc31f286e
)
Co-authored-by: quidame <quidame@poivron.org>
This commit is contained in:
parent
c826a81b40
commit
7da1f3ffea
3 changed files with 30 additions and 5 deletions
|
@ -551,6 +551,18 @@ def main():
|
|||
restored_state = state_to_restore
|
||||
|
||||
else:
|
||||
# Let time enough to the plugin to retrieve async status of the module
|
||||
# in case of bad option type/value and the like.
|
||||
if _back is not None:
|
||||
b_starter = to_bytes('%s.starter' % _back, errors='surrogate_or_strict')
|
||||
while True:
|
||||
if os.path.exists(b_starter):
|
||||
os.remove(b_starter)
|
||||
break
|
||||
else:
|
||||
time.sleep(0.01)
|
||||
continue
|
||||
|
||||
(rc, stdout, stderr) = module.run_command(MAINCOMMAND)
|
||||
if 'Another app is currently holding the xtables lock' in stderr:
|
||||
module.fail_json(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue