You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mitogen/ansible_mitogen
David Wilson caffaa79f7 issue #186: rework async/forked tasks again.
The controller must know the ID of the forked child in order to
propagate dependencies to it, so forking+starting the module run cannot
happen entirely on the target, without some additional mechanism to
wait-and-repropagate the deps as they arrive on the target.

Rework things so that init_child() also handles starting the fork parent,
and returns it along with the context's home directory in a single round
trip.

Now master knows the identity of the fork parent, it can directly create
fork children and call run_module_async() in them. This necessitates 2
roundtrips to start an asynchronous task.

This whole thing sucks and entirely needs simplified, but for now things
almost work, so keeping it.

connection.py:
  * Expect ContextService to return the entire dict return value of
    init_child(). Store the fork_contxt from the return value.

planner.py:
  * Rework Planner to store the invocation as an instance attribute, to
    simplify method calls.
  * Add Planner.get_push_files() and Planner.get_module_deps().
  * Add _propagate_deps() which takes a Planner and ensures the deps it
    describes are sent to a (non forked or forked) context.
  * Move async task logic out of target.py and into invoke() /
    _invoke_*().

process.py:
  * Services no longer need references to each other. planner.py handles
    sending module deps with one extra RPC.

services.py:
  * Return "init_child_result" key instead of simple "home_dir" key.
  * Get rid of dep propagation from ModuleDepService, it lives in
    planner.py now.

target.py:
  * Get rid of async task start logic, lives in planner.py now.
7 years ago
..
plugins ansible: add dummy init.pys so setup.py find_packages() DTRT. 7 years ago
__init__.py ansible: restructure to avoid intermediate imports 7 years ago
connection.py issue #186: rework async/forked tasks again. 7 years ago
logging.py master: annotate LogForwarder messages. 7 years ago
mixins.py ansible: preload built-in modules in ModuleDepScanner. 7 years ago
module_finder.py ansible: handle "from timeout import timeout" imports. 7 years ago
planner.py issue #186: rework async/forked tasks again. 7 years ago
process.py issue #186: rework async/forked tasks again. 7 years ago
runner.py issue #186: rework async/forked tasks again. 7 years ago
services.py issue #186: rework async/forked tasks again. 7 years ago
strategy.py setns: support changing user. 7 years ago
target.py issue #186: rework async/forked tasks again. 7 years ago