> > In my config-change hook when triggered after initial install, changes > will have effect on some of the relationships already established. The > relationship has to be broken/invalidated and reestablished. > > 1) How can I check what relations are established from within the > config-changed hook ? >
You can use `relation-ids` and `relation-list` for this. [1] > 2) How can I executed the “*relation-broken” hook from the "config-change" > hook for those relationship which are established ? > Instead of breaking and reestablishing existing relationships, you'll want to reconfigure them. Use `relation-set` [2] to set relation data from within you config-changed hook. This will trigger the *relation-changed hook on related units. Those units can get the new relation data using `relation-get`, reconfigure themselves, and if necessary, restart their service(s). [1] https://juju.ubuntu.com/docs/authors-hook-environment.html#relation-list [2] https://juju.ubuntu.com/docs/authors-hook-environment.html#relation-set
-- Juju mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju
