Commit Graph

767 Commits

Author SHA1 Message Date
Klaus Zerwes 54b9115f20
Update docs/ansible_detailed.rst
fixed supported ansible / python version listing

Co-authored-by: Alex Willmer <alex@moreati.org.uk>
2021-12-12 20:33:00 +01:00
Klaus Zerwes 56c341790c prepare support for ansible community 5 aka. core 2.12 2021-12-08 08:12:04 +01:00
Alex Willmer 552819e765 mitogen.parent: Detect and avoid Python2.7 wrapper on macOS 11 & 12
Without this errors such as the following occur
```
✗ MITOGEN_LOG_LEVEL=DEBUG python3 foo.py
Python: execv: (null): No such file or directory
Traceback (most recent call last):
  File "foo.py", line 16, in <module>
    target = router.local(python_path='/usr/bin/python2.7', debug=True)
  File "/Users/alex/src/mitogen2/mitogen/parent.py", line 2486, in local
    return self.connect(u'local', **kwargs)
  File "/Users/alex/src/mitogen2/mitogen/parent.py", line 2446, in connect
    return self._connect(klass, **mitogen.core.Kwargs(kwargs))
  File "/Users/alex/src/mitogen2/mitogen/parent.py", line 2426, in _connect
    conn.connect(context=context)
  File "/Users/alex/src/mitogen2/mitogen/parent.py", line 1708, in connect
    raise self.exception
mitogen.parent.EofError: EOF on stream; last 100 lines received:
MITO000
MITO001
```

Before
```
$ ./preamble_size.py
SSH command size: 625
Bootstrap (mitogen.core) size: 17007 (16.61KiB)

                              Original          Minimized           Compressed
mitogen.parent            97496 95.2KiB  50355 49.2KiB 51.6%  12663 12.4KiB 13.0%
mitogen.fork               8436  8.2KiB   4130  4.0KiB 49.0%   1648  1.6KiB 19.5%
mitogen.ssh               10892 10.6KiB   6952  6.8KiB 63.8%   2113  2.1KiB 19.4%
mitogen.sudo              12089 11.8KiB   5924  5.8KiB 49.0%   2249  2.2KiB 18.6%
mitogen.select            12325 12.0KiB   2929  2.9KiB 23.8%    964  0.9KiB 7.8%
mitogen.service           41644 40.7KiB  22431 21.9KiB 53.9%   5886  5.7KiB 14.1%
mitogen.fakessh           15599 15.2KiB   8011  7.8KiB 51.4%   2624  2.6KiB 16.8%
mitogen.master            48732 47.6KiB  24569 24.0KiB 50.4%   6768  6.6KiB 13.9%
```

After
```
$ ./preamble_size.py
SSH command size: 705
Bootstrap (mitogen.core) size: 17007 (16.61KiB)

                              Original          Minimized           Compressed
mitogen.parent            97885 95.6KiB  50516 49.3KiB 51.6%  12728 12.4KiB 13.0%
mitogen.fork               8436  8.2KiB   4130  4.0KiB 49.0%   1648  1.6KiB 19.5%
mitogen.ssh               10892 10.6KiB   6952  6.8KiB 63.8%   2113  2.1KiB 19.4%
mitogen.sudo              12089 11.8KiB   5924  5.8KiB 49.0%   2249  2.2KiB 18.6%
mitogen.select            12325 12.0KiB   2929  2.9KiB 23.8%    964  0.9KiB 7.8%
mitogen.service           41644 40.7KiB  22431 21.9KiB 53.9%   5886  5.7KiB 14.1%
mitogen.fakessh           15599 15.2KiB   8011  7.8KiB 51.4%   2624  2.6KiB 16.8%
mitogen.master            48733 47.6KiB  24570 24.0KiB 50.4%   6771  6.6KiB 13.9%
```
2021-12-05 18:31:21 +00:00
Alex Willmer 465ac8abff ansible: Fix AttributeError in kubectl connection 2021-11-22 23:19:03 +00:00
Alex Willmer e194a6367f ci: Fix version comparisons involving double digits
See https://gist.github.com/moreati/e7507c5b606b12ec0ddafcb7c8debbf1
2021-11-22 23:19:03 +00:00
Alex Willmer e6bc53ca3a mitogen.parent: Remove tabs from minimized first stage
Saves 4 bytes

Before
```
$ python preamble_size.py
SSH command size: 629
Bootstrap (mitogen.core) size: 17007 (16.61KiB)

                              Original          Minimized           Compressed
mitogen.parent            97497 95.2KiB  50356 49.2KiB 51.6%  12665 12.4KiB 13.0%
mitogen.fork               8436  8.2KiB   4130  4.0KiB 49.0%   1648  1.6KiB 19.5%
mitogen.ssh               10892 10.6KiB   6952  6.8KiB 63.8%   2113  2.1KiB 19.4%
mitogen.sudo              12089 11.8KiB   5924  5.8KiB 49.0%   2249  2.2KiB 18.6%
mitogen.select            12325 12.0KiB   2929  2.9KiB 23.8%    964  0.9KiB 7.8%
mitogen.service           41644 40.7KiB  22431 21.9KiB 53.9%   5886  5.7KiB 14.1%
mitogen.fakessh           15599 15.2KiB   8011  7.8KiB 51.4%   2624  2.6KiB 16.8%
mitogen.master            48732 47.6KiB  24569 24.0KiB 50.4%   6768  6.6KiB 13.9%
```

After
```
$ python preamble_size.py
SSH command size: 625
Bootstrap (mitogen.core) size: 17007 (16.61KiB)

                              Original          Minimized           Compressed
mitogen.parent            97496 95.2KiB  50355 49.2KiB 51.6%  12663 12.4KiB 13.0%
mitogen.fork               8436  8.2KiB   4130  4.0KiB 49.0%   1648  1.6KiB 19.5%
mitogen.ssh               10892 10.6KiB   6952  6.8KiB 63.8%   2113  2.1KiB 19.4%
mitogen.sudo              12089 11.8KiB   5924  5.8KiB 49.0%   2249  2.2KiB 18.6%
mitogen.select            12325 12.0KiB   2929  2.9KiB 23.8%    964  0.9KiB 7.8%
mitogen.service           41644 40.7KiB  22431 21.9KiB 53.9%   5886  5.7KiB 14.1%
mitogen.fakessh           15599 15.2KiB   8011  7.8KiB 51.4%   2624  2.6KiB 16.8%
mitogen.master            48732 47.6KiB  24569 24.0KiB 50.4%   6768  6.6KiB 13.9%
```
2021-11-18 18:40:19 +00:00
Alex Willmer dd6d73db37 mitogen.parent: Eliminate use of platform module in first stage
This reduces the size of the initial SSH command by 204 bytes, & may fix errors
running Mitogen on  macOS. AFAICT platform was used but not imported.

Before
```
$ python ./preamble_size.py
SSH command size: 833
Bootstrap (mitogen.core) size: 17007 (16.61KiB)

                              Original          Minimized           Compressed
mitogen.parent            97565 95.3KiB  50427 49.2KiB 51.7%  12689 12.4KiB 13.0%
mitogen.fork               8436  8.2KiB   4130  4.0KiB 49.0%   1648  1.6KiB 19.5%
mitogen.ssh               10892 10.6KiB   6952  6.8KiB 63.8%   2113  2.1KiB 19.4%
mitogen.sudo              12089 11.8KiB   5924  5.8KiB 49.0%   2249  2.2KiB 18.6%
mitogen.select            12325 12.0KiB   2929  2.9KiB 23.8%    964  0.9KiB 7.8%
mitogen.service           41644 40.7KiB  22431 21.9KiB 53.9%   5886  5.7KiB 14.1%
mitogen.fakessh           15599 15.2KiB   8011  7.8KiB 51.4%   2624  2.6KiB 16.8%
mitogen.master            48732 47.6KiB  24569 24.0KiB 50.4%   6768  6.6KiB 13.9%
```

After
```
$ python preamble_size.py
SSH command size: 629
Bootstrap (mitogen.core) size: 17007 (16.61KiB)

                              Original          Minimized           Compressed
mitogen.parent            97543 95.3KiB  50357 49.2KiB 51.6%  12665 12.4KiB 13.0%
mitogen.fork               8436  8.2KiB   4130  4.0KiB 49.0%   1648  1.6KiB 19.5%
mitogen.ssh               10892 10.6KiB   6952  6.8KiB 63.8%   2113  2.1KiB 19.4%
mitogen.sudo              12089 11.8KiB   5924  5.8KiB 49.0%   2249  2.2KiB 18.6%
mitogen.select            12325 12.0KiB   2929  2.9KiB 23.8%    964  0.9KiB 7.8%
mitogen.service           41644 40.7KiB  22431 21.9KiB 53.9%   5886  5.7KiB 14.1%
mitogen.fakessh           15599 15.2KiB   8011  7.8KiB 51.4%   2624  2.6KiB 16.8%
mitogen.master            48732 47.6KiB  24569 24.0KiB 50.4%   6768  6.6KiB 13.9%
```
2021-11-17 20:10:59 +00:00
Alex Willmer c61c063b4f Support for Ansible 3 & 4
fixes #834

Co-authored-by: Claude Becker (@upekkha)
Co-authored-by: Dolph Mathews (@dolph)
2021-11-12 22:10:53 +00:00
Denis Zalevskiy 84c567e265
Add podman connection support
Shameless copy of buildah connection with modifications of invocation to
fit podman CLI.

Signed-off-by: Denis Zalevskiy <dez@aiven.io>
2021-11-12 16:49:49 +02:00
Denis Zalevskiy 10caa4a104
Fix typo in buildah context creation docs
Signed-off-by: Denis Zalevskiy <dez@aiven.io>
2021-11-12 16:41:27 +02:00
Alex Willmer c5c65ab0d2 ci: Switch Continuous Integration to Tox
Also
 - Simplifies adding support for additional Ansible versions
 - Unifies Python package versioning in CI and local test environments
 - Matches Python versions tested, with those declared in setup.py
 - Expands targets covered by automated Ansible tests to
    - centos6, centos8
    - debian9, debian11
    - ubuntu1604, ubuntu2004
2021-11-10 20:17:53 +00:00
Alex Willmer e76eefb8be Fix miscellaneous spelling/formatting 2021-11-09 22:17:16 +00:00
Alex Willmer da3772cbff Increment version to 0.3.1.dev0 2021-11-09 19:06:29 +00:00
Alex Willmer a990eb3d77 CI: Remove obsolete reverse shell historically used to debug CI
This reverse shell was historically used to debug CI jobs interactively.
It is not used anymore, and may be causing jobs to hang, then timeout.
There is no reason to keep it, and removing it simplifies CI jobs.

Additionally it has been reported as flagged by security scanners, so
removing it makes Mitogen easier to package/adopt.

fixes #847
2021-10-21 22:13:12 +01:00
Philippe Kueck bdbc9fe827
changelog entry for #827 2021-07-01 11:30:27 +02:00
Steven Robertson 234dde5fc1 check Ansible version before loaders are loaded 2021-02-07 13:09:17 -08:00
Alex Willmer bce3bab3e8 Add the msvcrt moduleto the default module deny list
Commit https://github.com/python/cpython/commit/880d42a3b247 (first
released in Python 3.8a0) moved an import of msvcrt from an if <win32>
block, into a try/except block. So now the import is tried even on Linux
or MacOS.

https://docs.python.org/3/library/msvcrt.html is a Windows specific
builtin.
2021-01-25 22:18:36 +00:00
Alex Willmer 1e72ebaf8b tests: Update test coverage to Python 3.9
The Travis Linux distribution must be upgraded because the Trusty
(Ubuntu 14.04) image does not have Python 3.9. Xenial (Ubuntu 16.04) is
the earliest version that offers Python 3.9.

I have not chosen a later release, in order to aid restoration of Python
2.4 - 2.6 tests.
2021-01-25 22:18:25 +00:00
David Wilson fad6eb1b47 Bump copyright year and use generic author name (testing Travis) 2021-01-14 20:07:47 +00:00
Steven Robertson f489478127 code cleanup + adds 0.2.10 + 0.3.0 changelog 2020-12-27 21:06:37 -08:00
Steven Robertson 8d3da2dbd2
Merge branch 'master' into patch-1 2020-12-23 17:36:49 -08:00
Alex Willmer 79b4c0f815 tests: Fix AttributeError in callback plugins used by test suite
CALLBACK_VERSION et al are documented as required in
https://docs.ansible.com/ansible/2.10/dev_guide/developing_plugins.html#callback-plugins.
The need for document_fragment is noted in
cfa8075537/lib/ansible/plugins/callback/default.py (L28-L32)

Fixes #758

This addresses the following error, seen while running
`ansible_tests.py`.

```
TASK [Gathering Facts gather_timeout=10, gather_subset=['all']]
****************
task path:
/home/alex/src/mitogen/tests/ansible/regression/issue_109__target_has_old_ansible_installed.yml:4
[WARNING]: Failure using method (v2_runner_on_start) in callback plugin
(<ansible.plugins.callback.nice_stdout.CallbackModule object at
0x7f76b3dad090>): 'show_per_host_start'
Callback Exception:
File
"/home/alex/src/mitogen/.tox/py27-ansible2.10/lib/python2.7/site-packages/ansible/executor/task_queue_manager.py",
line 372, in send_callback
    method(*new_args, **kwargs)
File
"/home/alex/src/mitogen/.tox/py27-ansible2.10/lib/python2.7/site-packages/ansible/plugins/callback/default.py",
line 240, in v2_runner_on_start
    if self.get_option('show_per_host_start'):
File
"/home/alex/src/mitogen/.tox/py27-ansible2.10/lib/python2.7/site-packages/ansible/plugins/callback/__init__.py",
line 91, in get_option
    return self._plugin_options[k]
Callback Exception:
File
"/home/alex/src/mitogen/.tox/py27-ansible2.10/lib/python2.7/site-packages/ansible/executor/task_queue_manager.py",
line 372, in send_callback
    method(*new_args, **kwargs)
File
"/home/alex/src/mitogen/.tox/py27-ansible2.10/lib/python2.7/site-packages/ansible/plugins/callback/default.py",
line 240, in v2_runner_on_start
    if self.get_option('show_per_host_start'):
File
"/home/alex/src/mitogen/.tox/py27-ansible2.10/lib/python2.7/site-packages/ansible/plugins/callback/__init__.py",
line 91, in get_option
    return self._plugin_options[k]
[task 339882] 00:00:08.172036 D ansible_mitogen.affinity: CPU mask for
WorkerProcess: 0x000004
Callback Exception:
File
"/home/alex/src/mitogen/.tox/py27-ansible2.10/lib/python2.7/site-packages/ansible/executor/task_queue_manager.py",
line 372, in send_callback
    method(*new_args, **kwargs)
File
"/home/alex/src/mitogen/.tox/py27-ansible2.10/lib/python2.7/site-packages/ansible/plugins/callback/default.py",
line 240, in v2_runner_on_start
    if self.get_option('show_per_host_start'):
File
"/home/alex/src/mitogen/.tox/py27-ansible2.10/lib/python2.7/site-packages/ansible/plugins/callback/__init__.py",
line 91, in get_option
    return self._plugin_options[k]
```
2020-11-14 14:40:16 +00:00
Alex Willmer b0ce29dcfd ssh: Match newer ssh host key prompt that accepts the fingerprint
This fixes an ERROR in test_accept_enforce_host_keys() while running the
test suite.

Fixes #756
2020-11-08 20:49:50 +00:00
Steven Robertson 7d4a57d16a
Merge branch 'master' into patch-1 2020-09-20 15:17:02 -07:00
Nicolas Mattia 4d48f140a8 Fix typo in Ansible documentation 2020-06-26 12:21:44 +02:00
Luiz Ribeiro 0e47280e43
Fix mitogen_ssh_keepalive_interval documentation 2020-06-07 11:00:32 -04:00
Scott Buchanan fa7c0191ee
correct latest ansible version supported 2020-04-27 19:52:19 -04:00
Steven Robertson 2d7e019dd2
Update docs/ansible_detailed.rst
Co-Authored-By: Jacob Floyd <cognifloyd@gmail.com>
2020-03-17 21:09:13 -07:00
Steven Robertson 1dddfadf32 removing note saying ansible 2.8 interpreter discovery doesn't work 2020-02-05 15:28:29 -08:00
Steven Robertson e8f3154cab Merge branch 'master' into complexAnsiblePythonInterpreterArg 2019-11-15 16:08:51 -08:00
David Wilson d6329f3446 Merge devel/290 @ 79b979ec8544ef5d8620c64068d4a42fabf50415 2019-11-02 16:46:59 +00:00
Steven Robertson bca9d9bf67 added info to ansible_detailed.rst explaining new ansible_python_interpreter functionality 2019-10-30 15:05:02 -07:00
David Wilson e3c514d906 issue #633: update Changelog. 2019-08-20 15:52:00 +01:00
David Wilson ed33236c71 docs: , -> : 2019-08-18 19:12:37 +01:00
David Wilson 9b79986859 docs: use new manpage alias in one more place 2019-08-18 19:12:37 +01:00
David Wilson 7a391022ef docs: update Changelog for 0.2.8. 2019-08-18 16:23:03 +01:00
David Wilson 4bd0a234ce docs: lots more changelog concision 2019-08-18 15:49:24 +01:00
David Wilson 8a11dea075 docs: changelog concision 2019-08-18 13:20:18 +01:00
David Wilson efe91092dc docs: more changelog tweaks 2019-08-18 02:00:21 +01:00
David Wilson 52c070efc0 docs: reorder chapters 2019-08-18 01:12:42 +01:00
David Wilson 8844d5f5cc docs: versionless <title> 2019-08-18 01:12:24 +01:00
David Wilson 9b6792829d docs: update supported Ansible version, mention unsupported features 2019-08-18 01:06:48 +01:00
David Wilson 80bc5c7d8b docs: changelog fixes/tweaks 2019-08-18 01:06:48 +01:00
David Wilson a56930e913 issue #590: update Changelog. 2019-08-18 01:06:48 +01:00
David Wilson 4caca80962 issue #627: reduce the default pool size in a child to 2.
Ansible has no blocking services running, or really any service that
would have an outsized benefit from multiple IO waiters. Probably we
only need 1, but let's start with 2 just in case.
2019-08-17 19:46:08 +01:00
David Wilson 26a9fed396 docs: some more hyperlink joy 2019-08-17 18:32:47 +01:00
David Wilson d75c9cffc3 docs: add domainrefs plugin to make link aliases everywhere \o/
PATENT PENDING
2019-08-17 18:32:47 +01:00
David Wilson 6b180a4091 docs: link IS_DEAD in changelog 2019-08-17 18:32:47 +01:00
David Wilson 01a1914a1f docs: tweaks to better explain changelog race 2019-08-17 18:32:47 +01:00
David Wilson bcca47df3c issue #533: update routing to account for DEL_ROUTE propagation race 2019-08-17 14:48:08 +01:00