Inconsistent behavior in the checks to delete a node
Bug #1389602 reported by
Raphaël Badin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Raphaël Badin |
Bug Description
One cannot remove an 'Allocated' node but MAAS allows a 'Deploying' or a 'Deployed' node to be deleted. This is inconsistent.
Related branches
lp:~rvb/maas/prevent-deletion
Rejected
for merging
into
lp:~maas-committers/maas/trunk
- Jason Hobbs (community): Disapprove
- Graham Binns (community): Approve
-
Diff: 142 lines (+26/-16)7 files modifiedsrc/maasserver/api/tests/test_node.py (+6/-6)
src/maasserver/models/node.py (+3/-3)
src/maasserver/models/tests/test_node.py (+2/-2)
src/maasserver/node_action.py (+5/-2)
src/maasserver/support/pertenant/tests/test_migration.py (+2/-0)
src/maasserver/support/pertenant/tests/test_utils.py (+2/-0)
src/maasserver/tests/test_node_action.py (+6/-3)
lp:~rvb/maas/allow-deletion
- Jason Hobbs (community): Approve
-
Diff: 176 lines (+8/-60)8 files modifiedsrc/maasserver/api/tests/test_node.py (+0/-14)
src/maasserver/models/node.py (+0/-6)
src/maasserver/models/tests/test_node.py (+4/-2)
src/maasserver/node_action.py (+0/-5)
src/maasserver/tests/test_forms_bulknodeaction.py (+1/-1)
src/maasserver/tests/test_node_action.py (+0/-13)
src/maasserver/views/nodes.py (+0/-3)
src/maasserver/views/tests/test_nodes.py (+3/-16)
summary: |
- Nothing prevents a 'Deployed' from being deleted. + Nothing prevents a 'Deployed' node from being deleted. |
Changed in maas: | |
assignee: | nobody → Raphaël Badin (rvb) |
status: | Triaged → In Progress |
Changed in maas: | |
milestone: | none → 1.7.1 |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I disagree with the premise that it doesn't make sense to allow an Admin to delete a node that is owned by a user. The problem with releasing first is that releasing the node powers the node off, and that breaks at least one existing customer's use case. I think it's always a useful option to delete a node at any time without having any affect on the node itself, and the issue here is just one of needing to make the admin aware that the node is allocated to a user.
I think the better fix here would be to remove the restriction on deleting the node the Allocated state, and make the warning clearer about what's going on.