Re: Coordinating actions in a service

2015-05-12 Thread Stuart Bishop
On 8 May 2015 at 20:35, Gustavo Niemeyer gust...@niemeyer.net wrote: On Fri, May 8, 2015 at 10:24 AM, John Weldon johnweld...@gmail.com wrote: Hi Stuart; I think this is addressed in the proposed work for Actions 2.0 In the current model you'd have to manage all of this yourself. Actions

Re: Coordinating actions in a service

2015-05-08 Thread Gustavo Niemeyer
On Fri, May 8, 2015 at 10:24 AM, John Weldon johnweld...@gmail.com wrote: Hi Stuart; I think this is addressed in the proposed work for Actions 2.0 In the current model you'd have to manage all of this yourself. Actions can only be targeted to specific units in the current implementation,

Re: Coordinating actions in a service

2015-05-08 Thread John Weldon
Hi Stuart; I think this is addressed in the proposed work for Actions 2.0 In the current model you'd have to manage all of this yourself. Actions can only be targeted to specific units in the current implementation, so you'd have to manage the distribution outside of actions (or else, as you

Re: Coordinating actions in a service

2015-05-08 Thread John Weldon
Actions are not hooks, but they are run in a similar fashion as hooks. I don't know of any restriction keeping actions from communicating with peers before the action completes, but that would be something we'd need to address for Actions 2.0 certainly. I like the concept of metering actions out

Re: Coordinating actions in a service

2015-05-08 Thread Simon Davy
On 8 May 2015 at 14:28, Gustavo Niemeyer gust...@niemeyer.net wrote: - The requirement of running an action across all units but without executing in all of them at once also sounds very common. In fact, it's so common that it should probably be the default when somebody dispatches an action

Re: Coordinating actions in a service

2015-05-08 Thread Gustavo Niemeyer
Hi Stuart, I see two ways to fix this issue, and both are probably worth implementing for their own good: - We should be able to have an action that lives past the execution of the action hook, upon request. This would enable the leader unit to communicate with all peer units to do anything it

Coordinating actions in a service

2015-05-08 Thread Stuart Bishop
Hi. I have several potentially long running and expensive database operations I'd like to wrap as actions, which will generally be run on just one unit or on all units of the service. The problem I have is running an action on all units of the service. For HA, I need to ensure that, if there is