David Wilson
536fe9afb8
master: Select.all() sugar
2018-02-16 07:39:15 +05:45
David Wilson
28d5de77a3
ansible: we're gonna need more playbook steps
2018-02-16 07:39:10 +05:45
David Wilson
9219e9a125
ansible: support class_only=True in wrapped loader
2018-02-15 21:04:45 +05:45
David Wilson
5d9363be79
ansible: blacklist everything except our own namespaces
...
Farewell, pointless roundtrips, we hardly knew ye.
2018-02-15 20:13:26 +05:45
David Wilson
a031f927d4
importer: share blacklist logic between master/parent
2018-02-15 20:11:38 +05:45
David Wilson
68b34fa8f2
importer: module whitelist/blacklist support
...
Hoped to avoid it, but it's the obvious solution for Ansible.
2018-02-15 19:55:36 +05:45
David Wilson
4a20a57552
core: wrap selects in EINTR handlers
...
This isn't nearly enough, but it catches the most common victim of
EINTR.
2018-02-15 16:11:11 +05:45
David Wilson
5529a4fba6
core: #39 : don't call logging framework when logging is disabled
...
It looks ugly as sin, but this nets about a 20% drop in user CPU time,
and close to 15% increase in throughput.
The average log call is around 10 opcodes, prefixing with '_v and' costs
an extra 2, but both are simple operations, and the remaining 10 are
skipped entirely when _v or _vv are False.
2018-02-15 15:38:52 +05:45
David Wilson
d0fbcc0f48
ansible: generalized action module wrapping.
2018-02-15 15:30:19 +05:45
David Wilson
e5146df214
examples: import client/server.py test scripts as examples
2018-02-15 06:17:07 +05:45
David Wilson
af04f24c95
docs: fix Select() example for new style API.
2018-02-15 06:03:01 +05:45
David Wilson
762dbcef3d
examples: fix mitop example.
2018-02-15 00:05:41 +00:00
David Wilson
fce44a5843
unix: add small explainer note until real docs exist
2018-02-15 05:31:50 +05:45
dw
3e20b5036f
Merge pull request #79 from moreati/doc-router-route
...
Fix indentation of Router.route anchor
2018-02-15 05:26:41 +05:45
dw
feacb2bd40
Merge pull request #80 from moreati/sins-of-the-parent
...
Fix/split test_master tests following split of mitogen.master -> mitogen.parent
2018-02-15 05:26:24 +05:45
dw
d708405126
Merge pull request #82 from moreati/imported-via-the-scenic-route
...
Fix TypeError while initiliazing ImporterMixin
2018-02-15 05:26:05 +05:45
dw
9d1859796c
Merge pull request #83 from moreati/msg-in-a-jar
...
Fix lingering references to mitogen.core.Receiver.get_data()
2018-02-15 05:24:58 +05:45
dw
fdb379ba0b
Merge pull request #81 from moreati/django-unfound
...
FIx syntax error in FindRelatedImportsTest.test_django_db_models
2018-02-15 05:24:49 +05:45
David Wilson
0d57afc914
master: use queue-like Latch in Select() too.
2018-02-15 05:23:48 +05:45
Alex Willmer
3bf204f8d6
docs: Fix out of date get_data() snippets
...
As of adc8fe3aed
Receiver objects do not
have a get_data() method and Receiver.get() does not unpickle the
message.
2018-02-14 23:30:25 +00:00
Alex Willmer
c1e29783fb
Fix AttributeError in mitogen.core.Context.send_await()
...
As of adc8fe3aed
Receiver objects do not
have a get_data() method and Receiver.get() does not unpickle the
message.
2018-02-14 23:27:54 +00:00
David Wilson
371a259a5e
ansible: remove hard-wired UNIX socket path.
2018-02-15 04:55:56 +05:45
David Wilson
a6324aaeb1
Latch v2: combined queue + one self-pipe-per-thread
...
Turns out it is far too easy to burn through available file descriptors,
so try something else: self-pipes are per thread, and only temporarily
associated with a Lack that wishes to sleep.
Reduce pointless locking by giving Latch its own queue, and removing
Queue.Queue() use in some places.
Temporarily undo merging of of Waker and Latch, let's do this one step
at a time.
2018-02-15 04:52:29 +05:45
Alex Willmer
83c0111b51
Fix TypeError while initiliazing ImporterMixin
...
Since f44356af32
mitogen.core.Importer()
takes a Router instance.
2018-02-14 23:04:10 +00:00
Alex Willmer
49b6c586e3
FIx syntax error in FindRelatedImportsTest.test_django_db_models
2018-02-14 22:54:00 +00:00
Alex Willmer
5ba2db0794
Split IterReadTest & WriteAllTest into test_parent
...
This matches their respective functions under test, which now reside in
mitogen.parent.
2018-02-14 22:48:31 +00:00
Alex Willmer
f114c5951b
Adjust unittest for master -> parent split
...
Tests should now match changes in
4d31300dd0
2018-02-14 22:40:09 +00:00
Alex Willmer
631c97b143
Fix indentation of Router.route anchor
2018-02-14 21:12:29 +00:00
David Wilson
8121530144
core: replace Queue with Latch
...
On Python 2.x, operations on pthread objects with a timeout set actually
cause internal polling. When polling fails to yield a positive result,
it quickly backs off to a 50ms loop, which results in a huge amount of
latency throughout.
Instead, give up using Queue.Queue.get(timeout=...) and replace it with
the UNIX self-pipe trick. Knocks another 45% off my.yml in the Ansible
examples directory against a local VM.
This has the potential to burn a *lot* of file descriptors, but hell,
it's not the 1940s any more, RAM is all but infinite. I can live with
that.
This gets things down to around 75ms per playbook step, still hunting
for additional sources of latency.
2018-02-15 02:06:21 +05:45
David Wilson
1c6e529458
ansible: delete old needless host_vars directory
2018-02-15 01:03:28 +05:45
David Wilson
bb662a1a0b
master: helper functions to force disconnect everything
2018-02-15 00:45:09 +05:45
David Wilson
4a431a1a85
service: initial version
2018-02-15 00:44:31 +05:45
David Wilson
d3e79fc240
ansible: support become:True and become_user
2018-02-15 00:27:23 +05:45
David Wilson
2efb790a2f
ansible: add become test case
2018-02-15 00:27:05 +05:45
David Wilson
3a96389d08
ansible: automatically configure connection plug-in.
2018-02-15 00:14:38 +05:45
David Wilson
8598ff07b3
ansible: restructure to avoid intermediate imports
2018-02-14 22:30:35 +05:45
David Wilson
1a119cb08b
ansible: import example playbook
2018-02-14 22:29:02 +05:45
David Wilson
715e42a714
ansible: connection plugin v2
...
Now featuring one roundtrip per module invocation.
2018-02-14 22:17:42 +05:45
David Wilson
7819819188
core: CALL_FUNCTION should check auth_id, not src_id
2018-02-14 22:00:51 +05:45
David Wilson
5a04fbb694
ansible: Merge module runner into helpers.py.
2018-02-14 21:27:14 +05:45
David Wilson
1d5de9017f
Remove old TCP draft.
2018-02-14 21:02:54 +05:45
David Wilson
3dd062bc18
issue #40 : mitogen.unix initial implementation.
2018-02-14 21:02:43 +05:45
David Wilson
aa1d58c9a3
fakessh: restore unpickle() semantics.
2018-02-14 20:25:53 +05:45
David Wilson
dadee5dc05
docs: add Message documentation
2018-02-14 20:24:39 +05:45
David Wilson
424879dfb4
core: Message.reply() helper function
2018-02-14 20:13:30 +05:45
David Wilson
0a4711bce9
core: Don't crash if a stream is missing a side.
2018-02-14 19:46:30 +05:45
David Wilson
43c673b230
core: Restore behaviour of unpickling Router-specific Context subclass
2018-02-14 19:45:46 +05:45
David Wilson
8ef87bea6a
select: clean up API.
2018-02-14 19:45:22 +05:45
David Wilson
adc8fe3aed
core: de-munge Message.unpickle() vs. Receiver.get().
2018-02-14 19:36:00 +05:45
David Wilson
c9affbaf50
core: add auth_id field.
2018-02-14 09:16:27 +05:45