Commit Graph

442 Commits (fdf3484a2a828bb18c3dd940345ad063a6c4d979)

Author SHA1 Message Date
David Wilson 402dba4197 module_finder: pass raw file to compile()
Newer Ansibles have e.g. UTF-8 present in apt.py.
5 years ago
David Wilson 1aceacf89e [stream-refactor] replace old detach_popen() reference 5 years ago
David Wilson 300f8b2ff9 ansible: fixturize creation of MuxProcess
This relies on the previous commit resetting global variables.

Update clean_shutdown() to handle duplicate calls, due to tests
repeatedly installing it.
5 years ago
David Wilson 26b6333787 [stream-refactor] fix unix.Listener construction 5 years ago
Jordan Webb 1a02a86331
Add buildah transport 6 years ago
David Wilson 7ae926b325 ansible: prevent tempfile.mkstemp() leaks.
This avoids a leak present in Ansible 2.7.0..current HEAD, and all
similar leaks.

See ansible/ansible#57327.
6 years ago
David Wilson 3620fce071 issue #593: expose configurables for SSH keepalive and increase the default 6 years ago
David Wilson 0b7fd3f290 issue #591: ansible: restore CWD prior to AnsibleModule initialization. 6 years ago
David Wilson 4f23f0bec1 issue #590: update comment to indicate the hack is permanent 6 years ago
David Wilson 1a92995a24 issue #590: include nasty workaround for sys.modules junk 6 years ago
David Wilson 92b4724010 issue #587: consistent become_exe() behaviour for older Ansibles. 6 years ago
David Wilson f35194fe0f issue #587: mitogen_doas should not become_exe for doas_path
Looks like this has always been wrong - when used as a connection
method, PlayContext.become_method/become_exe may hold totally unrelated
data.
6 years ago
David Wilson c1c8d5c31e issue #587: 2.8 PlayContext lacks sudo_flags attribute.
This is a huge bodge.
6 years ago
David Wilson e11b251c75 issue #587: 2.8 PluginLoader.get() introduced new collection_list kwarg 6 years ago
David Wilson 46dde95962 issue #587: 2.8 PlayContext.connection no longer contains connection name
Not clear what the intention is here. Either need to ferret it out of
some other location, or just stop preloading the connection class in the
top-level process.
6 years ago
David Wilson 4a614c3950 issue #587: bump max Ansible version 6 years ago
David Wilson f105a81e20 ansible: descriptive version check during startup. 6 years ago
David Wilson f30a4c05c8 issue #581: expose mitogen_mask_remote_name variable. 6 years ago
David Wilson 65deb3feac issue #575: fix exception text rendering 6 years ago
David Wilson 34fb9da1be issue #570: add firewalld to always-fork list for now. 6 years ago
David Wilson 3ff6123483 issue #557: support correct cpu_set_t size 6 years ago
David Wilson 2bd0bbd4df issue #555: ansible: workaround ancient reload(sys) hack.
This is the most minimal change for what might be relatively minimal
edge case. Alternative is replacing reload(), but let's not do that yet.

Closes #555
6 years ago
David Wilson 6309774be2 issue #554: fix Ansible 2.4 compatibility 6 years ago
David Wilson 7743e57ff3 issue #554: track and remove multiple make_tmp_path() calls. 6 years ago
David Wilson 7dacb68eeb issue #552: include process identity in log messages. 6 years ago
David Wilson 26e6194d0a issue #548: always treat transport=smart as 'ssh' for mitogen_via=.
The idea behind transport=smart is to select between paramiko and
OpenSSH given the availability of connection multiplexing and/or OSX
kernel bugs. We need to make no such choice.
6 years ago
David Wilson 458a4faa97 ansible: create stub __init__.py for sdist.
This went into 0.2.5 sdist tarball but it's not checked in.
6 years ago
David Wilson 8f9c67daf1 ansible: refactor affinity class and add abstract tests. 6 years ago
David Wilson 0f30808234 ansible: quiesce boto logger; closes #541. 6 years ago
David Wilson 7fd0d34910 tests/ansible: Spec.port() test & mitogen_via= fix.
ansible_ssh_port was not respected.
6 years ago
David Wilson 1f77d24bec Update copyright year everywhere. 6 years ago
David Wilson b5b23e8f3d tests/ansible: Spec.become_pass() test. 6 years ago
David Wilson ae5a471e31 issue #539: disable logger propagation. 6 years ago
David Wilson 1c955a9876 ansible: capture stderr stream of async tasks. Closes #540. 6 years ago
David Wilson 7ff4e6694c issue #536: rework how 2.3-compatible simplejson is served
Regardless of the version of simplejson loaded in the master, load up
the ModuleResponder cache with our 2.4-compatible version.

To cope with simplejson being loaded due to modules like ec2_group that
try to import it before importing 'json', also update target.py to
remove it from the whitelist if a local 'json' module import succeeds.
6 years ago
David Wilson 8ae6ca1d5b tests/ansible: Spec.become_method() test & mitogen_via= fix.
ansible_become_method hostvar was not taken into account.
6 years ago
David Wilson d1cadf8ac8 tests/ansible: Spec.password() test, document interactive pw limitation. 6 years ago
David Wilson 21ad299d7b tests/ansible: Spec.remote_user() test & mitogen_via= fix.
ansible_ssh_user precedence was incorrect.
6 years ago
David Wilson 748f5f675d tests/ansible: Spec.remote_addr() test & mitogen_via= fix.
ansible_ssh_host was not respected.
6 years ago
David Wilson e1df98168c issue #536: add mitogen_via= tests too. 6 years ago
David Wilson 604b418412 ansible: fix a crash on 2.3 when mitogen_via= host is missing. 6 years ago
David Wilson 001e3fee86 issue #536: restore correct Python interpreter selection behaviour. 6 years ago
David Wilson 05b1ccb658 ansible: stash PID files in CWD if requested for debugging. 6 years ago
David Wilson eb67fbe9d2 ansible: double the default pool size.
Tempted to push this up to 64, but let's do it incrementally just in
case.
6 years ago
David Wilson b89e53fd70 ansible: raise error with correct exception type. 6 years ago
David Wilson 0e193c223c issue #508: master: minify all Mitogen/ansible_mitogen sources.
Minify-safe files are marked with a magical "# !mitogen: minify_safe"
comment anywhere in the file, which activates the minifier. The result
is naturally cached by ModuleResponder, therefore lru_cache is gone too.

Given:

    import os, mitogen
    @mitogen.main()
    def main(router):
        c = router.ssh(hostname='k3')
        c.call(os.getpid)
        router.sudo(via=c)

SSH footprint drops from 56.2 KiB to 42.75 KiB (-23.9%)
Ansible "shell: hostname" drops 149.26 KiB to 117.42 KiB (-21.3%)
6 years ago
David Wilson 7badb4a25b ansible: hacky parser to alow bools to be specified on command line 6 years ago
David Wilson b499fbe29b ansible: add mitogen_ssh_compression variable. 6 years ago
David Wilson a2ae4ed696 SyntaxError. 6 years ago
David Wilson a9d48a8fdc ansible: don't pin controller if <4 cores. 6 years ago