Cannot change power settings for machine
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Blake Rouse |
Bug Description
In the UI I tried to change a node from virsh to manual power control.
Apparently this worked, but later I noticed that it had not. Checking
the logs shows what happened:
Error on request (89) machine.update: {"mac_addresses": ["This field is required."], "architecture": ["'i386/generic' is not a valid ar
chitecture. It should be one of: 'amd64/generic'."]}
Traceback (most recent call last):
File "/usr/lib/
self.
File ".../src/
return target()
File "/usr/lib/
task()
File "/usr/lib/
task()
--- <exception caught here> ---
File "/usr/lib/
result = inContext.theWork()
File "/usr/lib/
inContext.
File "/usr/lib/
return self.currentCon
File "/usr/lib/
return func(*args,**kw)
File ".../src/
return func_outside_
File ".../src/
return func(*args, **kwargs)
File "/usr/lib/
return func(*args, **kwds)
File ".../src/
data = super(NodeHandler, self).update(
File ".../src/
raise HandlerValidati
maasserver.
There are two bugs here:
- The UI was misleading; the error was not shown to me. This is a known
problem (bug 1556963) that affects all of the UI.
- Editing power parameters in the UI is a separate interaction to
editing MACs or setting the architecture, so it's incorrect to
validate those fields when editing power parameters.
Related branches
- Andres Rodriguez (community): Needs Fixing
- Mike Pontillo (community): Approve
-
Diff: 710 lines (+240/-181)6 files modifiedsrc/maasserver/static/js/angular/controllers/node_details.js (+54/-81)
src/maasserver/static/js/angular/controllers/tests/test_node_details.js (+129/-42)
src/maasserver/static/js/angular/factories/general.js (+1/-2)
src/maasserver/static/js/angular/factories/tests/test_general.js (+3/-2)
src/maasserver/static/partials/node-details.html (+50/-51)
src/maasserver/static/partials/node-events.html (+3/-3)
Changed in maas: | |
status: | Triaged → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
I fixed the real issue of this bug which is that you should not be able to modify the power parameters of the machine unless one rack controller is connected to that region controller.
The other issues that you pointed out can be solved at a later date as the UI error reporting is an issue all across the UI and we really need to improve on that. Split out the form I don't think adds much in this case as you still need a connected rack controller to validate the power parameters.