Comment 11 for bug 1287224

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:
committer: Dustin Kirkland <email address hidden>
branch nick: maas
timestamp: Tue 2014-08-05 20:35:26 +0200
  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 ( 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.