-
Notifications
You must be signed in to change notification settings - Fork 202
Open
Labels
affects-0.3Issues related to 0.3.X Mitogen releasesIssues related to 0.3.X Mitogen releasesbugCode feature that hinders desired execution outcomeCode feature that hinders desired execution outcome
Description
If the ansible temp directory is removed mid-play mitogen does not recreate it and the play fails.
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: _os.mkdir(file, 0o700)
fatal: [172.17.0.9]: FAILED! => {"msg": "Unexpected failure during module execution: builtins.FileNotFoundError: [Errno 2] No such file or directory: '/tmp/.ansible-test/tmp/ansible_mitogen_runner_y_absj50'
File \"<stdin>\", line 3876, in _dispatch_one
File \"master:/home/xxxxxxxx/work/mitogen-repro/.venv/lib/python3.10/site-packages/ansible_mitogen/target.py\", line 415, in run_module
return impl.run()
^^^^^^^^^^
File \"master:/home/d384492/work/mitogen-repro/.venv/lib/python3.10/site-packages/ansible_mitogen/runner.py\", line 445, in run
self.setup()
File \"master:/home/d384492/work/mitogen-repro/.venv/lib/python3.10/site-packages/ansible_mitogen/runner.py\", line 934, in setup
self._stdio = NewStyleStdio(self.args, self.get_temp_dir())
^^^^^^^^^^^^^^^^^^^
File \"master:/home/d384492/work/mitogen-repro/.venv/lib/python3.10/site-packages/ansible_mitogen/runner.py\", line 361, in get_temp_dir
self._temp_dir = tempfile.mkdtemp(
^^^^^^^^^^^^^^^^^
File \"/usr/lib/python3.11/tempfile.py\", line 507, in mkdtemp
_os.mkdir(file, 0o700)
", "stdout": ""}
Using the normal ansible strategy the temp directory is recreated and the play succeeds.
Ansible version: 2.14.15
Host OS: Ubuntu (WSL2)
Target OS: Debian12 (docker)
Host Python: Python 3.10.12
Target Python: Python 3.11.2
See https://github.com/markafarrell/mitogen-repro-issue-1061 for reproduction instructions
Metadata
Metadata
Assignees
Labels
affects-0.3Issues related to 0.3.X Mitogen releasesIssues related to 0.3.X Mitogen releasesbugCode feature that hinders desired execution outcomeCode feature that hinders desired execution outcome