Comment 3 for bug 1575764

Revision history for this message
Drew Freiberger (afreiberger) wrote :

In relation to this issue, I think there's a wider implication of issues in charm relations if units get an IP address change either by OP's lxd bridge IP change or by DHCP renewal gaining a different IP address.

What does juju provide to a charm author that would allow for relation ips to be updated? I'm wondering if on unit startup if *-relation-changed should be called on all relations. Unfortunately, I think there are some edge cases where one might set an ip in the relation data only on relation-joined and not on relation-changed.

Consider the above in context of the cinder-ceph relation to ceph-mon/ceph or nova-compute relation to ceph-mon/ceph where ceph-mon provides it's IPs in private-address to the consumer services and if a ceph-mon had an address change, juju might be able to connect to the new IP by virtue of restarting the jujud-unit agent, but the relation-data may be stale if the address changed.

I read through the juju documentation on hooks and lifecycle and seems that start, config-changed, and update-status are called on unit startup, but nothing in regards to relations.