Commit Graph

45893 Commits

Author SHA1 Message Date
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
Thomas Jackson
3e531e706e Fix typo 2015-01-28 18:43:43 -08:00
Thomas Jackson
5bfef71240 Pylint fix 2015-01-28 18:43:43 -08:00
Thomas Jackson
4df4a297cb Remove __progress__ from lint checks, and add in jid_event 2015-01-28 18:43:43 -08:00
Thomas Jackson
aedfe4ef68 Change to new event fire_event markup 2015-01-28 18:43:43 -08:00
Thomas Jackson
b6a529b292 Change how we print out events from runner/wheel calls
Now if you do something like:
```
fire_event({'data': 'Runner is {0}% done'.format(i), 'outputter': 'pprint'}, 'progress')
'Runner is 96% done'
```

```
fire_event({'data': 'Runner is {0}% done'.format(i)}, 'progress')
progress: {'data': 'Runner is 12% done'}
```

This means that you don't have to actually specify the outputters etc if you just want it to print something.
2015-01-28 18:43:43 -08:00
Thomas Jackson
6939e39d54 Add __init__ arg to Runner(), and call self.async (since its a subclass) 2015-01-28 18:43:43 -08:00
Thomas Jackson
71c9533185 Cleanup __init__, since outputters are only needed in run() 2015-01-28 18:43:43 -08:00
Thomas Jackson
123287549b Fix builtin access 2015-01-28 18:43:43 -08:00