Comment 1 for bug 1859769

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

We've just discussed this in today's Charm Tech standup, and the fix for this might be two complementary changes:

1) We need a new hook which has actually been discussed before: <name>-relation-created; This is fired as soon as a relation is established, and before any units are accounted as joined as far as the local unit agent knows about. This hook fires once for each relation ID, and is the missing complement of <name>-relation-broken.

2) Specifically for peer relations, we can account the relation as created to begin with, since it's more of a circle of friends, and the local unit itself is part of that relation as soon as it's alive. In other words, all peer relations would fire <name>-relation-created, even if the local unit is the single participant right now.

With both of these features in place, we have a nice point to set data on the application even before any further units join.