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.
caffaa79f7
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 | |
---|---|---|
.travis | 7 years ago | |
ansible_mitogen | 7 years ago | |
docs | 7 years ago | |
examples | 7 years ago | |
mitogen | 7 years ago | |
tests | 7 years ago | |
.gitignore | 7 years ago | |
.lgtm.yml | 7 years ago | |
.travis.yml | 7 years ago | |
ChangeLog | 7 years ago | |
LICENSE | 7 years ago | |
README.md | 7 years ago | |
dev_requirements.txt | 7 years ago | |
preamble_size.py | 7 years ago | |
run_tests | 7 years ago | |
setup.cfg | 7 years ago | |
setup.py | 7 years ago | |
tox.ini | 7 years ago |