add-unit relation question

David Britton david.britton at canonical.com
Tue Jun 4 03:32:41 UTC 2013


Thanks William --

I'll work on hammering that out tomorrow, should be fairly straightforward.


On Mon, Jun 3, 2013 at 3:27 PM, William Reade
<william.reade at canonical.com>wrote:

> On Mon, Jun 3, 2013 at 9:34 PM, David Britton <david.britton at canonical.com
> > wrote:
>
>> I tried changing that, and it is still racy.  I don't think there is any
>> policy in juju that *all* joined hooks are run before *all* changed hooks.
>>  Sure, they are run serially on the same unit, but across units if joined
>> takes too long, joining units can start running changed before joined is
>> finished.  I think I've verified this with a simple test charm.
>>
>
> For a reasonably detailed look at what's guaranteed wrt hook execution,
> http://bazaar.launchpad.net/~juju/juju-core/trunk/view/head:/doc/charms-in-action.txt should
> tell you almost all you ever wanted to know, and possibly more. It's not an
> exceptionally fun read, but it should be accurate: it's not very recent,
> but I don't think it's rotted much since I wrote it. "Relations in depth"
> and subsequent sections, starting at :246, are probably most relevant, but
> you probably want to skim the foregoing for context.
>
> In this particular scenario, the postgres charm doesn't write any
> remote-unit-specific data to the relation, so there is indeed currently no
> way to tell when pg_hba.conf has been written with the information required
> for a particular client. I'd recommend option (3) in the original mail to
> resolve this situation; client charms should just exit -relation-changed
> without error if their name is not present in the list of acknowledged
> clients, and just relax until their -relation-changed is run against valid
> data before trying to connect. (FWIW, I'm a little surprised this hasn't
> come up before... surely *some* other charms exist that handle analogous
> situations?)
>
> Cheers
> William
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20130603/4e446b30/attachment-0001.html>


More information about the Juju mailing list