-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ansible 10 with mitogen 0.3.9: SyntaxError: future feature annotations is not defined and interpreter discovery warning #1105
Comments
Using Python 3.12 on the controller (macOS 14.6, venv) and a Debian 11 target (Proxmox LXC guest) I couldn't reproduce this.
|
Could you provide a minimal reproduction without ARA (e.g. single task playbook or /usr/bin/ansible invocation)? I don't think ARA would make a difference, but it's hard for me to rule out completely. |
I believe the issue is with the target hosts still having python2 installed: ssh $hostname "ls -lsh /usr/bin/python*"
0 lrwxrwxrwx 1 root root 7 Mar 2 2021 /usr/bin/python -> python2
0 lrwxrwxrwx 1 root root 9 Jul 28 2021 /usr/bin/python2 -> python2.7
3.4M -rwxr-xr-x 1 root root 3.4M Sep 19 2023 /usr/bin/python2.7
0 lrwxrwxrwx 1 root root 9 Apr 5 2021 /usr/bin/python3 -> python3.9
5.3M -rwxr-xr-x 1 root root 5.3M Feb 28 2021 /usr/bin/python3.9 Minimal reproduction using Vagrant:
ansible.cfg: [defaults]
inventory = ./hosts.yml
strategy = mitogen_linear
strategy_plugins = /home/ifalatik/projects/python-venvs/ansible/lib/python3.12/site-packages/ansible_mitogen/plugins/strategy playboook.yml: ---
- hosts: all
tasks:
- name: Ping
ping: results in:
|
Hi there, is there any work being done on this? Do you need more information? |
I also believe this to be an issue with interpreter discovery with mitogen using python2 on systems where It also seems that mitogen fails to consider the global ansible python interpreter configuration? While setting
Feel free to tell me if that would need a separate issue |
still broken in 3.11 |
I am seeing the above-mentioned warning with the following:
Setting
|
still broken in 3.19 with ansible 11 (core 2.18) |
I verified the above issue on the following combinations: Ansible-core = 2.17.6
But running with ANSIBLE_STRATEGY=linear I get a similar problem:
So is this not related to Mitogen? I get the same problem on any ansible-core >= 2.17.0... All below works.... |
@marbud0 What you're seeing is expected and, as far as I can tell, unrelated to this: ansible-core 2.17 drops support for python 3.6 so those hosts simply cannot work with ansible-core>=2.17 |
After upgrading to ansible v10.3.0 and mitogen 0.3.9 I now receive the following error before the first role of my playbook is executed:
I also receive this warning, before the first task is executed:
These didn't occur previously, don't occur without mitogen strategies and don't occur when setting
ansible_python_interpreter=/usr/bin/python3.9
explicitely.Host information
Target information
Verbose ansible:
(
... -vvv 2>&1 | grep 'future feature annotations' -C50
)Ansible config:
The text was updated successfully, but these errors were encountered: