| Provide the ability to execute plans across multiple nodes in parallel. For example, consider the following scenario that relates to operating system patching:
- Plan module::patch_and_reboot has the following steps:
- Perform some pre-patching tasks
- Install OS updates/patches
- Reboot the node and wait for it to return
- Perform some post-patching tasks
When executing the above plan on multiple nodes (likely from within from another plan that handles pre/post steps for the entire server list, result handling, etc.), the steps are serialized into a single, synchronous task sequence. If one node takes an hour for step 2 (install updates), but the rest only take 5 minutes, the remaining steps for all other nodes will wait for the single node to complete step 2 before moving on. Workarounds are to code more logic into each of the steps (which are ultimately bolt tasks - scripts), or use an external script to call multiple instances of bolt executing the plan. It would be ideal if this is something bolt could handle itself - either through the ability for run_plan to multi-thread plan execution, or through the implementation of multi-threading/background jobs in a similar fashion to Python threading or PowerShell runspaces. |