[2.2, trunk] Discovery of machines in a Pod can have hostnames that colide

Bug #1680086 reported by Blake Rouse
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Blake Rouse

Bug Description

When discovering machines in a pod the hostname can now gets sent back and MAAS uses that hostname to create the machine in the database. Hostnames are unique in MAAS but they are not unique in a set of pods. Some things can be done here to handle this:

When a collision occurs we could do 2 possible things:

1. we could create a random hostname

or

2. we could append a number at the end

I prefer (1).

Tags: rsd

Related branches

Revision history for this message
Andres Rodriguez (andreserl) wrote :

why not attach the hostname + pod name as the hostname ? Also, I think RSD we should always avoid using hostnames provided that we have the likelihood of colliding.

Revision history for this message
Blake Rouse (blake-rouse) wrote :

Pod name is not required to be a valid hostname. So that doesn't work. If you use MAAS to compose you have a very unlikely chance of collision as MAAS sets a random hostname as the name of the composed node in the Pod. The chance of collision is also always the no matter if its RSD or Virsh or any other pod. Name collision is always likely.

Changed in maas:
assignee: nobody → Newell Jensen (newell-jensen)
Changed in maas:
milestone: 2.2.0rc2 → 2.2.0rc3
Changed in maas:
assignee: Newell Jensen (newell-jensen) → Blake Rouse (blake-rouse)
status: Triaged → In Progress
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
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.