MAAS random generated hostnames are not pronounceable

Bug #1287224 reported by Dustin Kirkland  on 2014-03-03
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Wishlist
Dustin Kirkland 

Bug Description

I understand that sabdfl specifically requested 5-character machine names in MAAS (rather than MAC or IP based names like AWS).

I'd like to make an additional request from a usability perspective... Can we please make the MAAS machine names pronounceable? It's really, really difficult to talk about machines in a cluster when the name is "kslnw" or "xpxrqm".

Here's a suggestion:

 $ sudo apt-get install wamerican
 $ shuf -n 1 /usr/share/dict/american-english | sed 's/[^a-zA-Z]//g'

That gives much more readable, though still random, machine names. That dictionary has 100K words in it. There's also wbritish, wcanadian. See the scowl source package or http://wordlist.sourceforge.net/ for more information.

Related branches

tags: added: micro-cluster
Gavin Panella (allenap) wrote :

$ sdw=(...) # The "Seven Dirty Words"
$ egrep -i "(${sdw[0]}|${sdw[1]}|...)" /usr/share/dict/american-english | wc -l
38

I assume we'd want to use a wordlist without profanity?

There are also only 72945 words without punctuation in that list, but MAAS has bigger ambitions! :)

To solve both these problems we could select, say, 500 words that are safe and memorable along with a numeric suffix.

Another option is to use subdomains for clusters. Clusters are only meant to contain a few hundred machines, so a 500-long word list would probably suffice if it were combined with a subdomain (selected from another word list?).

summary: - pronounceable machine names in MAAS
+ MAAS does not have pronounceable machine names
Changed in maas:
status: New → Triaged
importance: Undecided → Wishlist

http://www.elementalmatter.info/list-of-metals.htm lists 91 metals (or 86 without unun* ones)... maybe that's enough, given a numeric suffix and/or subdomain?

Julian Edwards (julian-edwards) wrote :

Please don't file project bugs on the ubuntu package!

Changed in maas (Ubuntu):
status: New → Invalid
summary: - MAAS does not have pronounceable machine names
+ MAAS random generated hostnames are not pronounceable
Dustin Kirkland  (kirkland) wrote :

@Gavin,

+1 on removing profanity.

This bug is not as much about creating "memorable" machine names.

It's just about creating machine names that one can pronounce.

It's really hard and ugly to say, "Hey Gavin, can you SSH into sdfknz?" Versus, "Hey Gavin, can you check port 80 on sidewalls?"

It's just as nasty to talk about ec2-204-236-254-96.compute-1.amazonaws.com or 06913234-d127-46bb-85eb-13d8fa8d0022.openstack.

We can do better in MAAS!

73K words should be plenty enough in my mind. However, we should safely handle overage. There are a few simply options here. After exhausting all of those words, just start combining them, like $word1-$word2. 73K*73K is about 5 billion. Or just go random or enumerate after that.

+1 on creating a curated list of words from some good wordlists. Something with a couple of thousand words would be fine. I'm happy to pull this together, as long as we generally agree with the goals and the goodness of it :-)

Dave Walker (davewalker) wrote :

Whilst this seems like a reasonably good idea for small deployments and demo, it doesn't really add value to the larger picture of hyperscale IMO. It steers towards treating the machines as pets, rather than cattle.

It's harder to kill a node named cutekitten, than sa47ghs. Try it. :) .. nodes should be easily expendable.

With the primary interface for deployed nodes being juju it distracts away from the juju model of "$ juju ssh 3", where juju should be abstracting away the hostname. This encourages direct access.

There doesn't necessarily need to be a 1:1 mapping between machine name to hostname. If there is value in having friendly names for a node, this could be via alias or CNAME - with a functional representation.. such as dbserver1.example.org. This can also be moved between nodes, if the workload migrates.

What would have my interest is physical placement node names.. such as CountryCampusOfficeRackShelf (ie uklnbluefin1a).. THEN things get interesting.. but solving that, means you've solved the MAAS<-->physical identification conundrum. :)

What happens when the initial pool is exhausted? Should decommissioned friendly hostnames be recycled? Excluding the 7 vulgar words already discussed, would you be willing to accept responsibility for insuring that other inappropriate words are not used? Note, that formal genitilia names, God+Jesus+Mohamed+Buddha etc (which I could see people finding offensive being attached to a hostname) and other inappropriate words such as 'nigger' are present in the system dictionary. Filtering 70K words seems pretty risky to me.

No cloud that I am aware of currently provisions dictionary words to cloud instances, and this isn't for lazy reasons IMO.

Julian Edwards (julian-edwards) wrote :

I am with Dave on this. We aim to have 100s of thousands of machines in MAAS's realm at some point; pronounceable names have never been brought up before and I can't see what advantage it brings to cloud-like resources.

If someone is *desperate* for a pronounceable name in MAAS, there is nothing stopping them from editing the node in maas which produces a new CNAME.

My thoughts on offensiveness are that it's such a minefield it's better to stay far far away. People are too thin skinned and moan about the slightest thing.

Changed in maas:
status: Triaged → Opinion
Julian Edwards (julian-edwards) wrote :

Also, FWIW, I've worked in banks in London where all the machine names are most definitely not pronounceable!

Dustin Kirkland  (kirkland) wrote :

While I can grant most of your points, Dave and Julian, for some deployments of MAAS (or even other clouds), there are plenty of cases where random machine names are not very user friendly.

As a compromise, what if this were a configurable option, in the MAAS configuration? Something like:

HOST NAMING SCHEME
 (x) Random, e.g. Xzkmd
 ( ) Enumerated, e.g. node42
 ( ) Random dictionary word, e.g. barley

Where the default is the current status quo (5 random chars). But there's also support for some friendlier options too.

For the dictionary, to Dave's point, I propose that we create a curated list of ~1024 or so adjectives+nouns that are least likely to offend.

On Friday 07 Mar 2014 21:35:05 you wrote:
> While I can grant most of your points, Dave and Julian, for some
> deployments of MAAS (or even other clouds), there are plenty of cases
> where random machine names are not very user friendly.
>
> As a compromise, what if this were a configurable option, in the MAAS
> configuration? Something like:
>
> HOST NAMING SCHEME
> (x) Random, e.g. Xzkmd
> ( ) Enumerated, e.g. node42
> ( ) Random dictionary word, e.g. barley

I could get behind this, yes. The next thing you're going to see is people
asking to upload their own dictionaries, mark my words :)

> Where the default is the current status quo (5 random chars). But
> there's also support for some friendlier options too.
>
> For the dictionary, to Dave's point, I propose that we create a curated
> list of ~1024 or so adjectives+nouns that are least likely to offend.

Everything offends someone, somewhere. I personally would not bother going
down that route, it's easy to edit hostnames if someone dislikes one.

Dustin Kirkland  (kirkland) wrote :

Whaddayaknow... A list of adjectives and nouns :-)

https://wiki.ubuntu.com/DevelopmentCodeNames#Code_Name_Suggestions

I can cull through those a bit and whittle those down a bit.

Dustin Kirkland  (kirkland) wrote :

We had a discussion with sabdfl at the cloud sprint this week, and in fact, he is 100% behind this change.

See this branch: lp:~kirkland/maas/1287224

revno: 2652
fixes bug: https://launchpad.net/bugs/1287224
committer: Dustin Kirkland <email address hidden>
branch nick: maas
timestamp: Tue 2014-08-05 20:35:26 +0200
message:
  Enable MAAS to produce friendly, pronounceable hostnames, LP: #1287224

  Ship two culled word lists -- 1,315 adjectives, and 977 nouns. This gives
  us a possible 1,284,755 combinations of adjective-noun, which is more than
  enough to cover any Class B, /12 network (255.240.0.0) and its 1,048,576
  unique IP addresses.

  You might notice that this model is quite similar to Ubuntu's friendly
  release naming scheme, such as "Warty Warthog".

  These word lists are shipped and installed in /etc/maas/adjectives.txt
  and /etc/maas/nouns.txt, such that they are easily customized, edited,
  or overwritten by any MAAS administrator.

  The modified code updates the generate_hostname() hostname function
  to try and generate an 'adjective-noun' hostname, but if any exception
  occurs (such as a wordlist read exception), it will fall back to the
  legacy 5-random-non-ambiguous-character hostname.

  A test is included to ensure that all randomly generated hostnames
  fit the model of "word hyphen word". However, note that it's probably
  not able to open and read the word lists, since they're installed on disk.

Changed in maas:
status: Opinion → In Progress
assignee: nobody → Dustin Kirkland  (kirkland)
Dustin Kirkland  (kirkland) wrote :

You can find a representative sample at http://paste.ubuntu.com/7963780/

stunning-cabbage gets my vote as a host name any day. Next, awesome-tomato, fantastic-potato and magnificent-peach.

Adolfo Jayme (fitojb) on 2014-08-07
no longer affects: maas (Ubuntu)
Dustin Kirkland  (kirkland) wrote :

So sabdfl had two pieces of additional feedback on the friendly-name scheme.

1) the user-configurable wordlists [/etc/maas/adjectives.txt, /etc/maas/nouns.txt] need to be loaded into the database, per our config-in-the-db directive; (admin can manually run a script or press a button to reload those, if they modify them)

2) sabdfl wants a new table of deleted hostname/mac mappings; when a node is deleted, its hostname and mac go into the deleted list; when a node gets added, we first check that deleted-nodes table for a matching mac, and pop its hostname out of that table and use it; the goal is having "stable" hostnames, for machines that we've seen before (like garage maas, orange boxes, etc.)

Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
milestone: none → 1.7.0
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers