mitogen-hq / mitogen

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

Ansible, Mitogen, Docker #640

Open armenr opened 5 years ago

armenr commented 5 years ago

I'm using a bit of an esoteric setup, but basically, I opt for Docker containers as my "vm" with Vagrant/

Running the ansible provisioner on a local Docker instance, I keep hitting this issue.

Even with mitogen_ssh_keepalive_count=100 mitogen breaks/gets disconnected on Ansible runs.


Friday 23 August 2019  16:59:31 +0400 (0:00:00.174)       0:01:06.700 *********
fatal: [base]: UNREACHABLE! => changed=false
  msg: 'Mitogen was disconnected from the remote environment while a call was in-progress. If you feel this is in error, please file a bug. Original error was: the respondent Context has disconnected'
  unreachable: true```

Would anyone happen to have a clue as to how to fix this? :)
dw commented 5 years ago

Can you please include '-vvv' output from your run and mention which module was being executed when it happened

Is it 100% repeatable?

The message literally just means the remote interpreter hung up the connection, possibly due to a crash, but the logs often reveal more in this case

s1113950 commented 4 years ago

@armenr here's an example way I use Ansible/Mitogen/Docker together: https://github.com/s1113950/mitogen-test/blob/master/roles/complex_args/tasks/main.yml#L5 I use this to verify that mitogen patches work on different OS hosts, since I don't have access to a ton of different test scenarios bare-metal. The test spins up a container, and then I run a playbook inside of it.