cross model relations across controllers grabbed the internal 10.x address

Bug #1711238 reported by Richard Harding
8
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://gist.github.com/mitechie/5afb59cb29acf14465b94ede77edfe2e

Revision history for this message
Ian Booth (wallyworld) wrote :

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.

Changed in juju:
milestone: none → 2.3-alpha1
importance: Undecided → High
assignee: nobody → Ian Booth (wallyworld)
status: New → In Progress
Revision history for this message
Ian Booth (wallyworld) wrote :

https://github.com/juju/juju/pull/7760

This functionality was on the roadmap but since we are now hitting the issue in practice, now's a good time to deliver it. Note that there are no charm changes required.

Changed in juju:
milestone: 2.3-beta1 → 2.3-beta2
Ian Booth (wallyworld)
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.