Mcollective sequential execution update
Mcollective used for server orchestration performs the actions parallelly in the servers which are connected to it. So a single command fired via mcollective affects all the servers connected to the middleware or all the servers which match the filters (if filters are used). In some cases the actions need to be performed on the servers one by one, hence the need for sequential execution. By sequencial execution i mean to perform the action on the servers one by one and also the ability to abort the process in the middle if needed.
Mcollective 2.x supports batch processing, hence it can be configured to batch servers one by one with a wait time between each servers. This effectively achieves sequential execution. The drawback is that you ll not be able to view the results till all the servers have completed performing the action, this is a serious drawback in some cases and if your action goes wrong all servers are afffected and only then u get the result.
http://docs.puppetlabs.com/mcollective/simplerpc/clients.html#processing-agents-in-batches
http://www.devco.net/archives/2012/07/23/mcollective-batched-requests.php
In this method you invoke the actions on each server by means of hardcoded client. Obviously it achieves sequencial execution but it can be improved
https://github.com/pandian912/Mcollective/blob/master/clients/seqexeccli-dumb.rb
3. Use discovery then custom requests
This is an improvement of the previous in which the list of servers discovered by mcollective is retrieved and then custom request sent to each servers individually, hence achieving sequential execution. In this method all the command line filters can be used and the list of hosts retrieved after discovery can be handled programatically.
https://github.com/pandian912/Mcollective/blob/master/clients/seqexeccli.rb
4. Display results immediately with sleep time (failed to achieve seq exec)
This method is a failure as it did not achieve seq execution rather it only displayed the results of the execution one by one, but the actions were performed on the servers in parallel.
http://docs.puppetlabs.com/mcollective/simplerpc/clients.html#gaining-access-to-mcollectiveclientreq-results
5. batch with display imm
Though the fourth method was a failure, it can be combined with first method to perform the actions in batches and displaying the result as and when they arrive. This effective achieves sequential execution. I believe this and the third method are good.
https://github.com/pandian912/Mcollective/blob/master/clients/seqexeccli-batch.rb