Controller node details page says: argument of type 'NoneType' is not iterable

Bug #1557589 reported by LaMont Jones
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Newell Jensen

Bug Description

/var/log/maas/regiond.log says:
2016-03-15 09:17:08 [-] Error on request (24) controller.set_active: argument of type 'NoneType' is not iterable
        Traceback (most recent call last):
          File "/usr/lib/python3.5/threading.py", line 862, in run
            self._target(*self._args, **self._kwargs)
          File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 794, 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 246, in inContext
            result = inContext.theWork()
          File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 262, in <lambda>
            inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
          File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 118, in callWithContext
            return self.currentContext().callWithContext(ctx, func, *args, **kw)
          File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 81, in callWithContext
            return func(*args,**kw)
          File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 448, in call_within_transaction
            return func_outside_txn(*args, **kwargs)
          File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 275, in retrier
            return func(*args, **kwargs)
          File "/usr/lib/python3.5/contextlib.py", line 30, in inner
            return func(*args, **kwds)
          File "/usr/lib/python3/dist-packages/maasserver/websockets/base.py", line 408, in set_active
            obj_data = self.get(params)
          File "/usr/lib/python3/dist-packages/maasserver/websockets/base.py", line 338, in get
            return self.full_dehydrate(obj)
          File "/usr/lib/python3/dist-packages/maasserver/websockets/base.py", line 194, in full_dehydrate
            return self.dehydrate(obj, data, for_list=for_list)
          File "/usr/lib/python3/dist-packages/maasserver/websockets/handlers/controller.py", line 79, in dehydrate
            data = super().dehydrate(obj, data, for_list=for_list)
          File "/usr/lib/python3/dist-packages/maasserver/websockets/handlers/machine.py", line 167, in dehydrate
            obj, data, for_list=for_list)
          File "/usr/lib/python3/dist-packages/maasserver/websockets/handlers/node.py", line 170, in dehydrate
            data["storage_layout_issues"] = obj.storage_layout_issues()
          File "/usr/lib/python3/dist-packages/maasserver/models/node.py", line 1029, in storage_layout_issues
            if (not boot_mounted and "arm64" in self.architecture and
        builtins.TypeError: argument of type 'NoneType' is not iterable

And storage for the rack/region controller in question is:
-kohlrabi(root) 304 : df
Filesystem 1K-blocks Used Available Use% Mounted on
udev 10257724 0 10257724 0% /dev
tmpfs 2055244 9324 2045920 1% /run
/dev/mapper/KOHLRABI-root 206293688 45544892 150246652 24% /
tmpfs 10276204 4 10276200 1% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 10276204 0 10276204 0% /sys/fs/cgroup
/dev/mapper/KOHLRABI-srv 1548053708 1036454940 437930904 71% /srv
/dev/md0 944568 277576 601792 32% /boot
cgmfs 100 0 100 0% /run/cgmanager/fs
tmpfs 100 0 100 0% /run/lxcfs/controllers
tmpfs 2055244 0 2055244 0% /run/user/2501
-kohlrabi(root) 305 : lvdisplay -C
  LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
  root KOHLRABI -wi-ao---- 200.00g
  root-trusty KOHLRABI -wi-a----- 100.00g
  srv KOHLRABI -wi-ao---- 1.46t
  swap KOHLRABI -wi-ao---- 100.00g
-kohlrabi(root) 306 : pvdisplay -C
  PV VG Fmt Attr PSize PFree
  /dev/md2 KOHLRABI lvm2 a-- 2.73t 893.37g
-kohlrabi(root) 307 : vgdisplay -C
  VG #PV #LV #SN Attr VSize VFree
  KOHLRABI 1 4 0 wz--n- 2.73t 893.37g
-kohlrabi(root) 308 : cat /proc/mdstat /proc/partitions
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md2 : active raid1 sdb3[1] sda3[2]
      2929060672 blocks super 1.2 [2/2] [UU]

md0 : active raid1 sda2[2] sdb2[3]
      976320 blocks super 1.2 [2/2] [UU]

unused devices: <none>
major minor #blocks name

   1 0 65536 ram0
   1 1 65536 ram1
   1 2 65536 ram2
   1 3 65536 ram3
   1 4 65536 ram4
   1 5 65536 ram5
   1 6 65536 ram6
   1 7 65536 ram7
   1 8 65536 ram8
   1 9 65536 ram9
   1 10 65536 ram10
   1 11 65536 ram11
   1 12 65536 ram12
   1 13 65536 ram13
   1 14 65536 ram14
   1 15 65536 ram15
   8 0 3907018584 sda
   8 1 96256 sda1
   8 2 976896 sda2
   8 3 2929191936 sda3
   8 4 976751616 sda4
   8 16 2930266584 sdb
   8 17 96256 sdb1
   8 18 976896 sdb2
   8 19 2929191936 sdb3
   9 0 976320 md0
   9 2 2929060672 md2
   8 32 1953481728 sdc
   8 33 1953480704 sdc1
 252 0 209715200 dm-0
 252 1 1572864000 dm-1
 252 2 104857600 dm-2
 252 3 104857600 dm-3

Related branches

Revision history for this message
LaMont Jones (lamont) wrote :

This is with revno 4779 of trunk

Changed in maas:
importance: Undecided → Critical
milestone: none → 2.0.0
Revision history for this message
LaMont Jones (lamont) wrote :

Root cause: node.architecture was set to None.

Revision history for this message
Blake Rouse (blake-rouse) wrote :

I didn't get to finish reviewing Newell's branch but that should be doing the following:

arch, subarch = node.split_arch()
if arch == "arm64"

Changed in maas:
assignee: nobody → Newell Jensen (newell-jensen)
status: New → Triaged
Revision history for this message
Blake Rouse (blake-rouse) wrote :

Also checking that the architecture is not None as well, as that is possible for a rack controller as it has not been updated yet.

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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