Need consistent resolvable name for units

Bug #1590961 reported by Cory Johns
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Expired
Medium
Unassigned

Bug Description

This was discussed in Vancouver but we keep getting bitten by this, so I'm opening a bug to track it.

Juju should provide some form of DNS to ensure that charms can get consistent, resolvable, and reverse-resolvable names for the units. The behavior of providers is very inconsistent. Most give something like a host name for the private-address of a remote unit but some give IPs. And for `unit-get private-address`, sometimes it's resolvable on the unit in question but not from other units. This will only become more of an issue in the future with cross-model relations.

This comes up in big data because a lot of the software is Java-based and requires host names in their config that can both be resolved to an IP and have that IP reversed back to the host name. The Bigtop charms currently don't work on Joyent because it doesn't provide any DNS service like most other clouds.

Another use-case that the Hadoop charms run up against is that the software uses the configured host names to generate links in the web UIs and, even when they work internally, they're not resolvable from outside the cloud.

Resolving this in the charm is prohibitive. We worked around it in the previous iteration of Hadoop charms by passing around the list of host entries and populating them in /etc/hosts, but that became unwieldy quickly. There is a prototype DNS charm but it isn't maintained and since this is something that almost every charm will care about, it would quickly become something that every charm would need to support. It couldn't even be handled in a generic way because it would lead to race conditions in the charms.

My suggestion is to have Juju run a split-horizon DNS on the controller which would handle only domains of the form <unit>.<service>.<model>.<controller>.juju and <service>.<model>.<controller>.juju. The units would be automatically configured on bootstrap to use that DNS, which would resolve those names to the internal IP of the given unit or leader of the service, respectively. The Juju client could also automatically (optionally?) add that server to the client, and it would resolve those names to the public IPs of the unit or service leader.

Revision history for this message
Marco Ceppi (marcoceppi) wrote :

I think the idea of <application> for an entry is a bit much. How should that be handled? Is it all the addresses as A/CNAME entries for round-robin, or is it just the leader? To keep this solution and implementation simple/clean it should just be a mapping at the lowest level, the unit.

Furthermore, the model UUID should be the TLD. If we use .juju as a tld we run into the potential problem of that conflicting if juju ever becomes a TLD (don't scoff, this has already bitten a lot of people with other TLDs).

I'd expect, to start, something such as unit-<APPLICATION>-#.MODEL_UUID which is simple and fixes the problem at hand. In later releases, it'd be nice to see that UNIT.APPLICATION.MODEL format but might be a bit much to solve for the upcoming 2.0 release.

The final, potential, problem is we'd be overriding the DNS lookup values with cloudinit, making the controller(s) the nameserver for the deployment. This means that the controller will also have to properly handle DNS forwarding or we'll run into a lot more problems.

Revision history for this message
Antonio Rosales (arosales) wrote :

Note, as Joyent does not provide internal DNS we are going to have to blacklist this cloud in charm testing until we come up with a solution in juju to resolve this issue.

Revision history for this message
Cory Johns (johnsca) wrote :

+1 on only supporting the unit and using the model UUID. Though, with the UUID, we have run in to length issues with host names, again with Java. Specifically, Hadoop with Java 7 borks on hostnames longer than 64 characters, though it does work fine in Java 8.

Revision history for this message
Cheryl Jennings (cherylj) wrote :

Added to the feature requests tracker: https://github.com/juju/juju/wiki/Feature-Requests

Changed in juju-core:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Cory Johns (johnsca) wrote :
Changed in juju-core:
milestone: none → 2.0.0
Revision history for this message
Richard Harding (rharding) wrote :

There is a design for a feature to add dns names to Juju using a NSS plugin on linux. Windows support TBD. The names would be formulated out of the IP address of the machine so that it was easy to map. A proper spec is in flight and will make sure that Cory and folks here have a chance to review/+1 the spec.

Changed in juju-core:
milestone: 2.0.0 → 2.1.0
affects: juju-core → juju
Changed in juju:
milestone: 2.1.0 → none
milestone: none → 2.1.0
Revision history for this message
Andrew McDermott (frobware) wrote :

For the resolvable hostnames we have:

  https://github.com/frobware/nss-juju/

This PoC was tested by charmers at the summit this week, and specifically with the Hadoop charms. My understanding is that this worked for AWS, GCE and on OpenStack. There are open issues around reverse DNS lookup on Azure. There is also a WIP branch:

 https://github.com/dimitern/juju/tree/nss-plugin-poc

that has:

  $ network-get --primary-hostname

that returns:

  juju-ip-A-B-C-D.

We are looking to make both of these available for 2.0.

Curtis Hovey (sinzui)
Changed in juju:
milestone: 2.1-rc2 → none
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 5 years, so we're marking it Expired. If you believe this is incorrect, please update the status.

Changed in juju:
status: Triaged → Expired
tags: added: expirebugs-bot
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.