Skip to content
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 + mitogen_linear + reset_connection fails #1096

Open
moreati opened this issue Aug 6, 2024 · 1 comment
Open

Ansible 10 + mitogen_linear + reset_connection fails #1096

moreati opened this issue Aug 6, 2024 · 1 comment
Labels
affects-0.3 Issues related to 0.3.X Mitogen releases bug Code feature that hinders desired execution outcome

Comments

@moreati
Copy link
Member

moreati commented Aug 6, 2024

meta: reset_connection fails in combination with strategy: mitogen_linear and ansible_host_key_checking: true. The same combination works with vanilla Ansible (strategy: linear)

[targets]
hkc-true ansible_host=localhost ansible_host_key_checking=true
- hosts: targets
  gather_facts: false
  tasks:
    - meta: reset_connection
~/src/mitogen/tests/ansible$ ANSIBLE_STRATEGY=mitogen_linear ../../.tox/py312-mode_ansible-ansible10/bin/ansible-playbook -i mrc.ini mrc.yml 
/home/alex/src/mitogen/.tox/py312-mode_ansible-ansible10/lib/python3.12/site-packages/paramiko/pkey.py:59: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
  'cipher': algorithms.TripleDES,

PLAY [targets] *********************************************************************************************************

TASK [meta _raw_params=reset_connection] *******************************************************************************
Tuesday 06 August 2024  09:46:09 +0000 (0:00:00.060)       0:00:00.060 ******** 
ERROR! Host key checking is enabled, and SSH reported an unrecognized or mismatching host key.
~/src/mitogen/tests/ansible$ ../../.tox/py312-mode_ansible-ansible10/bin/ansible-playbook -i mrc.ini mrc.yml 
/home/alex/src/mitogen/.tox/py312-mode_ansible-ansible10/lib/python3.12/site-packages/paramiko/pkey.py:59: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
  'cipher': algorithms.TripleDES,

PLAY [targets] *********************************************************************************************************

TASK [meta _raw_params=reset_connection] *******************************************************************************
Tuesday 06 August 2024  09:46:30 +0000 (0:00:00.015)       0:00:00.015 ******** 

PLAY RECAP *************************************************************************************************************

Tuesday 06 August 2024  09:46:30 +0000 (0:00:00.005)       0:00:00.020 ******** 
=============================================================================== 
meta ------------------------------------------------------------------------------------------------------------ 0.01s
Playbook run took 0 days, 0 hours, 0 minutes, 0 seconds
  • Which version of Ansible are you running? 2.10

  • Is your version of Ansible patched in any way? no

  • Are you running with any custom modules, or module_utils loaded? no

  • Have you tried the latest master version from Git? yes (0.3.9dev0)

refs #1074

@moreati moreati added bug Code feature that hinders desired execution outcome affects-0.3 Issues related to 0.3.X Mitogen releases labels Aug 6, 2024
@moreati
Copy link
Member Author

moreati commented Aug 6, 2024

I suspect the following sequence/factors

  • Mitogen is not shortcircuiting the meta action correctly, on the controller
  • Ansible is attempting to discover the target python interpreter
  • Ansible 9 dealt with the failure to connect/discover by using a fallback interpreter (e.g. /usr/bin/python)
  • Ansible 10 no longer performs the fallback, so failure to discover is treated as host unreachable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-0.3 Issues related to 0.3.X Mitogen releases bug Code feature that hinders desired execution outcome
Projects
None yet
Development

No branches or pull requests

1 participant