Hi Marco,

What I really need is the relation status, not necessarily a synchronous 
execution for "add relation".When I link 2 charms through a relation, I want to 
have the possibility (by running the status command or a different one) to see 
if the specific relation is still running (the corresponding rel.  hooks are 
still running) or it's finished.The state of a service is changing depending on 
the progress of the install, config-changed and start hooks, so a similar 
information I want to be available for relations (relation hooks).

Tudor

From: Marco Ceppi <[email protected]<mailto:[email protected]>>
Date: Monday, August 25, 2014 at 8:05 PM
To: Chris Glass <[email protected]<mailto:[email protected]>>
Cc: Tudor Rogoz <[email protected]<mailto:[email protected]>>, 
"[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: Re: juju relation status

My question is why do you need to run add-relation in a synchronous fashion?


On Fri, Aug 22, 2014 at 9:02 AM, Chris Glass 
<[email protected]<mailto:[email protected]>> wrote:
Charm-helpers uses a trick for this, which is to check if the
"private-address" key was set on the relation.
You can have a better look here:
https://bazaar.launchpad.net/~charm-helpers/charm-helpers/devel/view/head:/charmhelpers/core/hookenv.py#L393

Hope this helps :)

- Chris

On Fri, Aug 22, 2014 at 3:35 PM, Tudor Rogoz 
<[email protected]<mailto:[email protected]>> wrote:
> Hi,
>
> Does anyone knows how to determine when a relation is establish (when the
> relation joined or relation changed hooks ended) ? The goal would be to be
> able to synchronously run the "juju add-relation" command.
>
> Thanks,
> Tudor
>
> --
> Juju mailing list
> [email protected]<mailto:[email protected]>
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>

--
Juju mailing list
[email protected]<mailto:[email protected]>
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju

-- 
Juju mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju

Reply via email to