Commit Graph

873 Commits

Author SHA1 Message Date
David Wilson c8ce3059d1 ansible: make FileService register method synchronous
On Travis it seems it is possible for the fetch message to reach
FileService before the register message is fully processed.
2018-04-17 12:55:14 +01:00
David Wilson c83b113600 service: log better warning when CallError raised. 2018-04-17 12:52:42 +01:00
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.
2018-04-17 12:42:53 +01:00
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
2018-04-17 12:41:49 +01:00
David Wilson f7db338d12 tests: more ansible_test tweaks 2018-04-16 19:05:54 +01:00
David Wilson 3e2abf36d5 tests: ansible_test shouldn't have a default become password 2018-04-16 18:57:37 +01:00
David Wilson ba8022424b tests: more work to standardize user accounts. 2018-04-16 18:35:13 +01:00
David Wilson c2f94017c7 tests: ensure perms for SSH private key 2018-04-16 17:55:38 +01:00
David Wilson ce6fb05d87 tests: 'fix' responder test.
Needs a complete rewrite, but this will do for now.
2018-04-16 16:59:45 +01:00
David Wilson f9eb66e76e _py_filename() must handle None too. 2018-04-16 16:35:29 +01:00
David Wilson b81a47649e tests: use non-root SSH user to connect to Docker image in ansible_test. 2018-04-16 16:19:53 +01:00
David Wilson 00aef80fac tests: /bin/bash login shell for all users. 2018-04-16 16:19:13 +01:00
David Wilson 63e2ec6406 tests: expanduser lookup runs locally 2018-04-16 15:55:41 +01:00
David Wilson 472610805f tests: fix remote_tmp test on 2.5.x. 2018-04-16 15:48:20 +01:00
David Wilson 34a1e3337f Fix get_module_via_sys_modules when running under unit2. 2018-04-16 15:28:26 +01:00
David Wilson 7a078a458c tests: run ansible with -vvv to catch copy hang 2018-04-16 15:13:17 +01:00
David Wilson 5b4d17dba8 tests: dump Ansible hosts after creating it 2018-04-16 15:09:53 +01:00
David Wilson 44f09a9912 tests: don't run MODE=ansible against localhost on Travis 2018-04-16 15:01:43 +01:00
David Wilson 5de72d378f tests: fix debops_tests username rename. 2018-04-16 14:59:47 +01:00
David Wilson b0d1cb4501 tests: fix DebOps tests for new image tag names. 2018-04-16 14:55:15 +01:00
David Wilson 6df796c7b6 tests: fix Ansible jobs to run on Debian/CentOS images too. 2018-04-16 14:53:45 +01:00
David Wilson c33394d49b tests: add TRAVIS_BUILD_DIR to PYTHONPATH for debops 2018-04-16 14:51:04 +01:00
David Wilson f20687db39 tests: fix permission error on Travis. 2018-04-16 14:49:56 +01:00
David Wilson c12ae16369 issue #159: tidy up service.py docstrings again. 2018-04-16 14:42:53 +01:00
David Wilson e2eac65347 tests: import mitogen_ansible_playbook.sh helper 2018-04-16 14:29:14 +01:00
David Wilson 89676b1257 tests: put unittest.skip() around fakessh tests for the time being 2018-04-16 14:28:07 +01:00
David Wilson 6390e36a4e tests: document selecting a target distribution. 2018-04-16 14:27:55 +01:00
David Wilson 15e30e8ac5 tests: Add a Travis target for CentOS images. 2018-04-16 14:27:37 +01:00
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.
2018-04-16 14:24:39 +01:00
David Wilson 6aad45748b docs: typo 2018-04-13 15:18:30 +01:00
David Wilson 9f94fb78c8 issue #159: make LRU size configurable. 2018-04-13 15:16:54 +01:00
David Wilson a96969ee29 docs: concision 2018-04-13 13:54:53 +01:00
David Wilson cc980569a3 issue #159: initial context LRU implementation
Now Connection.close() *must* be called in the worker, to ensure the
reference count for a context drops correctly.

Remove 'discriminator' for now, I'm not using it for testing any more
and it complicated this code.

This code is a car crash, it needs rewritten again. Ideally some/most of
this behaviour could live on services.DeduplicatingService somehow, but
I couldn't come up with a sensible design.
2018-04-13 13:49:16 +01:00
David Wilson 6394226722 issue #159: verify no more than 20 tasks exist on the remote 2018-04-12 12:37:31 +01:00
David Wilson 633cd888a0 issue #182: test for previous commit. 2018-04-12 12:24:00 +01:00
David Wilson e119058d9b issue #182: ensure connection is reset during with_items.
Elements of a with_items loop reuse one WorkerProcess to execute every
iteration, requiring us to reset Connection's idea of the connection on
each iteration, otherwise the tasks will erroneously execute in the
wrong context.
2018-04-12 12:15:02 +01:00
David Wilson 9acca37050 issue #159: lots more test users. 2018-04-12 12:06:10 +01:00
David Wilson 4c8ec131f9 issue #16: initial smorgasbord of 3.x fixes. 2018-04-11 11:49:57 +01:00
David Wilson c4bef102fe issue #16: Python 2.4-3.x compatible exception handling. 2018-04-11 02:16:13 +01:00
David Wilson 8889708f24 core: blacklist Jython org.* by default too.
1 silly roundtrip.
2018-04-11 02:10:12 +01:00
David Wilson e5b784ed32 parent: reduce cutpaste
Unclear whether exec() is better or worse than __import__(), but at
least the semantics are correct.
2018-04-11 02:02:26 +01:00
David Wilson 38c0ad1eea core: don't deregister Router handles until Broker exit.
Lots of "invalid handle: ..., 102" messages started appearing during
exit recently because ordering changed slightly, and local handles were
sent _DEAD even though the broker loop was still progressing through
shutdown.

The "shutdown" event is too early to close handles: it is the start of
the grace period where streams and downstream contexts can finish up any
work and deliver buffered data, including FORWARD_LOG messages that
haven't arrived yet.

So instead,

- move the _DEAD logic to the "exit" event,
- get rid of Context.on_shutdown() entirely, it's been unused for over
  a month,
- get rid of the "crash" event, since it always fires prior to "exit",
  and its only use was to send _DEAD to local handles, which now happens
  during exit anyway.
2018-04-11 01:51:27 +01:00
David Wilson 813d139d48 Import v2.7.11 tokenize.py for use on older Pythons; closes #189.
It's worth note that 2.7.10 shipped with Sierra, managed to not notice
this due to using a Homebrew 2.7.14.
2018-04-10 16:38:18 +01:00
David Wilson 0c803141a7 tests: fix filename. 2018-04-10 01:10:26 +01:00
David Wilson ec720eab1a Merge commit 'refs/pull/178/head' of github.com:dw/mitogen 2018-04-10 01:07:12 +01:00
David Wilson 0e839fe63c docs: override insane list of fallback fonts
WHY ARE THE DOCS RENDERING IN ITALIC HOW LONG HAS IT BEEN LIKE THIS
ARGAHGR
2018-04-09 20:10:39 +01:00
David Wilson 3682ac6e29 fork: ensure importer handle is installed on the new router. 2018-04-09 16:37:51 +01:00
David Wilson e9f94e1bbb docs: tidy up big list of bullets. 2018-04-09 15:12:39 +01:00
David Wilson 20de3489de ansible: tidy up annoying syntax 2018-04-09 15:06:29 +01:00
David Wilson c14f6c98d1 ansible: import osx_setup.yml. 2018-04-09 15:05:57 +01:00