Closed Rizzly closed 5 years ago
Thanks for reporting this! I can't seem to reproduce it here. Would it be possible for you to tickle the bug again, but this time including "-vvvv" output?
First of all, sorry for the late response!
If I checkout https://github.com/dw/mitogen/commit/6f4cbc1ead3bb07ba4fd9357566503b01d5360ab I still get this same issue. But it seems the fix for https://github.com/dw/mitogen/issues/590 also fixes this.
Please tell me if you'd like further logs anyway. Otherwise, feel free to close this.
If it would be possible to provide '-vvv' output that would be great -- the trouble is that we may have fixed something entirely by accident, and could unfix it later should that fix ever be modified :) Thanks again
No problem! Here's the -vvvv
-output when running from https://github.com/dw/mitogen/commit/6f4cbc1ead3bb07ba4fd9357566503b01d5360ab:
noid.log
`TASK [prereqs : Groupe ] ****
task path: //ansible-XXXXX/roles/prereqs/tasks/users.yml:2
[mux 30818] 10:49:57.701076 D mitogen: PushFileService().propagate_to(Context(1006, u'ssh.XXXXX.sudo.root'), u'//XXXXX/lib/python2.7/site-packages/ansible/modules/system/group.py')
[task 31170] 10:49:57.705360 D mitogen: CallChain(Context(1006, u'ssh.XXXXX.sudo.root')).call_async(): ansible_mitogen.target.run_module(kwargs={u'module_map': {u'builtin': [u'ansible.module_utils._text', u'ansible.module_utils.basic', u'ansible.module_utils.common', u'ansible.module_utils.common._collections_compat', u'ansible.module_utils.common._json_compat', u'ansible.module_utils.common._utils', u'ansible.module_utils.common.collections', u'ansible.module_utils.common.file', u'ansible.module_utils.common.parameters', u'ansible.module_utils.common.process', u'ansible.module_utils.common.sys_info', u'ansible.module_utils.common.text', u'ansible.module_utils.common.text.converters', u'ansible.module_utils.common.text.formatters', u'ansible.module_utils.common.validation', u'ansible.module_utils.distro', u'ansible.module_utils.distro._distro', u'ansible.module_utils.parsing', u'ansible.module_utils.parsing.convert_bool', u'ansible.module_utils.pycompat24', u'ansible.module_utils.six'], u'custom': []}, u'emulate_tty': True, u'good_temp_dir': u'/tmp', u'module': u'group', u'cwd': None, u'service_context': Context(0, None), u'extra_env': None, u'is_python': None, u'env': {}, u'path': u'//XXXXX/lib/python2.7/site-packages/ansible/modules/system/group.py', u'runner_name': u'NewStyleRunner', u'interpreter_fragment': None, u'json_args': '{"_ansible_version": "2.8.1", "_ansible_selinux_special_fs": ["fuse", "nfs", "vboxsf", "ramfs", "9p"], "name": "sup", "_ansible_module_name": "group", "_ansible_debug": false, "_ansible_verbosity": 3, "_ansible_keep_remote_files": false, "_ansible_syslog_facility": "LOG_USER", "_ansible_socket": null, "state": "present", "gid": 9375, "_ansible_diff": false, "_ansible_remote_tmp": "/tmp", "_ansible_shell_executable": "/bin/sh", "_ansible_check_mode": false, "_ansible_tmpdir": null, "_ansible_string_conversion_action": "warn", "_ansible_no_log": false}'})
[mux 30818] 10:49:57.717353 D mitogen.ctx.ssh.XXXXX: mitogen: PushFileService().store_and_forward(u'//XXXXX/lib/python2.7/site-packages/ansible/modules/system/group.py', [blob: 17624 bytes], Context(1006, u'sudo.root')) 'mitogen.service.Pool.2372150.worker-3'
[mux 30818] 10:49:57.717701 D mitogen.ctx.ssh.XXXXX: mitogen: Context(1006, None).call_service_async(u'mitogen.service.PushFileService', 'store_and_forward', {'path': u'//XXXXX/lib/python2.7/site-packages/ansible/modules/system/group.py', 'data': [blob: 17624 bytes], 'context': Context(1006, u'sudo.root')})
[mux 30818] 10:49:57.717887 D mitogen.ctx.ssh.XXXXX: mitogen: Context(1006, None).send_async(Message(1006, 2, 2, 110, 1007, '\x80\x02X\x1f\x00\x00\x00mitogen.service.PushFileServiceq\x01X\x11\x00\x00\x00store'..18001))
[mux 30818] 10:49:57.718065 D mitogen.ctx.ssh.XXXXX.sudo.root: mitogen: _dispatch_one(('XXXXX-31170-7faa34cf9700-58b1c7f7a4586', u'ansible_mitogen.target', None, u'run_module', (), Kwargs({'kwargs': {u'module_map': {u'builtin': [u'ansible.module_utils._text', u'ansible.module_utils.basic', u'ansible.module_utils.common', u'ansible.module_utils.common._collections_compat', u'ansible.module_utils.common._json_compat', u'ansible.module_utils.common._utils', u'ansible.module_utils.common.collections', u'ansible.module_utils.common.file', u'ansible.module_utils.common.parameters', u'ansible.module_utils.common.process', u'ansible.module_utils.common.sys_info', u'ansible.module_utils.common.text', u'ansible.module_utils.common.text.converters', u'ansible.module_utils.common.text.formatters', u'ansible.module_utils.common.validation', u'ansible.module_utils.distro', u'ansible.module_utils.distro._distro', u'ansible.module_utils.parsing', u'ansible.module_utils.parsing.convert_bool', u'ansible.module_utils.pycompat24', u'ansible.module_utils.six'], u'custom': []}, u'emulate_tty': True, u'good_temp_dir': u'/tmp', u'module': u'group', u'interpreter_fragment': None, u'service_context': Context(0, None), u'extra_env': None, u'is_python': None, u'env': {}, u'path': u'//XXXXX/lib/python2.7/site-packages/ansible/modules/system/group.py', u'json_args': '{"_ansible_version": "2.8.1", "_ansible_selinux_special_fs": ["fuse", "nfs", "vboxsf", "ramfs", "9p"], "name": "sup", "_ansible_module_name": "group", "_ansible_debug": false, "_ansible_verbosity": 3, "_ansible_keep_remote_files": false, "_ansible_syslog_facility": "LOG_USER", "_ansible_socket": null, "state": "present", "gid": 9375, "_ansible_diff": false, "_ansible_remote_tmp": "/tmp", "_ansible_shell_executable": "/bin/sh", "_ansible_check_mode": false, "_ansible_tmpdir": null, "_ansible_string_conversion_action": "warn", "_ansible_no_log": false}', u'cwd': None, u'runner_name': u'NewStyleRunner'}})))
[mux 30818] 10:49:57.718321 D mitogen.ctx.ssh.XXXXX.sudo.root: mitogen: PushFileService().get(u'//XXXXX/lib/python2.7/site-packages/ansible/modules/system/group.py') waiting for uncached file to arrive
[mux 30818] 10:49:57.719695 D mitogen.ctx.ssh.XXXXX.sudo.root: mitogen: PushFileService().store_and_forward(u'//XXXXX/lib/python2.7/site-packages/ansible/modules/system/group.py', [blob: 17624 bytes], Context(1006, u'sudo.root')) 'mitogen.service.Pool.1b9de10.worker-6'
[task 31181] 10:49:57.723289 D mitogen: unix.connect(path='/tmp/mitogen_unix_LhlbVg.sock')
[mux 30818] 10:49:57.724246 D mitogen: mitogen.unix.Listener('/tmp/mitogen_unix_LhlbVg.sock'): accepted mitogen.core.Stream('unix_client.31181')
[task 31181] 10:49:57.724288 D mitogen: unix.connect(): local ID is 4040, remote is 0
[mux 30818] 10:49:57.724714 D mitogen.ctx.ssh.XXXXX.sudo.root: mitogen: PushFileService().get(u'//XXXXX/lib/python2.7/site-packages/ansible/modules/system/group.py') -> [blob: 17624 bytes]
[mux 30818] 10:49:57.724904 D mitogen.ctx.ssh.XXXXX.sudo.root: mitogen: Importer().find_module('ansible.module_utils.common.')
[mux 30818] 10:49:57.725066 D mitogen.ctx.ssh.XXXXX.sudo.root: mitogen: Importer(): master doesn't know u'ansible.module_utils.common.'
[mux 30818] 10:49:57.725237 D mitogen.ctx.ssh.XXXXX.sudo.root: mitogen: Importer().find_module('ansible.module_utils.common.text.')
[mux 30818] 10:49:57.725390 D mitogen.ctx.ssh.XXXXX.sudo.root: mitogen: Importer(): master doesn't know u'ansible.module_utils.common.text.'
[mux 30818] 10:49:57.725540 D mitogen.ctx.ssh.XXXXX.sudo.root: mitogen: Importer().find_module('ansible.module_utils.parsing.')
[mux 30818] 10:49:57.725687 D mitogen.ctx.ssh.XXXXX.sudo.root: mitogen: Importer(): master doesn't know u'ansible.module_utils.parsing.'
[mux 30818] 10:49:57.725831 D mitogen.ctx.ssh.XXXXX.sudo.root: mitogen: Importer().find_module('ansible.module_utils.six.')
[mux 30818] 10:49:57.725973 D mitogen.ctx.ssh.XXXXX.sudo.root: mitogen: Importer(): master doesn't know u'ansible.module_utils.six.'
[task 31181] 10:49:57.729767 D ansible_mitogen.planner: BinaryPlanner() rejected u'group'
[task 31181] 10:49:57.730061 D ansible_mitogen.planner: NewStylePlanner() accepted u'group' (filename u'//XXXXX/lib/python2.7/site-packages/ansible/modules/system/group.py')
[mux 30818] 10:49:57.733153 D mitogen: PushFileService().propagate_to(Context(6, u'ssh.X.sudo.root'), u'//XXXXX/lib/python2.7/site-packages/ansible/modules/system/group.py')
[task 31181] 10:49:57.735766 D mitogen: CallChain(Context(6, u'ssh.X.sudo.root')).call_async(): ansible_mitogen.target.run_module(kwargs={u'module_map': {u'builtin': [u'ansible.module_utils._text', u'ansible.module_utils.basic', u'ansible.module_utils.common', u'ansible.module_utils.common._collections_compat', u'ansible.module_utils.common._json_compat', u'ansible.module_utils.common._utils', u'ansible.module_utils.common.collections', u'ansible.module_utils.common.file', u'ansible.module_utils.common.parameters', u'ansible.module_utils.common.process', u'ansible.module_utils.common.sys_info', u'ansible.module_utils.common.text', u'ansible.module_utils.common.text.converters', u'ansible.module_utils.common.text.formatters', u'ansible.module_utils.common.validation', u'ansible.module_utils.distro', u'ansible.module_utils.distro._distro', u'ansible.module_utils.parsing', u'ansible.module_utils.parsing.convert_bool', u'ansible.module_utils.pycompat24', u'ansible.module_utils.six'], u'custom': []}, u'emulate_tty': True, u'good_temp_dir': u'/tmp', u'module': u'group', u'cwd': None, u'service_context': Context(0, None), u'extra_env': None, u'is_python': None, u'env': {}, u'path': u'//XXXXX/lib/python2.7/site-packages/ansible/modules/system/group.py', u'runner_name': u'NewStyleRunner', u'interpreter_fragment': None, u'json_args': '{"_ansible_version": "2.8.1", "_ansible_selinux_special_fs": ["fuse", "nfs", "vboxsf", "ramfs", "9p"], "name": "sup", "_ansible_module_name": "group", "_ansible_debug": false, "_ansible_verbosity": 3, "_ansible_keep_remote_files": false, "_ansible_syslog_facility": "LOG_USER", "_ansible_socket": null, "state": "present", "gid": 9375, "_ansible_diff": false, "_ansible_remote_tmp": "/tmp", "_ansible_shell_executable": "/bin/sh", "_ansible_check_mode": false, "_ansible_tmpdir": null, "_ansible_string_conversion_action": "warn", "_ansible_no_log": false}'})
[mux 30818] 10:49:57.739737 D mitogen.ctx.ssh.X: mitogen: PushFileService().store_and_forward(u'//XXXXX/lib/python2.7/site-packages/ansible/modules/system/group.py', [blob: 17624 bytes], Context(6, u'sudo.root')) 'mitogen.service.Pool.f25cd0.worker-3'
[mux 30818] 10:49:57.739997 D mitogen.ctx.ssh.X: mitogen: Context(6, None).call_service_async(u'mitogen.service.PushFileService', 'store_and_forward', {'path': u'//XXXXX/lib/python2.7/site-packages/ansible/modules/system/group.py', 'data': [blob: 17624 bytes], 'context': Context(6, u'sudo.root')})
[mux 30818] 10:49:57.740198 D mitogen.ctx.ssh.X: mitogen: Context(6, None).send_async(Message(6, 4, 4, 110, 1007, '\x80\x02X\x1f\x00\x00\x00mitogen.service.PushFileServiceq\x01X\x11\x00\x00\x00store'..18000))
[mux 30818] 10:49:57.749496 D mitogen.ctx.ssh.X.sudo.root: mitogen: PushFileService().store_and_forward(u'//XXXXX/lib/python2.7/site-packages/ansible/modules/system/group.py', [blob: 17624 bytes], Context(6, u'sudo.root')) 'mitogen.service.Pool.101c450.worker-6'
[mux 30818] 10:49:57.750107 D mitogen.ctx.ssh.X.sudo.root: mitogen: _dispatch_one(('XXXXX-31181-7faa34cf9700-58b1c7f7bf6f6', u'ansible_mitogen.target', None, u'run_module', (), Kwargs({'kwargs': {u'module_map': {u'builtin': [u'ansible.module_utils._text', u'ansible.module_utils.basic', u'ansible.module_utils.common', u'ansible.module_utils.common._collections_compat', u'ansible.module_utils.common._json_compat', u'ansible.module_utils.common._utils', u'ansible.module_utils.common.collections', u'ansible.module_utils.common.file', u'ansible.module_utils.common.parameters', u'ansible.module_utils.common.process', u'ansible.module_utils.common.sys_info', u'ansible.module_utils.common.text', u'ansible.module_utils.common.text.converters', u'ansible.module_utils.common.text.formatters', u'ansible.module_utils.common.validation', u'ansible.module_utils.distro', u'ansible.module_utils.distro._distro', u'ansible.module_utils.parsing', u'ansible.module_utils.parsing.convert_bool', u'ansible.module_utils.pycompat24', u'ansible.module_utils.six'], u'custom': []}, u'emulate_tty': True, u'good_temp_dir': u'/tmp', u'module': u'group', u'interpreter_fragment': None, u'service_context': Context(0, None), u'extra_env': None, u'is_python': None, u'env': {}, u'path': u'//XXXXX/lib/python2.7/site-packages/ansible/modules/system/group.py', u'json_args': '{"_ansible_version": "2.8.1", "_ansible_selinux_special_fs": ["fuse", "nfs", "vboxsf", "ramfs", "9p"], "name": "sup", "_ansible_module_name": "group", "_ansible_debug": false, "_ansible_verbosity": 3, "_ansible_keep_remote_files": false, "_ansible_syslog_facility": "LOG_USER", "_ansible_socket": null, "state": "present", "gid": 9375, "_ansible_diff": false, "_ansible_remote_tmp": "/tmp", "_ansible_shell_executable": "/bin/sh", "_ansible_check_mode": false, "_ansible_tmpdir": null, "_ansible_string_conversion_action": "warn", "_ansible_no_log": false}', u'cwd': None, u'runner_name': u'NewStyleRunner'}})))
[mux 30818] 10:49:57.750486 D mitogen.ctx.ssh.X.sudo.root: mitogen: Importer().find_module('ansible.module_utils.common.')
[mux 30818] 10:49:57.750763 D mitogen.ctx.ssh.X.sudo.root: mitogen: Importer(): master doesn't know u'ansible.module_utils.common.'
[mux 30818] 10:49:57.751005 D mitogen.ctx.ssh.X.sudo.root: mitogen: Importer().find_module('ansible.module_utils.common.text.')
[mux 30818] 10:49:57.751298 D mitogen.ctx.ssh.X.sudo.root: mitogen: Importer(): master doesn't know u'ansible.module_utils.common.text.'
[mux 30818] 10:49:57.751483 D mitogen.ctx.ssh.X.sudo.root: mitogen: Importer().find_module('ansible.module_utils.parsing.')
[mux 30818] 10:49:57.751664 D mitogen.ctx.ssh.X.sudo.root: mitogen: Importer(): master doesn't know u'ansible.module_utils.parsing.'
[mux 30818] 10:49:57.751824 D mitogen.ctx.ssh.X.sudo.root: mitogen: Importer().find_module('ansible.module_utils.six.')
[mux 30818] 10:49:57.751977 D mitogen.ctx.ssh.X.sudo.root: mitogen: Importer(): master doesn't know u'ansible.module_utils.six.'
[mux 30818] 10:49:57.758063 D mitogen.ctx.ssh.X.sudo.root: mitogen: _dispatch_calls: Message(6, 4040, 0, 101, 1003, '\x80\x02(U)XXXXX-31181-7faa34cf9700-58b1c7f7bf6f6q\x01X\x16'..2062) -> {u'stdout': u'', u'stderr': u'Traceback (most recent call last):\n File "master://ansible-XXXXX/library/mitogen-master/ansible_mitogen/runner.py", line 883, in _run\n self._run_code(code, mod)\n File "master://ansible-XXXXX/library/mitogen-master/ansible_mitogen/runner.py", line 862, in _run_code\n exec(\'exec code in vars(mod)\')\n File "
fatal: [XXXXX]: FAILED! => { "changed": false, "rc": 1 }
MSG:
MODULE FAILURE See stdout/stderr for the exact error
MODULE_STDERR:
Traceback (most recent call last):
File "master://ansible-XXXXX/library/mitogen-master/ansible_mitogen/runner.py", line 883, in _run
self._run_code(code, mod)
File "master://ansible-XXXXX/library/mitogen-master/ansible_mitogen/runner.py", line 862, in _run_code
exec('exec code in vars(mod)')
File "
[mux 30818] 10:49:57.769809 D mitogen: mitogen.core.Stream('unix_client.31181').on_disconnect()
The full traceback is:
Traceback (most recent call last):
File "master://ansible-XXXXX/library/mitogen-master/ansible_mitogen/runner.py", line 883, in _run
self._run_code(code, mod)
File "master://ansible-XXXXX/library/mitogen-master/ansible_mitogen/runner.py", line 862, in _run_code
exec('exec code in vars(mod)')
File "
fatal: [zet332o6]: FAILED! => { "changed": false, "rc": 1 }
MSG:
MODULE FAILURE See stdout/stderr for the exact error
MODULE_STDERR:
Traceback (most recent call last):
File "master://ansible-XXXXX/library/mitogen-master/ansible_mitogen/runner.py", line 883, in _run
self._run_code(code, mod)
File "master://ansible-XXXXX/library/mitogen-master/ansible_mitogen/runner.py", line 862, in _run_code
exec('exec code in vars(mod)')
File "
It was the same problem, thanks a ton for reporting and following up!
需要制定python的环境为 python3,就可以解决 You need to make the Python environment as Python 3, you can solve this problem
eg
[all:vars] ansible_python_interpreter=/usr/bin/python3
Change python defult version from 2.X to 3.X
lrwxrwxrwx 1 root root 9 Sep 24 10:19 /usr/bin/python3 -> python3.6 -rwxr-xr-x 2 root root 11336 May 30 15:42 /usr/bin/python3.6 -rwxr-xr-x 2 root root 11336 May 30 15:42 /usr/bin/python3.6m
Python 3.6.8
Execution log for playbook below
Which version of Ansible are you running? 2.8.0, the issue does not occur with 2.7.9
Is your version of Ansible patched in any way? No.
Are you running with any custom modules, or
module_utils
loaded? No, the problem occurs even when any custom modules are disabled.Have you tried the latest master version from Git? Of mitogen, yes. Of ansible, no.
Do you have some idea of what the underlying problem may be? Not really, except for the obvious fact that
id
is missing when using mitogen.Mention your host and target OS and versions Debian 9 on the host and ubuntu 16.04 on the target
Mention your host and target Python versions 2.7.13 on the host and 2.7.12 on the target
The issues can be reproduced by running the following playbook: