Websocket raises an exception when a RAID device is on a partition

Bug #1849580 reported by Lee Trager
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Lee Trager

Bug Description

019-10-23 23:38:08 maasserver.websockets.protocol: [critical] Error on request (40) machine.set_active: 'Partition' object has no attribute 'actual_instance'
 Traceback (most recent call last):
   File "/usr/lib/python3.6/threading.py", line 864, in run
     self._target(*self._args, **self._kwargs)
   File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 850, in worker
     return target()
   File "/usr/lib/python3/dist-packages/twisted/_threads/_threadworker.py", line 46, in work
     task()
   File "/usr/lib/python3/dist-packages/twisted/_threads/_team.py", line 190, in doWork
     task()
 --- <exception caught here> ---
   File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 250, in inContext
     result = inContext.theWork()
   File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 266, in <lambda>
     inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
   File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 122, in callWithContext
     return self.currentContext().callWithContext(ctx, func, *args, **kw)
   File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 85, in callWithContext
     return func(*args,**kw)
   File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 885, in callInContext
     return func(*args, **kwargs)
   File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 217, in wrapper
     result = func(*args, **kwargs)
   File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 737, in call_within_transaction
     return func_outside_txn(*args, **kwargs)
   File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 540, in retrier
     return func(*args, **kwargs)
   File "/usr/lib/python3.6/contextlib.py", line 52, in inner
     return func(*args, **kwds)
   File "/usr/lib/python3/dist-packages/maasserver/websockets/base.py", line 405, in prep_user_execute
     method_name, method, params
   File "/usr/lib/python3/dist-packages/maasserver/websockets/base.py", line 428, in _call_method_track_queries
     result = method(params)
   File "/usr/lib/python3/dist-packages/maasserver/websockets/base.py", line 584, in set_active
     obj_data = self.get(params)
   File "/usr/lib/python3/dist-packages/maasserver/websockets/base.py", line 480, in get
     return self.full_dehydrate(obj)
   File "/usr/lib/python3/dist-packages/maasserver/websockets/base.py", line 221, in full_dehydrate
     return self.dehydrate(obj, data, for_list=for_list)
   File "/usr/lib/python3/dist-packages/maasserver/websockets/handlers/machine.py", line 254, in dehydrate
     data = super().dehydrate(obj, data, for_list=for_list)
   File "/usr/lib/python3/dist-packages/maasserver/websockets/handlers/node.py", line 316, in dehydrate
     key=itemgetter("name"),
   File "/usr/lib/python3/dist-packages/maasserver/websockets/handlers/node.py", line 305, in <genexpr>
     for volume_group in VolumeGroup.objects.filter_by_node(
   File "/usr/lib/python3/dist-packages/maasserver/websockets/handlers/node.py", line 556, in dehydrate_volume_group
     "numa_nodes": volume_group.get_numa_node_indexes(),
   File "/usr/lib/python3/dist-packages/maasserver/models/filesystemgroup.py", line 402, in get_numa_node_indexes
     for filesystem in self.filesystems.all()
   File "/usr/lib/python3/dist-packages/maasserver/models/filesystemgroup.py", line 402, in <genexpr>
     for filesystem in self.filesystems.all()
   File "/usr/lib/python3/dist-packages/maasserver/models/filesystem.py", line 186, in get_physical_block_devices
     device = grandparent.actual_instance
 builtins.AttributeError: 'Partition' object has no attribute 'actual_instance'

Related branches

Changed in maas:
milestone: 2.7.0b1 → 2.7.0b2
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.