Fwd: Coordinating actions in a service

Gustavo Niemeyer gustavo at niemeyer.net
Fri May 8 16:21:27 UTC 2015


Sorry, the removal of the list CC was unintended.


---------- Forwarded message ----------
From: Gustavo Niemeyer <gustavo at niemeyer.net>
Date: Fri, May 8, 2015 at 1:13 PM
Subject: Re: Coordinating actions in a service
To: John Weldon <johnweldon4 at gmail.com>




On Fri, May 8, 2015 at 12:42 PM, John Weldon <johnweldon4 at gmail.com> wrote:

> On Fri, May 8, 2015 at 8:00 AM, Gustavo Niemeyer <gustavo at niemeyer.net>
> wrote:
>
>>
>> On Fri, May 8, 2015 at 11:58 AM, John Weldon <johnweldon4 at gmail.com>
>> wrote:
>>
>>> Actions and Hooks are two different things.
>>>
>>
>> How are they different?
>>
>
> They're similar in that they're both initiated from the uniter loop.
> Basically one of the select stanzas in the uniter loop(s) look for new
> actions as reported by a Strings Watcher that reports new Action Ids.
>
> Once an action is selected the uniter constructs an action context
> including the name and parameters for the Action and then executes the
> defined action in the charm, which is responsible for logging output and
> building a result.  Unless the charm action explicitly calls action-fail
> then the action will be marked as successfully complete once the action
> process ends.
>
>   They're both processed in the Uniter loop, so only one will run at a
>>> time, not in parallel.  I don't know what you mean about not having access
>>> to hook tools, but actions do have access to the jujuc commands.
>>>
>>
>> I mean having access to things such as config-get, etc.
>>
>
> Yes, Actions have access to those.
>

All of that sounds very much in line with what the other hooks do. It's
still not clear to me why you claim actions and hooks are different.


> There is no spec at the moment, only some high level design goals: planning
>>> doc
>>> <https://docs.google.com/document/d/1vxlszQ_gyE2j7YN5LDGD5VE3RI7ijczvYMrzMgEabTQ/edit?usp=sharing>
>>>
>>>
>>
>> Okay, can you please let me know once you have the specification in place?
>>
>>
> Will do.  My status with Canonical is still being worked out, and I have
> been focusing on other clients since Nuremberg.
>

Understood, and thanks.


gustavo @ http://niemeyer.net



-- 

gustavo @ http://niemeyer.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20150508/9f391cc0/attachment.html>


More information about the Juju mailing list