Hi Tilman

On Wed, Jan 25, 2017 at 11:43 AM, Tilman Baumann <
tilman.baum...@canonical.com> wrote:

> At this point I'm pretty sure that this is a bug or undocumented feature.
>
>
> The peer relation of a subordinate charm only has one conversation.
> Despite scope being 'global' in metadata.yaml and the RelationBase class
> being scope = scope.UNIT.
>

Shouldn't the metadata.yaml ALSO be 'unit' scope if you want individual
conversations without sharing the data between all the subordinate units?
 global would imply that all of the relations have the same data?  The
subordinate to principal relation will be unit (anyway), but the peer is
just like any other relation, except here it is between the subordinate's
on multiple machines.

Cheers
Alex.


> Either I'm wrong to expect this to work and subordinates are only
> supposed to have container scopes. Then it is a dokufix and should be
> caugt by charm proof.
>
> Or, it is a bug. I could not find the point in the code which could be
> wrong here. If anyone points me to the right place I would not mind
> working on a fix. In go or python.
>
> Thanks
>  Tilman
>
>
> PS: File as bug in LP?
>
>
> On 25.01.2017 11:00, Tilman Baumann wrote:
> > On 24.01.2017 16:56, Alex Kavanagh wrote:
> >> Hi Tilman
> >>
> >> (I'm not an expert here, but was staring at the docs)
> >>
> >> I suspect that your peers relationship should be unit if each peer needs
> >> to have it's own conversation?  Otherwise, with a global scope, every
> >> peer will overwrite the other's information?  At least I'm wondering if
> >> that what the scopes mean: see
> >> here: https://jujucharms.com/docs/2.0/developer-layers-interfaces
> >>
> >> If that's completely wrong, then a) sorry for the noise, and b) do tell,
> >> as it will help me in my understanding of juju scopes.
> >
> > No I think this must generally be the direction I need to think towards.
> > Any thought impulse in that direction can unlock the knot in my head. :)
> >
> > Thing is, my interface class is scope UNIT already. (GLOBAL and SERVICE
> > definitely would be wrong I think)
> >
> > What hasn't really connected in my brain is how this relates to the
> > scopes in metadata.yaml
> > They have different values. I could only find documentation for global
> > and container. Global apparently is the default. So that is what I set
> > it to explicitly. I'm quite sure that I had tried it with 'container'
> > too in one of the iterations of testing.
> >
> > I can't really see how the interface class scope could have changed. It
> > was always scope.UNIT. So I'm going to dig through some code to
> > understand the implications of scope in metadata.yaml...
> >
> >
> > Thanks Ales
> >  Tilman
> >
>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/juju
>



-- 
Alex Kavanagh - Software Engineer
Cloud Dev Ops - Solutions & Product Engineering - Canonical Ltd
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju

Reply via email to