MAAS random generated hostnames are not pronounceable
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/
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://
Related branches
- Julian Edwards (community): Approve on 2014-08-15
-
Diff: 1331 lines (+1152/-62)8 files modifiedsrc/maasserver/migrations/0102_candidate_name.py (+382/-0)
src/maasserver/migrations/0103_candidate_names.py (+630/-0)
src/maasserver/models/__init__.py (+6/-5)
src/maasserver/models/candidatename.py (+87/-0)
src/maasserver/models/node.py (+7/-26)
src/maasserver/models/tests/test_candidatename.py (+32/-0)
src/maasserver/models/tests/test_node.py (+7/-30)
src/maasserver/tests/test_api_enlistment.py (+1/-1)
tags: | added: micro-cluster |
Gavin Panella (allenap) wrote : | #1 |
summary: |
- pronounceable machine names in MAAS + MAAS does not have pronounceable machine names |
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → Wishlist |
http://
Julian Edwards (julian-edwards) wrote : | #3 |
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 : | #4 |
@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-
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 : | #5 |
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.
What would have my interest is physical placement node names.. such as CountryCampusOf
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+
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 : | #6 |
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 : | #7 |
Also, FWIW, I've worked in banks in London where all the machine names are most definitely not pronounceable!
Dustin Kirkland (kirkland) wrote : | #8 |
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.
Julian Edwards (julian-edwards) wrote : Re: [Bug 1287224] Re: MAAS random generated hostnames are not pronounceable | #9 |
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 : | #10 |
Whaddayaknow... A list of adjectives and nouns :-)
https:/
I can cull through those a bit and whittle those down a bit.
Dustin Kirkland (kirkland) wrote : | #11 |
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:/
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/
and /etc/maas/
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-
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 : | #12 |
You can find a representative sample at http://
Julian Edwards (julian-edwards) wrote : | #13 |
stunning-cabbage gets my vote as a host name any day. Next, awesome-tomato, fantastic-potato and magnificent-peach.
no longer affects: | maas (Ubuntu) |
Dustin Kirkland (kirkland) wrote : | #14 |
So sabdfl had two pieces of additional feedback on the friendly-name scheme.
1) the user-configurable wordlists [/etc/maas/
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 |
$ sdw=(...) # The "Seven Dirty Words" 0]}|${sdw[ 1]}|... )" /usr/share/ dict/american- english | wc -l
$ egrep -i "(${sdw[
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?).