cross model relations across controllers grabbed the internal 10.x address
Bug #1711238 reported by
Richard Harding
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Ian Booth |
Bug Description
When setting up the linked cross model configuration the prometheus instance ended up pulling the private 10.X addresses of telegraf for use in gathering metrics. This failed across clouds and should have been the public addresses instead.
https:/
Changed in juju: | |
milestone: | 2.3-beta1 → 2.3-beta2 |
Changed in juju: | |
status: | In Progress → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The issue here is that the charm calls the unit-get hook tool:
$ unit-get private-address
The context in which this call runs is set up such that a number of values such as public/private addresses, availability zone, principal unit etc are determined ahead of time and cached on the context. In the case of unit private-address, this caching is done without regard to the relation context in which the hook may be running, ensuring that we always return the 10.x address (or whatever) to the charm even if we are in a cross model relation.
We ultimately want to deprecate unit-get in favour of using network-get. However, we need a way to make existing charms able to work in a CMR scenario with limited (hopefully no) modifications.