Commit Graph

1472 Commits

Author SHA1 Message Date
David Wilson 0b1f92b59f issue #297: test fixes to match fixed CWD. 2018-07-10 18:48:11 +01:00
David Wilson d8e0c9e12c issue #297: local commands must execute with WorkerProcess environment. 2018-07-10 18:42:09 +01:00
David Wilson 012745efea issue #297: local actions must execute with fixed directory.
Local actions must execute in the the parent directory of the playbook
that defines the action.
2018-07-10 17:56:05 +01:00
David Wilson 26ba3e4d83 issue #294: stronger integration test
Run the tests in a brand new ansible-playbook invocation, and try both
linear->mitogen->linear and mitogen->linear->mitogen.
2018-07-10 17:52:20 +01:00
David Wilson 9a453d4753 Bump version for release. 2018-07-09 17:43:44 +01:00
David Wilson b734a2a5f3 examples: fix mitop for Python 3. 2018-07-09 17:01:28 +01:00
dw 239ef65652
Merge pull request #296 from dw/dmw
Dmw
2018-07-09 16:06:58 +01:00
David Wilson a61212ffb7 docs: one more known issue. 2018-07-09 16:04:28 +01:00
David Wilson 63c7a3013d docs: ansible: add workaround for 'raw' support. 2018-07-09 15:55:24 +01:00
David Wilson 5b03e06457 issue #294: ansible: fix mixed vanilla/Mitogen runs.
Don't bother trying to understand what damage PluginLoader has done to
ansible.plugins.* namespace, just ask it for the base class instead.
2018-07-09 15:48:17 +01:00
David Wilson 5668267f47 tests: import debug_ansible_playbook.sh. 2018-07-09 15:33:44 +01:00
David Wilson e1402b2214 tests: import various bench/ scripts. 2018-07-09 15:33:44 +01:00
David Wilson 8a2e8964a9 tests: import gce.yml 2018-07-09 15:33:44 +01:00
David Wilson 079dc95aef tests: use nice_stdout in gcloud/ too 2018-07-09 15:33:44 +01:00
David Wilson 4122fa4a46 debug: give dump_to_logger() thread a name. 2018-07-09 15:33:44 +01:00
David Wilson 68cf84762f docs: mention synchronize/delegation issue. 2018-07-09 04:21:19 +01:00
David Wilson ab0107440a docs: typo 2018-07-09 04:15:27 +01:00
David Wilson 7cd89f0290 docs: add 'will it work' intuition. 2018-07-09 04:07:44 +01:00
David Wilson 2b507c7b15 docs: fix text. 2018-07-09 03:42:30 +01:00
David Wilson f5b9f5ff59 docs: add 'raw' to 0.2 in-scope 2018-07-09 03:40:17 +01:00
David Wilson 8c2231cefb docs: link changelog into Ansible install procedure 2018-07-09 03:13:38 +01:00
David Wilson 3ea1b74dad docs: promote contributors & changelog links at least for 2018 2018-07-09 03:09:43 +01:00
David Wilson 9e3d9752cb docs: add warning label to services.rst. 2018-07-09 03:05:48 +01:00
David Wilson 43b55bd8fd docs: remove another warning label. 2018-07-09 03:05:28 +01:00
David Wilson b7001f6e0b docs: remove prerelease caution. 2018-07-09 03:03:05 +01:00
David Wilson 894926cf61 docs: add initial release notes. 2018-07-09 02:42:50 +01:00
David Wilson d493a3d7ca Merge branch 'python3'
Hooray \o/

Remaining issues:

- Two unit test races that appear related to our broken zombie process
  reaping, doesn't impact Ansible.

Closes #16.
2018-07-08 22:17:28 +01:00
David Wilson 0461738ca6 docs: small reference fixes. 2018-07-08 22:00:00 +01:00
David Wilson 692275064b parent: fix TtyLogger str/unicode crash on 3.x. 2018-07-08 21:56:13 +01:00
David Wilson 038f8d5dec master: fix another case where built-in module loader throws ImportError
requests/packages.py just imports urllib3 normally, then makes up new
names for it. pkgutil can't cope with that, and returns the loader
(builtin) for the requests package. The built-in loader obviously can't
find_module() for "requests/packages/urllib3/contrib/pyopenssl" because
it doesn't exist on disk.
2018-07-08 21:45:50 +01:00
David Wilson 3b7a1d4f36 ansible: fix 3.x dependency scanning on OS X
On OS X with case-insensitive filenames, resolving
'ansible.module_utils.facts.base.Hardware' finds
'ansible.module_utils.facts.hardware/__init__.py', because
module_finder's procedure is completely wrong for resolving child
modules. Patch over it for now since it otherwise works for Ansible.
2018-07-08 16:06:08 +01:00
David Wilson 3a8ea930d7 core: fix NameError in Latch.put(), FileService exception 2018-07-07 18:03:26 +01:00
David Wilson 5da371c5dd service: fix UnboundLocalError. 2018-07-07 14:55:47 +01:00
David Wilson 484d4fdb74 core: fix Latch socket sharing race.
If thread A is about to wake as thread B is about to sleep, and A loses
the GIL at an inopportune moment, it was possible for two latches to
share the same socketpair, causing wakeups routed to the wrong latch.

The pair was returned to the 'idle sockets' list before .recv() had been
called. This manifested as TimeoutError() thrown rarely with many active
threads and the host is heavily loaded (such as Travis CI).

Add more documentation and stop writing single wake bytes. Instead the
recipient's identity is written instead, making it simpler to detect
future bugs.
2018-07-07 14:55:47 +01:00
David Wilson a53f2e7137 Update trove classifiers. 2018-07-07 14:55:47 +01:00
David Wilson a74903d59a docs: update compatibility notice on main page. 2018-07-07 14:55:47 +01:00
David Wilson 18c9cd2365 docs: update supported Python version list. 2018-07-07 14:55:47 +01:00
David Wilson ea5a4ed385 tests: use Ansible 2.5.5 by default 2018-07-07 14:55:47 +01:00
David Wilson bd65e50b2f ansible: reduce() does not exist in 3.x. 2018-07-07 14:55:47 +01:00
David Wilson b92545e61a minify: avoid cStringIO use.
On 2.7 it was "accidentally fine" because the buffer object the StringIO
was initialized from happened to look like ASCII, but in 2.6 either
UCS-2 or UCS-4 is used for that buffer, and so the result was junk.

Just use the io module everywhere if we can, falling back to pure-Python
StringIO for Python<2.6.
2018-07-07 14:55:47 +01:00
David Wilson 29f15c236c core: remove needless size prefix from core_src_fd.
I think this is brainwrong held over from an early attempt to write the
duplicate copy of core_src on stdin.
2018-07-07 14:55:47 +01:00
David Wilson 3e73e6ae11 Reenable all Travis Jobs. 2018-07-07 14:55:47 +01:00
David Wilson b21d51be47 ansible: fix test for 3.x. 2018-07-07 14:55:47 +01:00
David Wilson 34751c38b0 ansible: cStringIO interprets unicode as a buffer obj on 2.x 2018-07-07 14:55:47 +01:00
David Wilson 04e138e060 core: fix serialization of empty bytes() on 3.x. 2018-07-07 14:55:47 +01:00
David Wilson dd62009f70 Record ulimit -a in run_test output. 2018-07-07 14:55:47 +01:00
David Wilson b4f4b66679 tests: make cpu_load.py more random. 2018-07-07 14:55:47 +01:00
David Wilson 46ec0ffcaf tests: log original traceback in assertRaises(). 2018-07-07 14:55:47 +01:00
David Wilson ff2f44b046 core: reduce chance of Latch.read()/write()/close() race.
Previously it was possible for a thread to call Waker.defer() after
Broker has torns its Waker down, and the underlying file descriptor
reallocated by the OS to some other component.

This manifested as latches of a subsequent test invocation receiving the
waker byte (' ') rather than their expected byte '\x7f'.

This doesn't fix the problem, it just significantly reduces the chance
of it occurring. In future Side.write()/read()/close() must be
synchronized with a lock.

Previously the problem could be reliably triggered with:

    while :; do
        python tests/call_function_test.py -vf CallFunctionTest.{test_aborted_on_local_broker_shutdown,test_aborted_on_local_context_disconnect}
    done
2018-07-07 14:55:47 +01:00
David Wilson 3e48f95439 tests: import cpu_load.py. 2018-07-07 14:55:47 +01:00