racker/dreadnot — pull request #54 by dlobue (2013-08-02 19:24:53+00:00)
Title: Add parallelLimit to knife.queryAndRun

Add ability to limit the number of concurrent tasks run against the servers knife returns. Also support functions as the value for parallelLimit so users can limit the number of tasks run in parallel based on the number of servers found.

The primary motivation for this is to make it possible to do a rolling run of chef on servers.

This is fully backwards compatible, parallelLimit is optional.

Note: if the task being run by queryAndRun fails, then that task will NOT be run on the remaining servers. If the parallelLimit is more than one, however, and the jobs running against the other servers will finish their runs.

One thing to be aware of: there is no guarantee that jobs will be run on servers in the same order. If one run fails, the next run will most likely NOT start on the server that failed last time.