NodeStateViolation when commissioning

Bug #1365722 reported by Gavin Panella
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Julian Edwards

Bug Description

I started commissioning of a node, but it wasn't able to power on because amttool was not available, so I assume it tried to mark the node as broken/failed. I observed the following in maas-django.log

Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 783, in __bootstrap
    self.__bootstrap_inner()
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/python/threadpool.py", line 191, in _worker
    result = context.call(ctx, function, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext
    return func(*args,**kw)
  File "/usr/lib/python2.7/dist-packages/provisioningserver/utils/twisted.py", line 143, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/maasserver/utils/async.py", line 152, in call_within_transaction
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/maasserver/rpc/nodes.py", line 44, in mark_node_failed
    node.mark_failed(error_description)
  File "/usr/lib/python2.7/dist-packages/maasserver/models/node.py", line 1309, in mark_failed
    self.status)
maasserver.exceptions.NodeStateViolation: The status of the node is 2; this status cannot be transitioned to a corresponding failed status.

Tags: robustness

Related branches

Changed in maas:
milestone: none → 1.7.0
Revision history for this message
Raphaël Badin (rvb) wrote :

Looks like 2 things were trying to mark the node as "failed". The first one succeeded and the node was transitioned to 'FAILED_COMMISSIONING'. The second thing came along but the node couldn't be as "failed" because it was already marked "failed". Now, the stacktrace is not detailed enough to tell us precisely what this second thing was. AFAIK the only thing that can mark a node failed right now is the power code (when it fails to power up the node).

Revision history for this message
Julian Edwards (julian-edwards) wrote :

This is possibly the same as bug 1368398.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

Oh actually it can't be, looking at the code.

Changed in maas:
assignee: nobody → Julian Edwards (julian-edwards)
status: Triaged → In Progress
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.