|
From: | Vineet Gupta |
Subject: | Re: [Fab-user] Summarize results from parallel execution |
Date: | Mon, 3 Jun 2013 16:29:59 -0700 |
Nevermind. Moving roles to the bottom with task on top does the trick.
@fabapi.task
@fabapi.parallel
@fabapi.roles('app')
def status():
"""Show apache status"""
...
Moving roles to the bottom with task on top does the trick.
Thanks,
Vineet
@parallel and @roles does not seem to play nice together. My tasks are always executing in serial order, unless I am setting env.parallel = True. This is how I am decorating my tasks -@fabapi.roles('app')@fabapi.task@fabapi.paralleldef status():"""Show app status"""...Any suggestions?Thanks,VineetOn Wed, May 29, 2013 at 6:04 PM, Vineet Gupta <address@hidden> wrote:
Thanks a bunch. Exactly what I needed. I didn't realize how execute() returns value from all parallel execution as dictionary.Much appreciated.- VineetOn Wed, May 29, 2013 at 5:09 PM, Jeff Forcier <address@hidden> wrote:
I added the answer to this, as an FAQ in the docs. It comes up a lot.
It's here now:
http://docs.fabfile.org/en/1.6/faq.html#how-can-i-run-something-after-my-task-is-done-on-all-hosts
(which should link to
http://docs.fabfile.org/en/1.6/usage/execution.html#leveraging-execute-return-value
)
-Jeff
On Wed, May 29, 2013 at 4:07 PM, Vineet Gupta <address@hidden> wrote:
> Thanks Jeff.
> As Fabric runs a given task in parallel, what would be the best way to
> collect information from various runs on different hosts, and publish it
> once task finishes?
>
>
> On Wed, May 29, 2013 at 1:32 PM, Jeff Forcier <address@hidden> wrote:
>>
>> If you check the API docs you'll see that `execute()` returns a
>> host-string-keyed dict whose values are the return code of each
>> iteration of the task, or an exception object if the task failed
>> partway. That should get you at least part of the way there. Either
>> way, summary reporting (in any mode, serial or parallel) is something
>> that's definitely on the table at some point.
>>
>> On Wed, May 29, 2013 at 1:04 PM, Vineet Gupta <address@hidden> wrote:
>> > I am trying to find best option to summarize results from parallel
>> > execution
>> > of certain task. Usually what happens that I have to look through the
>> > debug
>> > trace to figure out what succeeded and what failed. What I'd like to do
>> > is
>> > an option to look into result.return_code and construct a result in a
>> > tabular structure with hosts which "passed" and hosts which didn't pass.
>> >
>> > Thanks,
>> > Vineet
>> >
>> > _______________________________________________
>> > Fab-user mailing list
>> > address@hidden
>> > https://lists.nongnu.org/mailman/listinfo/fab-user
>> >
>>
>>
>>
>> --
>> Jeff Forcier
>> Unix sysadmin; Python/Ruby engineer
>> http://bitprophet.org
>
>
--
Jeff Forcier
Unix sysadmin; Python/Ruby engineer
http://bitprophet.org
[Prev in Thread] | Current Thread | [Next in Thread] |