unit-get private-address could be made space aware
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Witold Krecicki |
Bug Description
It should be possible to use "juju deploy app --bind space" to give a preferred address to "unit-get private-address" that is not just one of the random addresses on each machine.
We should be able to line up the "default" binding from "--bind space" and use that space's address as the "private-address" for the unit.
We were avoiding spending too much time here, but feedback has been that charms are slow to adopt 'network-get', and coming up with a stable solution would be very helpful for the field.
This would allow most charms that only function in a single space to be configured by the operator.
We should also make sure "relation-get private-address" from the other side of a relation also sees the same IP address.
Implementation wise, it should be possible to make state.Unit.
Changed in juju: | |
milestone: | 2.2-beta3 → 2.2-beta4 |
Changed in juju: | |
milestone: | 2.2-beta4 → 2.2-rc1 |
Changed in juju: | |
status: | In Progress → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
An interesting discussion point that came up on IRC with Ante, is that we might want to support: address
juju-private-
As the official name of the values that we will put in "unit-get private-address". That should end up with a similar property because of how default-inheritance works. (If you set a default binding, that implicitly sets all named bindings.)
That would let you do: private- address= bar
juju deploy app --bind foo,juju-
So all other bindings default to foo, but the specific not-otherwise- namespaced- to-a-binding would get you bar.
The particular use case is because nagios talks to nova-compute only via the 'juju-info' relation. Which doesn't otherwise have a binding associated with it. (we could potentially use juju-info as the binding name as well.)