Relation dependency

John Arbash Meinel john at arbash-meinel.com
Thu Jan 30 10:54:33 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I think you meant to include the list.

The idea is that *when* the charm for A connects to B, it changes the
configuration that C depends on. So *C* should then see some form of
"config-changed" hook get fired.

John
=:->


On 2014-01-30 14:51, Sameer Zeidat wrote:
>> So when A is connected to B it sets a value in its relation with
>> C
> that C then reacts to.
> 
> If I understood juju correctly, once A and C are joined there's no
> way for C to react to any change in A's relations to other charms.
> There's no 'relation-peerconfig-changed' hook for instance that
> gets invoked in C when A joins/departs B.
> 
> Sorry for not providing a specific example.
> 
> Regards, 
> ------------------------------------------------------------------------
>
> 
From: John Arbash Meinel <mailto:john at arbash-meinel.com>
> Sent: ‎30/‎01/‎2014 7:30 PM To: Sameer Zeidat
> <mailto:sameerz at yahoo.com>; Juju email list 
> <mailto:juju at lists.ubuntu.com> Subject: Re: Relation dependency
> 
> On 2014-01-30 5:49, Sameer Zeidat wrote:
>> Hello,
> 
>> I'm relatively new to juju, and starting to write some charms.
> 
>> One thing I'm missing is relation dependency. Say service A can 
>> join a relation with B and C. I would like for juju to stop A
>> from joining C if it has not joined B first. Same also, stop A
>> from departing C if it hasn't departed B first.
> 
> I'm pretty sure most of this is taken care of in terms of charm 
> configuration. So if charm A sees C but doesn't yet see B, then it 
> doesn't configure its connection to C. This is outside of what
> Juju specifically controls.
> 
> 
>> If this isn't possible then I'd like to at least be able to run
>> a hook on C, for instance, if A's relation with B changes.
> 
> Generally this is done by reflecting some sort of configuration
> change that C can see. So when A is connected to B it sets a value
> in its relation with C that C then reacts to.
> 
> 
>> Does it make sense?
> 
>> Thanks,
> 
> 
> 
> Having specific examples can help set the tone for what is
> actually being accomplished and how it would be modeled with Juju's
> relations.
> 
> John =:->
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlLqL2kACgkQJdeBCYSNAAOFEwCeJk9aJo3R37lNxjmIHivWPWiR
eagAn19YwEiuI6Fn2wiRMBoy3Pc0hPBY
=aDko
-----END PGP SIGNATURE-----



More information about the Juju-dev mailing list