mitogen: macOS 11 & 12: connections fail trying to execv non-existent path

  • Which version of Ansible are you running:

    ansible 2.10.4
    config file = /Users/dwt/Code/Projekte/sntl/provisioning/ansible/ansible.cfg
    configured module search path = ['/Users/dwt/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
    ansible python module location = /Users/dwt/.virtualenvs/sntl-provisioning/lib/python3.9/site-packages/ansible
    executable location = /Users/dwt/.virtualenvs/sntl-provisioning/bin/ansible
    python version = 3.9.1 (default, Jan  4 2021, 20:49:26) [Clang 12.0.0 (clang-1200.0.32.28)]
    
  • Is your version of Ansible patched in any way? no

  • Are you running with any custom modules, or module_utils loaded? yes, self written modules to extract local facts

  • Have you tried the latest master version from Git? yes

  • Mention your host and target OS and versions: host: macos 11.1, target: cents 7.9

  • Mention your host and target Python versions host: 2.7 and 3.9 (both tested)

  • If reporting a crash or hang in Ansible, please rerun with -vvv and include 200 lines of output around the point of the error, along with a full copy of any traceback or error text in the log: ansible.log

  • If reporting any kind of problem with Ansible, please include the Ansible version along with output of “ansible-config dump --only-changed”.

    ANSIBLE_PIPELINING(/path/to/ansible/ansible.cfg) = True
    ANSIBLE_SSH_CONTROL_PATH(/path/to/ansible/ansible.cfg) = %(directory)s/%%C
    CACHE_PLUGIN(/path/to/ansible/ansible.cfg) = jsonfile
    CACHE_PLUGIN_CONNECTION(/path/to/ansible/ansible.cfg) = ./.fact_cache/
    CACHE_PLUGIN_TIMEOUT(/path/to/ansible/ansible.cfg) = 86400
    DEFAULT_FORKS(/path/to/ansible/ansible.cfg) = 500
    DEFAULT_GATHERING(/path/to/ansible/ansible.cfg) = smart
    DEFAULT_HASH_BEHAVIOUR(/path/to/ansible/ansible.cfg) = merge
    DEFAULT_HOST_LIST(/path/to/ansible/ansible.cfg) = ['/path/to/ansible/inventory']
    DEFAULT_MANAGED_STR(/path/to/ansible/ansible.cfg) = This file is managed by Ansible. Don't make changes here, they will be overwritten.
    DEFAULT_ROLES_PATH(/path/to/ansible/ansible.cfg) = ['/path/to/ansible/roles', '/path/to/ansible/vendor/icinga2-ansible', '/path/to/ansible/vendor/ansible-icinga-monitoring', '/path/to/ansible/vendor/ansible-elasticsearch']
    DEFAULT_STDOUT_CALLBACK(/path/to/ansible/ansible.cfg) = yaml
    DEFAULT_STRATEGY(/path/to/ansible/ansible.cfg) = mitogen_linear
    DEFAULT_STRATEGY_PLUGIN_PATH(/path/to/ansible/ansible.cfg) = ['/path/to/ansible/vendor/mitogen/ansible_mitogen/plugins/strategy']
    DEFAULT_VAULT_PASSWORD_FILE(/path/to/ansible/ansible.cfg) = /path/to/ansible/scripts/open_the_vault.sh
    TRANSFORM_INVALID_GROUP_CHARS(/path/to/ansible/ansible.cfg) = ignore
    

The error I’m seeing is that a synchronize action fails because it seems to try to execl() a non-existent path on my local machine. The error is contained in the above linked file, but in shortened it is this:

Python(mitogen:dwt@nathan.fritz.box:29674): execv: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python(mitogen:dwt@nathan.fritz.box:29674): No such file or directory

This looks a lot like some bootstrap code, but I’m not sure why it tries to connect to the local machine - or am I missing something?

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 1
  • Comments: 15 (7 by maintainers)

Most upvoted comments

Any chance that this could be fixed on the 0.2-release branch as well for those of us still on ansible 2.9? Thanks.

Thank you, I’ve merged the branch

ansible 2.10.15
  config file = /pat/to/ansible/ansible.cfg
  configured module search path = ['/path/to/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /path/to/venv/lib/python3.9/site-packages/ansible
  executable location = /path/to/venv/bin/ansible
  python version = 3.9.7 (default, Oct 21 2021, 19:28:55) [Clang 13.0.0 (clang-1300.0.29.3)]

Tested with Python 3.9.7, ansible 2.10.7, and the mitogen branch you pointed to and it seems to work. Nice work!

I’m starting to understand the cause of this. On macOS 11 and 12 Python 2.7 is deprecated, and there is some sort of wrapper binary to print a warning to saying so. The wrapper interacts badly with Mitogen’s bootstrapping. My attempts to understand this, and fix it are in #877, be warned I am regularly rebasing and force pushing to that branch, and the code is far from being merge ready.