Commit Graph

205 Commits (003f30b5a9e13e46ccf06db9680f5515e4050874)

Author SHA1 Message Date
David Wilson 1be03eb458 parent: change create_child interface.
To allow for additional arguments.
7 years ago
David Wilson fa4746f656 ansible: add connection delegation test targets.
For command line use only, no integration tests yet.
7 years ago
David Wilson 962ba862e9 tests: use test-targets group, not all group 7 years ago
David Wilson 86c9978e09 Ensure mod.__file__ is set; closes #210. 7 years ago
David Wilson e63ae4768e core: support Receiver.get(thread_dead=False)
For tests.
7 years ago
David Wilson 6541779dd6 tests: import Ansible file transfer benchmark 7 years ago
David Wilson 7c88e4d013 Move _DEAD into header, autogenerate dead messages
This change blocks off 2 common scenarios where a race condition is
upgraded to a hang, when the library could internally do better.

* Since we don't know whether the receiver of a `reply_to` is expecting
  a raw or pickled message, and since in the case of a raw reply, there
  is no way to signal "dead" to the receiver, override the reply_to
  field to explicitly mark a message as dead using a special handle.

  This replaces the serialized _DEAD sentinel value with a slightly
  neater interface, in the form of the reserved IS_DEAD handle, and
  enables an important subsequent change: when a context cannot route a
  message, it can send a generic 'dead' reply back towards the message
  source, ensuring any sleeping thread is woken with ChannelError.

  The use of this field could potentially be extended later on if
  additional flags are needed, but for now this seems to suffice.

* Teach Router._invoke() to reply with a dead message when it receives a
  message for an invalid local handle.

* Teach Router._async_route() to reply with a dead message when it
  receives an unroutable message.
7 years ago
David Wilson 8c3b1fcf15 ansible: disable script interpreter processing for new-style
Re: #199
7 years ago
David Wilson 2f02b5c0b1 ansible: prevent Unicode strings leaking into sys.argv
The module name comes from YAML via Jinja2.. it's always Unicode. Mixing
it into a temporary directory name produces a Unicode tempdir name,
which ends up in sys.argv via TemporaryArgv.
7 years ago
David Wilson e56608ab91 parent: don't wait for SIGTERM to complete. 7 years ago
David Wilson dc4433ace6 issue #202: ansible: forget all dependent contexts on Stream disconnect
This is a partial fix, there are still at least 2 cases needing covered:

- In-progress connections must have CallError or similar sent to any
  waiters
- Once connection delegation exists, it is possible for other worker
  processes to be active (and in any step in the process), trying to
  communicate with a context that we know can no longer be communicated
  with. The solution to that isn't clear yet.

Additionally ensure root has /bin/bash shell in both Docker images.
7 years ago
David Wilson 9fe14e841c parent: reap the child process if connection fails
For example if no response is received in :attr:`connect_timeout`
seconds, the child would be left running.
7 years ago
David Wilson e7831a801f issue #195: handle non-ASCII scripts in runner.py. 7 years ago
David Wilson 85e1f5f515 ansible: remove JobResultService, more compatible async jobs; closes #191.
And by "compatible" I mean "terrible". This does not implement async job
timeouts, but I'm not going to bother, upstream async implementation is
so buggy and inconsistent it resists even having its behaviour captured
in tests.
7 years ago
David Wilson 6ad18b6719 issue #191: move async tests to their own category 7 years ago
David Wilson e43c6c531b Mostly implement hybrid TTY/socket mode for sudo and SSH.
Presently there is still no mechanism to add :attr:`tty_stream` to the
multiplexer after connection is successful, but for now it's not
expected that anything will be logged to it anyway.

Closes #148.
7 years ago
David Wilson fca22efe90 tests: enable profile_tasks callback plugin 7 years ago
David Wilson c6284e00e9 Use subprocess to start child processes; closes #185. 7 years ago
David Wilson 1e882a72c0 tests: install virtualenv in the Docker images. 7 years ago
David Wilson b91785c9a1 tests: workaround for issue_109 7 years ago
David Wilson ce260933d9 tests: consistent play naming everywhere 7 years ago
David Wilson d827bdb848 tests: fixes to get regression/ running under vanilla Ansible 7 years ago
David Wilson b882b78d35 tests: clean up remaining reg tests
Delete some that are impossible to detect, fix up the remainder to
detect the condition they describe.
7 years ago
David Wilson aeeba54d96 tests: better regression test for issue #109 7 years ago
David Wilson f4d791662e ansible: better planner logging, try again 7 years ago
David Wilson b4bb1c5a2a tests: fix suspected readdir() ordering issue (!) 7 years ago
David Wilson 0046a3de0b tests: insert debug print for travis :( 7 years ago
David Wilson ef47347cdf tests: raft of fixes for vanilla Ansible 7 years ago
David Wilson 89e11ed25c tests: make osx_setup a little more generic again 7 years ago
David Wilson 2c3d2db4ec tests: fix output checks for Linux 7 years ago
David Wilson 7e49e73683 tests: add perl-JSON to the test images too.
Needed for the runner tests.
7 years ago
David Wilson ac80bf12f0 tests: start making osx_setup.yml more generic 7 years ago
David Wilson 16b5aa2d10 tests: disable host key checking for Paramiko. 7 years ago
David Wilson 41d2661ecb tests: fix sudo rule order. 7 years ago
David Wilson ed915b6e63 tests: magic mitogen_shutdown_all action
LRU tests break when run as part of the whole suite rather than
individually, because LRU stuff is already happening for earlier tests.
7 years ago
David Wilson 6614d17021 tests: explicit sudo rules to require password from sudo_nopw
This account is used on Travis. It needs to be forced to type passwords
in some cases
7 years ago
David Wilson ba8022424b tests: more work to standardize user accounts. 7 years ago
David Wilson ce6fb05d87 tests: 'fix' responder test.
Needs a complete rewrite, but this will do for now.
7 years ago
David Wilson 00aef80fac tests: /bin/bash login shell for all users. 7 years ago
David Wilson 63e2ec6406 tests: expanduser lookup runs locally 7 years ago
David Wilson 472610805f tests: fix remote_tmp test on 2.5.x. 7 years ago
David Wilson e2eac65347 tests: import mitogen_ansible_playbook.sh helper 7 years ago
David Wilson 89676b1257 tests: put unittest.skip() around fakessh tests for the time being 7 years ago
David Wilson 6390e36a4e tests: document selecting a target distribution. 7 years ago
David Wilson f203a91e1a tests: support CentOS Docker images.
- namespace & document test accounts in README.md
- standardize the password format everywhere, and ensure the passwords
  differ everywhere.
- Add MITOGEN_TEST_DISTRO environment variable.
7 years ago
David Wilson 9f94fb78c8 issue #159: make LRU size configurable. 7 years ago
David Wilson 6394226722 issue #159: verify no more than 20 tasks exist on the remote 7 years ago
David Wilson 633cd888a0 issue #182: test for previous commit. 7 years ago
David Wilson 9acca37050 issue #159: lots more test users. 7 years ago
David Wilson 0c803141a7 tests: fix filename. 7 years ago