normal charm to subordinate charm and now peer relation does not work

Tilman Baumann tilman.baumann at canonical.com
Wed Jan 25 11:43:30 UTC 2017


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.

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
> 



More information about the Juju mailing list