Alex Willmer

Results 363 comments of Alex Willmer

> But there still were some leftover idle processes on 19 remote hosts, which were all connected to processes on my control node host > Leftover idle processes > Output...

Mitogen 0.3.36 includes Marc's fix for this.

https://gist.github.com/moreati/7c31013c1fce5c9d6e1d18aaebd492c7

@dmurnane 1. Was there a time that these files got cleaned up? I.e. has this only started occuring recently? 2. What version of the Kubernetes collection are you running? Questions/notes...

> * Design opportunity? How might Ansible/Mitogen enable this cleanup without assuming `atexit` is the mechanism? Ansible may already have this in [`Module.add_cleanup_file()`](https://github.com/ansible/ansible/blob/bff3a9aeb91a19e42befd1f6839dfa6984f4d1ea/lib/ansible/module_utils/basic.py#L1433-L1435) and [`Module.cleanup()`](https://github.com/ansible/ansible/blob/bff3a9aeb91a19e42befd1f6839dfa6984f4d1ea/lib/ansible/module_utils/basic.py#L1672-L1675). Available since Ansible 1.7 https://github.com/ansible/ansible/commit/df877f2e79f3b5ddceb84dea6ee0dcd881e7c830

> Patching _atexit__register in ansible_mitogen/runner.py with `if func == shutil.rmtree or func == kubernetes.config.kube_config._cleanup_temp_files:` appears to clean up the files but this feels rather more fragile than is reasonable. [`kubernetes.config.kube_config._cleanup_temp_files`](https://github.com/kubernetes-client/python/blob/1d6c0768b3d7c6ebfb15ce61b05c7103986e8894/kubernetes/base/config/kube_config.py#L60-L67)...

Problem has some deisgn/constraint parallels with #1255, #1333 and #1342 1. Should there be an allow list? A deny list? 2. Should the list(s) be configurable? By API? By ...?

Speculating: - Does Mitogen need to persist the process that the Ansible module gets run in? Why? - Could Mitogen run the module in a per-task subprocess, spawned by a...

> Multiple hosts, delegated to the remote node, run_once: > ... > ```console > [dmurnane@host1 ~]$ ansible-playbook test.yaml > ... > > [dmurnane@host1 ~]$ ansible all -m shell -a 'ls...