MAAS should allow recognizing enlisting nodes by BMC credentials rather than just MAC
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Low
|
Newell Jensen |
Bug Description
MAAS should change the requirement for a new machine to have a MAC address, and instead require it to either have a MAC address or a unique set of IPMI credentials.
If a unique set of IPMI credentials is given and no MAC address, MAAS can power on the node, start the enlistment scripts on it as if it were a brand new unknown node, discover the enlisting node's BMC credentials, and recognize that a machine in MAAS already has those credentials, and update that machine with the MAC address(es) of the machine. At that point it would be ready to start commissioning.
This relieves the burden of having to find the MAC address for machines when adding them, which isn't always trivial. It allows machines to be added through the API with useful information like hostname and zone, rather than having to manually go and find machines that were simply powered on and allowed to PXE and enlist, and then set hostname and zone etc.
Related branches
- Andres Rodriguez (community): Approve
- MAAS Lander: Approve
-
Diff: 615 lines (+194/-115)12 files modifiedsrc/maasserver/api/machines.py (+53/-27)
src/maasserver/api/tests/test_enlistment.py (+52/-4)
src/maasserver/api/tests/test_machines.py (+27/-0)
src/maasserver/forms/__init__.py (+25/-7)
src/maasserver/forms/tests/test_machine.py (+1/-1)
src/maasserver/forms/tests/test_machinewithmacaddresses.py (+19/-1)
src/maasserver/models/node.py (+1/-13)
src/maasserver/models/tests/test_node.py (+0/-23)
src/maasserver/static/js/angular/controllers/add_hardware.js (+10/-2)
src/maasserver/static/js/angular/controllers/tests/test_add_hardware.js (+5/-5)
src/maasserver/static/partials/nodes-list.html (+1/-1)
src/maasserver/websockets/handlers/tests/test_machine.py (+0/-31)
- MAAS Lander: Approve
- Lee Trager (community): Needs Fixing
-
Diff: 490 lines (+100/-135)11 files modifiedsrc/maasserver/api/machines.py (+6/-0)
src/maasserver/api/tests/test_machines.py (+27/-0)
src/maasserver/forms/__init__.py (+28/-13)
src/maasserver/forms/tests/test_machine.py (+1/-1)
src/maasserver/forms/tests/test_machinewithmacaddresses.py (+19/-1)
src/maasserver/models/node.py (+1/-13)
src/maasserver/models/tests/test_node.py (+0/-23)
src/maasserver/static/js/angular/controllers/add_hardware.js (+11/-28)
src/maasserver/static/js/angular/controllers/tests/test_add_hardware.js (+6/-24)
src/maasserver/static/partials/nodes-list.html (+1/-1)
src/maasserver/websockets/handlers/tests/test_machine.py (+0/-31)
- Lee Trager (community): Approve
- MAAS Lander: Approve
-
Diff: 311 lines (+172/-7)7 files modifiedsrc/maasserver/api/machines.py (+22/-2)
src/maasserver/api/tests/test_enlistment.py (+55/-0)
src/maasserver/migrations/builtin/maasserver/0163_create_new_power_parameters_with_jsonfield.py (+26/-0)
src/maasserver/migrations/builtin/maasserver/0164_copy_over_existing_power_parameters.py (+28/-0)
src/maasserver/migrations/builtin/maasserver/0165_remove_and_rename_power_parameters.py (+34/-0)
src/maasserver/models/bmc.py (+5/-3)
src/maasserver/models/node.py (+2/-2)
tags: | added: foundation-engine |
Changed in maas: | |
status: | New → Won't Fix |
Changed in maas: | |
status: | Won't Fix → Triaged |
tags: |
added: foundations-engine removed: foundation-engine |
tags: | added: internal |
Changed in maas: | |
milestone: | none → 2.5.x |
Changed in maas: | |
milestone: | 2.5.x → 2.5.0 |
Changed in maas: | |
status: | Triaged → In Progress |
assignee: | nobody → Newell Jensen (newell-jensen) |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
milestone: | 2.5.0 → 2.5.0alpha1 |
Changed in maas: | |
status: | Fix Committed → Fix Released |
One way to implement this might be to allow one to register a BMC device, and then trigger that BMC to do a fresh boot, which would trigger auto-enlistment and hopefully associate the existing BMC device to it.
Another way to do it, which would be even cheaper, would be to just have an API which took BMC credentials and triggered a power event without even touching the database.
Right now we are having to do remote boots of the machine via IPMI manually which poorly duplicates functionality in MAAS (for instance, it only supports IPMI).