mitogen-hq / mitogen

Distributed self-replicating programs in Python
https://mitogen.networkgenomics.com/
BSD 3-Clause "New" or "Revised" License
2.34k stars 199 forks source link

Ansible 10 + mitogen_linear + reset_connection fails #1096

Open moreati opened 2 months ago

moreati commented 2 months ago

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

refs #1074

moreati commented 2 months ago

I suspect the following sequence/factors