Handling IP address change

Stuart Bishop stuart.bishop at canonical.com
Tue Dec 9 10:20:32 UTC 2014


On 9 December 2014 at 15:58, John Meinel <john at arbash-meinel.com> wrote:
> If you get config-changed can you use that to update your host field causing
> relation-changed where you need it?

Yes, that isn't a problem.


>> >> I need to keep the 'host' attribute on my database relations in sync
>> >> with the actual IP address (or in future, the IP address of one of the
>> >> related proxies).
>>
>> If only the public-address attribute is changed, triggering the
>> relation-changed hooks on any client unit, then a number of charms
>> will still need to be updated (like postgresql & mysql, which mirror
>> the public address in the 'host' attribute). If the relation-changed
>> hooks on both ends where triggered, then some of these would not need
>> to be updated (at the cost of a larger hook storm).

I only mentioned this since triggering the relation-changed hooks
could avoid the need to update the charm entirely in some cases. I
doubt it is worth it though.


-- 
Stuart Bishop <stuart.bishop at canonical.com>



More information about the Juju mailing list