Thomas Jackson
b6741d89b8
Change Master scheduler to use new ClientFuncsDict instaed of runner funcs directly
...
With the change to forcing all runner calls through low() we forgot about the scheduler which calls functions directly. This adds an API to get that same interface.
Also means we are missing test coverage on the scheduler, since it was non-stop backtracing on the master.
2015-01-30 10:36:09 -08:00
Thomas Jackson
a4b95be0b0
Add option to silence printing
2015-01-30 10:06:21 -08:00
Thomas Jackson
e46281900d
Cleanup function calls, if you defualt to the right types, no need for the switch statement
2015-01-30 10:01:57 -08:00
Thomas Jackson
f444fb9ed8
Pylint
2015-01-29 18:29:26 -08:00
Thomas Jackson
064b8981bc
Remove various AES sanitization attempts.
2015-01-29 18:10:56 -08:00
Thomas Jackson
6439ad9db9
Move AES key out of opts.
...
This way we can avoid accidently passing it all sorts of places it shouldn't be.
I'm doing something similar in my transport overhaul, so this will match more with that.
2015-01-29 18:08:52 -08:00
Thomas Jackson
f2b3c1657e
Lazily load functions, since lots of clients don't even execute runners
2015-01-29 07:44:10 -08:00
Thomas Jackson
dd045dfc9f
Massive speedup to saltnado
...
This mixin was creating 3 localclients and 1 runner client per request-- which takes ~6s. Now we build the set of clients once per process
2015-01-28 19:00:35 -08:00
Thomas Jackson
4285d10d97
Fixup some merge conflicts from the backport
2015-01-28 18:43:45 -08:00
Thomas Jackson
1101f70715
Lazily load masterminion and keep it around.
2015-01-28 18:43:45 -08:00
Thomas Jackson
3d1ae49d09
Pass opts not an ImmutableDict of opts
2015-01-28 18:43:45 -08:00
Thomas Jackson
dad5b11600
Fix typo from 37619f0e
2015-01-28 18:43:45 -08:00
Thomas Jackson
69d4fac58b
Migrate docs runner to __jid_event__
2015-01-28 18:43:45 -08:00
Thomas Jackson
8171574646
Already prints out the output if run in sync mode, and async already has this in the ret event
2015-01-28 18:43:44 -08:00
Thomas Jackson
852fbfdbe2
Misc style cleanup
2015-01-28 18:43:44 -08:00
Mathieu Le Marec - Pasquet
42196ca827
Rework a bit the runner completion log
2015-01-28 18:43:44 -08:00
Mathieu Le Marec - Pasquet
3040255242
Removing useless cruft
2015-01-28 18:43:44 -08:00
Mathieu Le Marec - Pasquet
1b09aa3e58
runner: unclutter the output from mminion loading
2015-01-28 18:43:44 -08:00
Mathieu Le Marec - Pasquet
65093635f3
runner: Fix job store
2015-01-28 18:43:44 -08:00
Mathieu Le Marec - Pasquet
c5354cdca7
runner return: also add tgt to the payload
2015-01-28 18:43:44 -08:00
Mathieu Le Marec - Pasquet
0d6691aa1e
runner/master Store jobs in cache, & factorization
2015-01-28 18:43:44 -08:00
Mathieu Le Marec - Pasquet
47621192cd
runner: Print out correctly jid, both in sync/async
2015-01-28 18:43:44 -08:00
Thomas Jackson
f12c7b50b7
Keep the stamp
2015-01-28 18:43:44 -08:00
Thomas Jackson
39b1121380
Conditionally pop _stamp
2015-01-28 18:43:44 -08:00
Thomas Jackson
1afafd1897
Pylint cleanup
2015-01-28 18:43:44 -08:00
Thomas Jackson
53da803005
Nicer error handling for runner execution
2015-01-28 18:43:44 -08:00
Thomas Jackson
df3e6ab90f
Remove unused code
...
Conflicts:
salt/client/mixins.py
2015-01-28 18:43:44 -08:00
Thomas Jackson
5a8563e347
Rework the runner CLI to not use threads
...
No reason to go through all that work and introduce debugging issues. This way we can still fire events using __jid_event__ but if you just "print" it will do so without trying to monkey patch print
2015-01-28 18:43:44 -08:00
Thomas Jackson
235b8f4b07
Pylint cleanup
2015-01-28 18:43:44 -08:00
Thomas Jackson
a6e1267043
Remove unused import
2015-01-28 18:43:44 -08:00
Thomas Jackson
0409bf4b81
Inject globals into *all* runners' global namespace
...
Fix for #19707
Similar fix to #19712 , just doing it once per mod.
2015-01-28 18:43:44 -08:00
Thomas Jackson
f25505f0dd
Make non-async runner executions happen in a thread instead of a daemonized process.
...
This means we are backwards compatible with builtin print (yay!) and that you can control-c out of the execution (since it will kill the thread too).
Conflicts:
salt/client/mixins.py
2015-01-28 18:43:44 -08:00
Thomas Jackson
12de6b5dfb
Add missing import
2015-01-28 18:43:44 -08:00
Thomas Jackson
8b4f4346e9
Fix typo
...
Conflicts:
salt/utils/event.py
2015-01-28 18:43:44 -08:00
Thomas Jackson
7c537cd9ec
Workaround for race condition in SaltEvent() creation and the zmq socket actually connecting
...
Conflicts:
salt/utils/event.py
2015-01-28 18:43:44 -08:00
Thomas Jackson
7b1bef8cb7
Cleanup, we don't always need an "event" object, so lets not always create one
2015-01-28 18:43:44 -08:00
Thomas Jackson
2cd42e3cad
For some reason having the event init in the shared subclass causes problems.
2015-01-28 18:43:44 -08:00
Thomas Jackson
ca826c2c30
Revert function calls
...
Apparently the wheel API varies quite a bit from the runner API, we'll have to clean that up in the future
2015-01-28 18:43:43 -08:00
Thomas Jackson
3e7caa3fa7
Don't spin waiting for runner return, just use get_event (it has a poller)
...
Conflicts:
salt/runner.py
2015-01-28 18:43:43 -08:00
Thomas Jackson
c2c396a48e
Add a blacklist of suffixes for the client mixin to print out
2015-01-28 18:43:43 -08:00
Thomas Jackson
8ce214c03f
Pylint and style cleanup
2015-01-28 18:43:43 -08:00
Thomas Jackson
bad5812c38
Re-add call_func backwards compat func
2015-01-28 18:43:43 -08:00
Thomas Jackson
9f0e4a9018
Add a return to the async method (jid)
2015-01-28 18:43:43 -08:00
Thomas Jackson
74886537f3
Fix runner returns
2015-01-28 18:43:43 -08:00
Thomas Jackson
645027c0fe
cleanup "Caste jid as str (its an int all over), and change runner tag to correct prefix"
...
This reverts most of commit 745f2d84835ae23800358cd4dcc9c8525b502714.
apparently I picked up some other changes I didn't mean to
Conflicts:
salt/utils/event.py
tests/integration/utils/test_reactor.py
2015-01-28 18:43:43 -08:00
Thomas Jackson
e172dd221f
Remove PID since the process is daemonized afterwards, meaning that pid isn't correct
2015-01-28 18:43:43 -08:00
Thomas Jackson
178689d107
Clean up comments
2015-01-28 18:43:43 -08:00
Thomas Jackson
14efa520f7
Backwards compatibility with args as well.
...
With format_call you can pass in positional args as kwargs with the key being the name of the variable in the function call.
2015-01-28 18:43:43 -08:00
Thomas Jackson
82521ea205
Add backwards compatibility to "low" function-- since the object isn't well documented we have apparently used it in all possible ways ;)
2015-01-28 18:43:43 -08:00
Thomas Jackson
f835dd587c
Style cleanup
2015-01-28 18:43:43 -08:00