Merge pull request #43315 from rallytime/bp-43283
Back-port #43283 to 2017.7.2
Prevent spurious "Template does not exist" error
This was merged previously (though slightly differently) in #39516 Took me a second to track it down and then realized that I fixed this in 2016.x
Merge pull request #43377 from rallytime/bp-43193
Back-port #43193 to 2017.7.2
Revert "Reduce fileclient.get_file latency by merging _file_find and …
…_file_hash" This reverts commit 94c6238.
Merge pull request #43440 from rallytime/bp-43421
Back-port #43421 to 2017.7.2
Fix logic in /etc/paths.d/salt detection
Merge pull request #43509 from rallytime/bp-43333-2017.7.2
Back-port #43333 to 2017.7.2
Merge pull request #43551 from twangboy/osx_fix_preinstall_2017.7.2
Fix preinstall script on OSX for 2017.7.2
Unify reactor configuration, fix caller reactors
There are 4 types of reactor jobs, and 3 different config schemas for passing arguments: 1. local - positional and keyword args passed in arg/kwarg params, respectively. 2. runner/wheel - passed as individual params directly under the function name. 3. caller - only positional args supported, passed under an "args" param. In addition to being wildly inconsistent, there are several problems with each of the above approaches: - For local jobs, having to know which are positional and keyword arguments is not user-friendly. - For runner/wheel jobs, the fact that the arguments are all passed in the level directly below the function name means that they are dumped directly into the low chunk. This means that if any arguments are passed which conflict with the reserved keywords in the low chunk (name, order, etc.), they will override their counterparts in the low chunk, which may make the Reactor behave unpredictably. To solve these issues, this commit makes the following changes: 1. A new, unified configuration schema has been added, so that arguments are passed identically across all types of reactions. In this new schema, all arguments are passed as named arguments underneath an "args" parameter. Those named arguments are then passed as keyword arguments to the desired function. This works even for positional arguments because Python will automagically pass a keyword argument as its positional counterpart when the name of a positional argument is found in the kwargs. 2. The caller jobs now support both positional and keyword arguments. Backward-compatibility with the old configuration schema has been preserved, so old Reactor SLS files do not break. In addition, you've probably already said to yourself "Hey, caller jobs were _already_ passing their arguments under an "args" param. What gives?" Well, using the old config schema, only positional arguments were supported. So if we detect a list of positional arguments, we treat the input as positional arguments (i.e. old schema), while if the input is a dictionary (or "dictlist"), we treat the input as kwargs (i.e. new schema).
Rewrite the reactor unit tests
These have been skipped for a while now because they didn't work correctly. The old tests have been scrapped in favor of new ones that test both the old and new config schema.
Improve the reactor documentation
This reorganizes the reactor docs and includes examples of the new reactor SLS config syntax.
Merge pull request #43586 from rallytime/bp-43526
Back-port #43526 to 2017.7.2
Merge pull request #43585 from rallytime/bp-43330
Back-port #43330 to 2017.7.2
Merge pull request #43671 from rallytime/merge-2017.7
[2017.7] Merge forward from 2017.7.2 to 2017.7