Comment 8 for bug 1910973

Revision history for this message
Joseph Phillips (manadart) wrote :

This is `unit-get --format=json public-address` though.

If you look at where it is set on the context in worker/uniter/runner/context/contextfactory.go, there is a specific comment that it may not have been set in time for a hook execution.

In fact "install" is probably the only hook where it could be accessed quickly enough to not be found.

There is an easy work-around here - we supply public address on-demand and eschew setting it at context creation. The question is a strategic one; do we fix this tool that we want to deprecate, or push for preferred access path (which as of today seems be the subject of contention regarding whether it returns a suitable address).