Commit Graph

1081 Commits (faaac43a78384b79b790c18e98a7053fea6729aa)
 

Author SHA1 Message Date
David Wilson faaac43a78 Disable SSH variables test on vanilla Ansible. 7 years ago
David Wilson 68d6e6bf34 ansible: tests for all SSH variables.
Closes #184.
7 years ago
dw f01f237e6d
Merge pull request #247 from dw/issue179
issue #179: don't reap first stage until core_src_fd is drained.
7 years ago
David Wilson def22c226f issue #179: don't reap first stage until core_src_fd is drained.
Bootstrap would hang if (as of writing) a pipe sufficient to hold 42,006
bytes was not handed out by the kernel to the first stage. It was luck
that this didn't manifest before, as first stage could write the full
source and exit completely before reading begun.

It is not clear under which circumstances this could previously occur,
but at least since Linux 4.5, it can be triggered if
/proc/sys/fs/pipe-max-size is reduced from the default of 1MiB, which
can have the effect of capping the default pipe buffer size of 64KiB to
something lower.

Suspicion is that buffer pipe size could also be reduced under memory
pressure, as reference to busy machines appeared a few times in the bug
report.
7 years ago
dw 3ff37113e2
Merge pull request #246 from dw/issue179
issue #179: ec0_receive() and connect_bootstrap() should use deadline.
7 years ago
David Wilson d65e047b12 issue #179: ec0_receive() and connect_bootstrap() should use deadline.
Now there is a single global deadline derived from ansible.cfg timeout=
value.
7 years ago
dw 2c309a378a
Merge pull request #245 from dw/dmw
Log masking, unlinked contributors page, resolv.conf fix, unidirectional routing
7 years ago
David Wilson bd2cc0830c Enable unidirectional routing in Ansible; closes #132. 7 years ago
David Wilson 356647bef4 issue #132: initial unidirectional routing mode. 7 years ago
David Wilson 2a4157723a tests: fix breakage from moving is_stdlib_name() 7 years ago
David Wilson 7d9b7eec0c tests: must wrap log_to_file() in is_master
Without it, end up with a billion loggers attached in some tests
7 years ago
David Wilson f96c552f87 issue #217: initial module scanner code.
This is sketch code, it's being done separately from mitogen.master.* to
begin with to avoid breaking what's there.
7 years ago
David Wilson 48535cc661 docs: more accurate bullet. 7 years ago
David Wilson d148e3db4e docs: move installation section above demo 7 years ago
David Wilson e615265ebd master: make is_stdlib_path() a free function
For Ansible module loader work.
7 years ago
David Wilson 2ad0d0521d ansible: reload /etc/resolv.conf for each task.
The OpenShift installer modifies /etc/resolv.conf then tests the new
resolver configuration, however, there was no mechanism to reload
resolv.conf in our reuseable interpreter.

https://github.com/openshift/openshift-ansible/blob/release-3.9/roles/openshift_web_console/tasks/install.yml#L137

This inserts an explicit call to res_init() for every new style
invocation, with an approximate cost of ~1usec on Linux since glibc
verifies resolv.conf has changed before reloading it.

There is little to be done for users of the thread-safe resolver APIs,
their state is hidden from us. If bugs like that manifest, whack-a-mole
style 'del sys.modules[thatmod]' patches may suffice.
7 years ago
David Wilson c00e7ed367 tests: paralellize vanilla Ansible run. 7 years ago
David Wilson 60781ecab6 tests: fix test for vanilla Ansible. 7 years ago
David Wilson eb56a8f98d tests: add debug 7 years ago
David Wilson 9b761a2baf docs: initial contributors page 7 years ago
David Wilson 267f787d20 issue #217: tests: import (unused) module_utils tests. 7 years ago
David Wilson ee741da2b3 tests: reenable remaining Ansible tests. 7 years ago
David Wilson a37ccabd91 core: wrapper functions provide no protection in this case 7 years ago
David Wilson 49eae23f92 issue #218: ansibe: use Secret and Blob types. 7 years ago
David Wilson cecef992b0 issue #218: core: add Secret and Blob types. 7 years ago
dw e56104ff15
Merge pull request #244 from dw/dmw
Dmw
7 years ago
David Wilson be5c03c152 tests: many test fixes. Travis broken for >1 week. 7 years ago
David Wilson 2c141a741c tests: remove -vvv, Travis only does 4MB of log. 7 years ago
David Wilson ac9f416bc1 tests: make Ansible tests run again. 7 years ago
David Wilson 69f58875c8 tests: more ansible fixes from recent brakage. 7 years ago
David Wilson b20174729d issue #199: fix readonly_homedir test. 7 years ago
David Wilson f98279fc95 tests: fix LRU test after splitting up Connection class.
The module the connection class is now loaded as is
"ansible.plugins.connection.mitogen_ssh", etc., which breaks the test.
Instead, check if the connection is an instance of the base Connection
class.
7 years ago
David Wilson 42cc009b60 service: don't sleep on empty Select during shutdown.
Avoids a select error during random CTRL+C.
7 years ago
David Wilson ad1f624750 ansible: document and rearrange Runner params.
Move emulate_tty to where it's used.
7 years ago
David Wilson 1186b927f9 ansible: remove seemingly unused raw_params
Traced git log all the way back to beginning of time, and checked
Ansible versions starting Jan 2016. Zero clue where this came from, but
the convention suggests it came from Ansible at some point.
7 years ago
David Wilson f737ff5276 ansible: stop passing through remote_tmp variable
Ansiballz does not use remote_tmp so neither should we, per #239.
7 years ago
David Wilson f9e1905ec6 issue #199: ansible: stop writing temp files for new style modules
While adding support for non-new style module types, NewStyleRunner
began writing modules to a temporary file, and sys.argv was patched to
actually include the script filename. The argv change was never required
to fix any particular bug, and a search of the standard modules reveals
no argv users. Update argv[0] to be '', like an interactive interpreter
would have.

While fixing #210, new style runner began setting __file__ to the
temporary file path in order to allow apt.py to discover the Ansiballz
temporary directory. 5 out of 1,516 standard modules follow this
pattern, but in each case, none actually attempt to access __file__,
they just call dirname on it. Therefore do not write the contents of
file, simply set it to the path as it would exist, within a real
temporary directory.

Finally move temporary directory creation out of runner and into target.
Now a single directory exists for the duration of a run, and is emptied
by runner.py as necessary after each task invocation.

This could be further extended to stop rewriting non-new-style modules
in a with_items loop, but that's another step.

Finally the last bullet point in the documentation almost isn't a lie
again.
7 years ago
David Wilson 43e9e51ed6 docs: link signals into internals.rst. 7 years ago
David Wilson 1bc08323bf ansible: more compatible module script naming. 7 years ago
David Wilson 6109de51a0 tests: Ansible SSH timeout test
Also change Docker image to new 'mitogen' organization.
7 years ago
David Wilson 3058efc80f docs: more updates.
- accurate description of Ansible timeouts
- rough detach() sketch
7 years ago
David Wilson 7f1060f54a issue #186: initial version of subtree detachment. 7 years ago
David Wilson 8bd34e1e28 ansible: gracefully report connection timeouts as StreamError. 7 years ago
David Wilson c0e8b3d60a ssh: error wording was inaccurate. 7 years ago
David Wilson 8fc1eac6ae utils: combine MITOGEN_LOG_LEVEL and MITOGEN_LOG_IO.
Saves lots of readline fiddling.
7 years ago
David Wilson f5238fe791 docs: update copyright 7 years ago
David Wilson d3fe24a4f6 docs: update connection delegation example 7 years ago
David Wilson 2ee727f5c0 docs: typos and clarifications 7 years ago
dw 4f46d8a1e3
Merge pull request #242 from dw/dmw
su method, CTRL+C exception handler, real host key checking modes
7 years ago
David Wilson d4d4f46006 tests: update check_host_keys parameter style in testlib. 7 years ago