deprecate use-fastpath-installer tag and use a property on node instead
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Blake Rouse |
Bug Description
Currently a tag is used to identify that a node should boot using fastpath installer. To support other booting methods, this makes it really difficult to understand what booting method will be used.
Below is a comment from Julian on why this needs to occur:
Using tags is very poor taste for settings like this, the original
implementation was extremely lazy in its approach IMO. And now you can
see the problem - what should happen if both tags are defined because
there was a problem adding one and removing the other?
What we should be doing is turning this all into a API calls
"set_boot_type_XXX" or similar, which handles the internals gracefully.
Because right now, we're exposing its implementation details (the tags)
directly to the user. That violates just about every law of software
layering ever thought of.
In summary:
- deprecate the tag, and add a new ENUM property on the node to select
boot_type (this could just encapsulate tags but ideally a DB column)
- add API functions to set the boot type, e.g.
- set_boot_type_fast
- set_boot_
- set_boot_
Cheers,
J
Related branches
- Raphaël Badin (community): Approve
-
Diff: 760 lines (+399/-177)6 files modifiedsrc/maasserver/enum.py (+14/-0)
src/maasserver/migrations/0091_add_boot_type_to_node.py (+338/-0)
src/maasserver/models/node.py (+15/-42)
src/maasserver/models/tests/test_node.py (+14/-66)
src/maasserver/node_action.py (+7/-29)
src/maasserver/tests/test_node_action.py (+11/-40)
- Gavin Panella (community): Approve
-
Diff: 370 lines (+33/-91)10 files modifiedsrc/maasserver/api.py (+0/-1)
src/maasserver/models/node.py (+0/-22)
src/maasserver/models/tests/test_node.py (+0/-27)
src/maasserver/preseed.py (+5/-2)
src/maasserver/tests/test_api_enlistment.py (+2/-1)
src/maasserver/tests/test_api_pxeconfig.py (+5/-4)
src/maasserver/tests/test_compose_preseed.py (+3/-2)
src/maasserver/tests/test_forms.py (+3/-2)
src/maasserver/tests/test_node_action.py (+1/-9)
src/maasserver/tests/test_preseed.py (+14/-21)
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
milestone: | none → 1.7.0 |
Changed in maas: | |
status: | Fix Committed → Fix Released |