Hi Mike, You cannot control the sequence in which the hooks are executed, but you have full control of what you do when the hooks do execute. You can choose to send nothing to the other side of the relation until its time to report that a connection may now be established, and when you do change the relation, the remote hook will run again to report the change.
On Tue, Sep 3, 2013 at 10:17 PM, Mike Sam <mikesam...@gmail.com> wrote: > Imagine a unit needs to be added to an existing service like service A. > Service A is already in relations with other services like Service B and > Service C on different "requires". > > For the new unit on Service A to work, it needs to first process the > relation_joined and relation_changed with the units of service B before it > could process relation_joined and relation_changed with the units of > service C. > > Is there a way to enforce such desired sequence relationship establishment > at the charm level? In other words, I do not think we can control the hook > execution sequence of different relationships officially but then I am > wondering how can we do a situation like above nicely? > > Thanks, > Mike > > > > > > -- > Juju-dev mailing list > Juju-dev@lists.ubuntu.com > Modify settings or unsubscribe at: > https://lists.ubuntu.com/mailman/listinfo/juju-dev > -- gustavo @ http://niemeyer.net -- Juju-dev mailing list Juju-dev@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev