any ways to update unit public address ?
Kapil Thangavelu
kapilt at gmail.com
Wed May 27 00:17:41 UTC 2015
On Tue, May 26, 2015 at 4:36 PM, Andrew Wilkins <
andrew.wilkins at canonical.com> wrote:
> On Tue, May 26, 2015 at 11:45 PM, Vasiliy Tolstov <v.tolstov at selfip.ru>
> wrote:
>
>> Hi! users sometimes can changed their server ip address, does it
>> possible to change unit public address?
>> Or only way is to edit mongodb database on state server?
>
>
> Hi Vasiliy,
>
> Do you mean in relation settings? The charm's config-changed hook
> will be invoked when the machine addresses change. You can use this
> hook to update a unit's relation settings.
>
> There was a long thread about automatically updating the address,
> but we didn't go there because it would break "proxy charms"; charms
> that manage remote services, presenting addresses for remote machines.
>
>
relation settings only propagates private ip, which juju sets, and its imo
bug that juju should update and invoke relation change hook if it changes
and has the previously set value (ie. thus works w/ proxy charms). at least
that was my summary going in and out of the that monster thread. at the
moment juju doesn't update the addresses it set, but it will invoke
config-changed when addresses changed afaicr but effectively zero charms
are ready to handle that.
re public address, unit-get public-address makes it available as info into
the charm, but there isn't a mechanism per-se to modify the address or
notify wrt to that information.
you can manually modify the relation settings that convey private/public
address info with juju run ala
https://gist.github.com/kapilt/a61efcb4eaef9e685397
might be helpful if you could clarify the context that the public address
changed and how its causing a problem with a concrete example.
cheers,
Kapil
> Cheers,
> Andrew
>
>
>> --
>> Vasiliy Tolstov,
>> e-mail: v.tolstov at selfip.ru
>>
>> --
>> Juju-dev mailing list
>> Juju-dev at lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/juju-dev
>>
>
>
> --
> Juju-dev mailing list
> Juju-dev at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20150526/efe23d46/attachment.html>
More information about the Juju-dev
mailing list