[2.2, trunk] Discovery of machines in a Pod can have hostnames that colide
Bug #1680086 reported by
Blake Rouse
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).
Related branches
lp:~blake-rouse/maas/fix-1680086
- Newell Jensen (community): Approve
-
Diff: 48 lines (+21/-1)2 files modifiedsrc/maasserver/models/bmc.py (+5/-1)
src/maasserver/models/tests/test_bmc.py (+16/-0)
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.
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.