Commit Graph

2972 Commits

Author SHA1 Message Date
David Wilson ce04fd39c9 core: cache stream reference in DelimitedProtocol
Stream.set_protocol() was updated to break the reference on the previous
protocol, to encourage a crash should an old protocol continue operating
after it's not supposed to be active any more.

That broke DelimitedProtocol's protocol switching functionality.
2019-08-04 23:40:13 +01:00
David Wilson ad590f3321 parent: docstring formatting 2019-08-04 22:03:20 +01:00
David Wilson 87443da828 docs: remove fakessh from home page, it's been broken forever 2019-08-04 21:21:20 +01:00
David Wilson 0d636af532 docs: add changelog thanks 2019-08-04 21:21:20 +01:00
David Wilson 351aca62c9 Disable Azure pipelines build for docs-master too. 2019-08-04 21:21:20 +01:00
David Wilson be330194d5 docs: udpate Changelog. 2019-08-04 21:21:20 +01:00
David Wilson b7cdd39044 docs: tweak Changelog wording 2019-08-04 21:21:20 +01:00
David Wilson 6f12980611 [linear2] merge fallout: re-enable _send_module_forwards(). 2019-08-04 20:43:14 +01:00
David Wilson a79d2bd50b docs: another round of docstring cleanups. 2019-08-04 20:32:50 +01:00
David Wilson 20532ea591 master: allow filtering forwarded logs using logging package functions.
Given a message sent on "ssh.foo" to "mypkg.mymod", instead of logging
it to "mitogen.ctx.ssh.foo" in the master process, with the message
prefixed with the original logger name, instead log it to
"mypkg.mymod.[ssh.foo]", permitting normal logging package filtering
features to work as they usually do.

This also helps tidy up logging output a little bit.
2019-08-04 18:42:23 +01:00
David Wilson feb1654305 docs: many more internals.rst tidyups 2019-08-04 18:33:07 +01:00
David Wilson 22a07a043b tests: fix error in affinity_test 2019-08-04 17:54:10 +01:00
David Wilson 11c7e3f561 service: centralize fetching thread name, and tidy up logs 2019-08-04 17:53:34 +01:00
David Wilson f0782ccd42 [stream-refactor] get caught up on internals.rst updates 2019-08-04 17:39:31 +01:00
David Wilson 7379144a12 Stop using mitogen root logger in more modules, remove unused loggers 2019-08-04 17:07:49 +01:00
David Wilson 212f6a3529 tests: stop dumping Docker help output in the log. 2019-08-04 15:02:27 +01:00
David Wilson b76da4698b parent: move subprocess creation to mux thread too
Now connect() really is a pure blocking wrapper.
2019-08-04 14:51:16 +01:00
David Wilson 5298e87548 Split out and make readable more log messages across both packages 2019-08-04 14:41:47 +01:00
David Wilson 0f23a90d50 ansible: log affinity assignments 2019-08-04 14:37:59 +01:00
David Wilson 16ba1aacce ci: log failed command line, and try enabling stdout line buffering 2019-08-04 12:37:50 +01:00
David Wilson 4f051a38a7 ansible: improve docstring 2019-08-04 12:14:48 +01:00
David Wilson 5811909c8d [linear2] simplify _listener_for_name() 2019-08-04 12:14:48 +01:00
David Wilson c68dbdd569 ansible: stop relying on SIGTERM to shut down service pool
It's no longer necessary, since connection attempts are no longer truly
blocking. When CTRL+C is hit in the top-level process, broker will begin
shutdown, which will cancel all pending connection attempts, causing
pool threads to wake. The pool can't block during shutdown anymore.
2019-08-04 12:14:48 +01:00
David Wilson 711f46aee9 tests: move tty_create_child tests together 2019-08-04 12:14:48 +01:00
David Wilson f4ca926b21 ansible: cleanup various docstrings 2019-08-04 12:14:48 +01:00
David Wilson aa06b960f5 parent: define Connection behaviour during Broker.shutdown()
- Connection attempt fails reliably, and it fails with CancelledError
- Add new mitogen.core.unlisten()
- Add test.
2019-08-04 12:14:45 +01:00
David Wilson edde251d58 issue #549: ansible: reduce risk by capping RLIM_INFINITY 2019-08-03 21:40:57 +01:00
David Wilson 7ca2d00fca Merge remote-tracking branch 'origin/osx-ci-fixes'
* origin/osx-ci-fixes:
  issue #573: guard against a forked top-level Ansible process
  [linear2] simplify ClassicWorkerModel and fix repeat initialization
  issue #549 / [stream-refactor]: fix close/poller deregister crash on OSX
  issue #549: skip Docker tests if Docker is unavailable
  issue #549: remove Linux-specific assumptions from create_child_test
  issue #549: fix setrlimit() crash and hard-wire OS X default
2019-08-03 18:58:53 +01:00
David Wilson d408caccf5 issue #573: guard against a forked top-level Ansible process
See comment.
2019-08-03 18:43:18 +01:00
David Wilson 3ceac2c9ed [linear2] simplify ClassicWorkerModel and fix repeat initialization
"self.initialized = False" slipped in a few days ago, on second thoughts
that flag is not needed at all, by simply rearranging ClassicWorkerModel
to have a regular constructor.

This hierarchy is still squishy, it needs more love. Remaining
MuxProcess class attributes should eliminated.
2019-08-03 18:24:52 +01:00
David Wilson cebccf6f41 issue #549 / [stream-refactor]: fix close/poller deregister crash on OSX
See source comment.
2019-08-03 07:13:12 +01:00
David Wilson 19b259a45f issue #549: skip Docker tests if Docker is unavailable 2019-08-03 05:48:47 +01:00
David Wilson dcfd733e6f issue #549: remove Linux-specific assumptions from create_child_test
Some stat fields are implementation-specific, little value even testing
them on Linux
2019-08-03 05:12:33 +01:00
David Wilson 395b03a77d issue #549: fix setrlimit() crash and hard-wire OS X default
OS X advertised unlimited, but really it means kern.maxfilesperproc.
2019-08-02 22:30:58 +01:00
David Wilson c9d890b865 Merge remote-tracking branch 'origin/602-recover-taskvars'
* origin/602-recover-taskvars:
  issue #602: update Changelog
  issue #602: recover task_vars for synchronize and meta: reset_connection
  ansible: remove cutpasted docstring
  [linear2] merge fallout: restore optimization from #491 / 7b129e857
2019-08-02 04:39:26 +01:00
David Wilson 7629ff9e6d issue #602: update Changelog 2019-08-02 04:10:34 +01:00
David Wilson 33bceb6eb4 issue #602: recover task_vars for synchronize and meta: reset_connection 2019-08-02 04:05:34 +01:00
David Wilson 6b4bcf4fe0 ansible: remove cutpasted docstring 2019-08-02 04:05:28 +01:00
David Wilson 619f4dee07 [linear2] merge fallout: restore optimization from #491 / 7b129e857 2019-08-02 04:05:19 +01:00
David Wilson 5c39f58edf Merge remote-tracking branch 'origin/unienv'
* origin/unienv:
  docs: update Changelog.
  issue #600: /etc/environment may be non-ASCII in an unknown encoding
  docs: finished Changelog locking note
  Fix for sample in doc
  docs: break out install_app.py and fix API use.
2019-08-01 12:33:21 +01:00
David Wilson cf2b8f1c24 docs: update Changelog. 2019-08-01 12:13:58 +01:00
David Wilson e4321f81a0 issue #600: /etc/environment may be non-ASCII in an unknown encoding 2019-08-01 12:12:18 +01:00
David Wilson e87e41e69e docs: finished Changelog locking note 2019-08-01 11:01:14 +01:00
Stefane Fermigier aa15975ad4 Fix for sample in doc
`log_to_file()` expects a filename.
2019-08-01 11:01:14 +01:00
David Wilson 9bb3dac450 docs: break out install_app.py and fix API use. 2019-08-01 11:01:14 +01:00
David Wilson 86337c4f0d Merge remote-tracking branch 'origin/549-open-files'
* origin/549-open-files:
  issue #603: Revert "ci: update to Ansible 2.8.3"
  Fix unit_Test.ClientTest following 108015aa22
  service: clean up log messages, especially at shutdown
  remove unused imports flagged by lgtm
  [linear2]: merge fallout flaggged by LGTM
  issue #549: docs: update Changelog
  issue #549: increase open file limit automatically if possible
  ansible: improve process.py docs
  docs: remove old list link.
  docs: migrate email list
  docs: changelog tweaks
  parent: decode logged stdout as UTF-8.
  scripts: import affin.sh
  ci: update to Ansible 2.8.3
  tests: terraform tweaks
  unix: include more IO in the try/except for connection failure
  tests: update gcloud.py to match terraform config
  tests: hide ugly error during Ansible tests
  tests/ansible/gcloud: terraform conf for load testing
  ansible: gracefully handle failure to connect to MuxProcess
  ansible: fix affinity tests for 5ae45f6612390bbc888b65964fb5c218feed1679
  ansible: pin per-CPU muxes to their corresponding CPU
  ansible: reap mux processes on shut down
2019-07-31 14:05:11 +01:00
David Wilson cd2689af0a issue #603: Revert "ci: update to Ansible 2.8.3"
This reverts commit 558ebfa914.
2019-07-31 13:44:34 +01:00
David Wilson b75198396d Fix unit_Test.ClientTest following 108015aa22
Closes #604
2019-07-31 13:18:47 +01:00
David Wilson 2fede49078 service: clean up log messages, especially at shutdown 2019-07-31 11:49:53 +01:00
David Wilson 75d179e4b9 remove unused imports flagged by lgtm 2019-07-31 11:46:23 +01:00