Cannot change power settings for machine

Bug #1566920 reported by Gavin Panella on 2016-04-06
This bug affects 1 person
Affects Status Importance Assigned to Milestone
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/python3.5/", line 862, in run
    self._target(*self._args, **self._kwargs)
  File ".../src/provisioningserver/utils/", line 842, in worker
    return target()
  File "/usr/lib/python3/dist-packages/twisted/_threads/", line 46, in work
  File "/usr/lib/python3/dist-packages/twisted/_threads/", line 190, in doWork
--- <exception caught here> ---
  File "/usr/lib/python3/dist-packages/twisted/python/", line 246, in inContext
    result = inContext.theWork()
  File "/usr/lib/python3/dist-packages/twisted/python/", line 262, in <lambda>
    inContext.theWork = lambda:, func, *args, **kw)
  File "/usr/lib/python3/dist-packages/twisted/python/", line 118, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/lib/python3/dist-packages/twisted/python/", line 81, in callWithContext
    return func(*args,**kw)
  File ".../src/maasserver/utils/", line 516, in call_within_transaction
    return func_outside_txn(*args, **kwargs)
  File ".../src/maasserver/utils/", line 343, in retrier
    return func(*args, **kwargs)
  File "/usr/lib/python3.5/", line 30, in inner
    return func(*args, **kwds)
  File ".../src/maasserver/websockets/handlers/", line 262, in update
    data = super(NodeHandler, self).update(params)
  File ".../src/maasserver/websockets/", line 399, in update
    raise HandlerValidationError(form.errors)
maasserver.websockets.base.HandlerValidationError: {'mac_addresses': ['This field is required.'], 'architecture': ["'i386/generic' is not a valid architecture. It should be one of: 'amd64/generic'."]}

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.

Tags: ui Edit Tag help

Related branches

Blake Rouse (blake-rouse) wrote :

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.

Changed in maas:
milestone: none → 2.0.0
assignee: nobody → Blake Rouse (blake-rouse)
Changed in maas:
status: Triaged → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers