Address changes brainstorm

Gustavo Niemeyer gustavo.niemeyer at canonical.com
Tue Mar 27 17:59:33 UTC 2012


Folks, my apologies in advance if that makes little sense. It's just a
brainstorm Kapil and myself just had over a call, and it contains
sentences from both of us intermixed.

Just a reminder for the future, really, since the problem for 12.04 is
significantly simpler and straightforward to deal with.


Problem
------------

At startup a unit agent records its public and private addresses into its state.

1. Attaching a public ip address to a unit changes its public address
invalidating its output in status, and previously used values from the
cli unit-info get public-address


Others of note

2. Rebooting a unit's machine causes both public and private addresses
to change.
3. Rebooting the bootstrap node, chops the head off the cluster, as
none of the other nodes know how to connect to zookeeper anymore.
4. if private address changes, the extant relations for the unit have
the wrong address, as their initialized with private-address.


Which options do we have!?
-----------------------------------------

1. Not record public IP and query it on demand whenever a relation
calls relation-get public-address

    Ugh. That's extremely hackish. :-(

    Well, i was thinking we would still publish private-address
statically into the relation, but the unit-info would respond
dynamically. the public address is not part of the relation by
default.

2. Introduce a new command such as remote-info --public-address that
is not stored persistently

    Even then, the remote unit needs to be aware of that. Such a
command would not cause the
    hooks to be called again, for example.

3. Introduce a new hook such as db-address-changed, and allow the unit
to relation-set

   Sounds bad, since it involves a lot of manual fiddling to perform
something that might be done
   completely transparently. yeah, and random gaps when its wrong.

4. Poll update within the unit agent, and update the address as needed.

    This would kill the use case of having units faking their actual
addresses to implement
    "proxy charms" that bridge external systems.


Solution Criteria
-----------------------

- backwards compatibility for 12.04



-- 
Gustavo Niemeyer
http://niemeyer.net
http://niemeyer.net/plus
http://niemeyer.net/twitter
http://niemeyer.net/blog

-- I'm not absolutely sure of anything.



More information about the Juju mailing list