Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

private-address returns IP address, not name #1409

Closed
anastasiamac opened this issue Sep 27, 2016 · 14 comments
Closed

private-address returns IP address, not name #1409

anastasiamac opened this issue Sep 27, 2016 · 14 comments
Assignees

Comments

@anastasiamac
Copy link

As per https://bugs.launchpad.net/juju-core/+bug/1557769, it would be nice to have clearer documentation around private-address.

@evilnick
Copy link
Member

I would be happy to add clarity if I knew what it was. From the bug report it seems that it can return either a name or a number until 2.1?

@stub42
Copy link

stub42 commented Nov 11, 2016

At the moment, it could return a chocolate frog and we wouldn't know if it is a bug or works as intended. And everybody points at everyone else and nothing gets fixed. With some cloud providers with some Juju versions, it has returned a name and it breaks a whole heap of stuff when it does so. By actually specifying what it should be returning, we know where the bugs are and who needs to fix them. My vote is for declaring it to return an IP address, matching what I think is in 2.1 at which point we can fix supported versions of Juju and move on.

@pmatulis
Copy link

@anastasiamac It sounds like this is a discussion for the Juju core team to have.

@pmatulis pmatulis self-assigned this Sep 26, 2017
@anastasiamac
Copy link
Author

@pmatulis,

Please clarify - what discussion should core have? The bug linked above seems to indicate user confusion with functionality. We need docs to clearly state what's going on ;) to avoid further confusion.

I am happy to find out what we currently have, especially if there are chocolate frogs (!!). This should help everyone to figure out what we should have in the long-term.

@anastasiamac
Copy link
Author

@pmatulis,
Just to clarify - yes, core needs to review and discuss what behavior we should settle on.
However, the docs should be a reflection of what is the current state of the world, AS-IS, regardless of whether the taken approach is correct or suitable to all.

@pmatulis
Copy link

pmatulis commented Sep 26, 2017

@anastasiamac It looked like Juju would return an address or a name. Are you saying it is always an IP address? And also, since which Juju version?

@anastasiamac
Copy link
Author

@pmatulis,
According to the bug, we do not consistently return an IP address. Sometimes, it's a hostname. I will find out for you under what circumstances one is returned instead of the other.
Then we'd need to document these clearly.

@evilnick
Copy link
Member

@anastasiamac
This is clearly a bug. We don't often document bugs as if they were the expected behaviour - historically for important issues we have included a link to the bug in the docs.

If @stub42 's observations are still correct, I don't really relish the idea of having different documentation for different versions on a per cloud basis, but I think we will deal with that when we know what that behaviour is.

@stub42
Copy link

stub42 commented Sep 26, 2017

The goal here was to declare what the correct behaviour should be, so that cloud providers not doing that could be fixed. The problem in the past was that the cloud provider could return anything it wanted, and because it wasn't technically a bug, it wouldn't get fixed. And this broke charms, because they could not rely on Juju being consistent.

The manual provider consistently returns a name rather than an IP address if the machine was added with a name rather than an IP address, and you will find charms in the store that fail when deployed to one of these machines. Several charms have implemented the work around, doing the name resolution themselves, such as Cassandra and RabbitMQ. The usual way of discovering the problem is failed deployments on client sites, since charmers don't see the problem in their test environments.

I believe the newer networking tool declares that it returns IP addresses, so this problem will go away when charms drop support for Juju <2.?.

@pmatulis
Copy link

According to a discussion with the Juju team on the matter, it looks like we will keep things as is. Nothing will change for 1.25. Charmers will need to adapt to whatever is returned, a name or an address. Going forward, it should be possible to request either in an unambiguous manner with network-get.

@anastasiamac Since you opened this bug and you were in on the aforementioned discussion, please let me know whether our docs still need to be updated and, if so, on which page.

@anastasiamac
Copy link
Author

@pmatulis,
I think that this can be closed once you are happy that online doc makes it explicit that we recommend to use network-get :D Maybe private-address should not be mentioned for newer Juju versions?

@pmatulis
Copy link

@anastasiamac Ha! 🏓 OK

@pmatulis
Copy link

@anastasiamac Please see the above PR.

@anastasiamac
Copy link
Author

@pmatulis - done ;) To my eyes, it looks better! Thank you for cleaning it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants