<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jun 17, 2014 at 3:42 PM, William Reade <span dir="ltr"><<a href="mailto:william.reade@canonical.com" target="_blank">william.reade@canonical.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5">On Tue, Jun 17, 2014 at 6:39 AM, Andrew Wilkins <span dir="ltr"><<a href="mailto:andrew.wilkins@canonical.com" target="_blank">andrew.wilkins@canonical.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi all,</div><div><br></div><div>I've started looking into fixing <a href="https://bugs.launchpad.net/juju-core/+bug/1215579" target="_blank">https://bugs.launchpad.net/juju-core/+bug/1215579</a>. The gist is, we currently set private-address in relation settings when a unit joins, but never update it.</div>


<div><br></div><div>I've had some preliminary discussions with John, William and Dimiter, and came up with the following proposal: <a href="https://docs.google.com/a/canonical.com/document/d/1jCNvS7sSMZqtSnup9rDo3b2Wwgs57NimqMorXr9Ir-o/edit" target="_blank">https://docs.google.com/a/canonical.com/document/d/1jCNvS7sSMZqtSnup9rDo3b2Wwgs57NimqMorXr9Ir-o/edit</a></div>


<div><br></div><div>If you're a charm author, particularly if you work on "proxy charms", please take a look at this and let me know of any concerns or suggestions. I have opened up comments on the doc.<br>

</div>
<div><br></div><div>In a nutshell:</div><div> - There will be a new hook, relation-address-changed, and a new tool called address-get.</div><div> - The hook will be called when the relation's address has changed, and the tool can be called to obtain the address. If the hook is not implemented, the private-address setting will be updated. Otherwise it is down to you to decide how you want to react to address changs (e.g. for proxy charms, probably just don't do anything.)</div>

</div></blockquote><div><br></div></div></div><div>I think that what the proposal says is subtly different: that is, that we *will* update the private-address setting for that foo relation at the start of the foo-relation-address-changed hook, but that it won't be propagated further until that hook is committed.</div>

<div><br></div><div>The upshot is that if you're *not* a proxy charm, you can *probably* ignore the relation-address-changed hook [0]; but if you *are* a proxy charm, you must (almost) certainly overwrite the new private-address setting with that of the endpoint you're proxying.</div>
</div></div></div></blockquote><div><br></div><div>Thanks, you're quite right, and the wording in the doc is what is expected of charm authors.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>IMO this behaviour is more consistent and predictable than behaving differently depending on whether or not a particular hook is implemented.</div><div>
<br></div><div>Cheers</div><div>William</div><div>
 </div><div>[0] some interfaces have their own language -- say "host" -- and they'll have to be responsible for updating themselves.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">
<div><br></div><div>Thanks,</div><div>Andrew</div></div><span class="HOEnZb"><font color="#888888">
<br>--<br>
Juju-dev mailing list<br>
<a href="mailto:Juju-dev@lists.ubuntu.com" target="_blank">Juju-dev@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju-dev</a><br>
<br></font></span></blockquote></div><br></div></div>
</blockquote></div><br></div></div>