Bug 1626057

Summary: TypeError: 'NoneType' object is not subscriptable
Product: [Fedora] Fedora Reporter: Menanteau Guy <menantea>
Component: python-blivetAssignee: Blivet Maintenance Team <blivet-maint-list>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 29CC: anaconda-maint-list, blivet-maint-list, bugproxy, dan, germyrinn, hannsj_uhl, jkonecny, jonathan, kellin, mkolman, muriloo, normand, rvykydal, sbueno, vanmeeuwen+fedora, vponcova, vtrefny, wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: abrt_hash:0d8e48b8f369069bbd675d79c148d53b60105a2a29b177eb37e79862c405ceb4;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-27 18:12:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1071880, 1666242    
Attachments:
Description Flags
File: anaconda-tb
none
File: anaconda.log
none
File: dbus.log
none
File: dnf.librepo.log
none
File: environ
none
File: hawkey.log
none
File: lorax-packages.log
none
File: lsblk_output
none
File: nmcli_dev_list
none
File: os_info
none
File: program.log
none
File: storage.log
none
File: syslog
none
File: ifcfg.log
none
File: packaging.log none

Description Menanteau Guy 2018-09-06 13:22:54 UTC
Description of problem:
I am trying to test multipath on VM for f29 iso Fedora-Server-dvd-ppc64le-28-20180903.n.0.iso in ppc64le but 
anaconda crashes.
python3-blivet-3.1.0-1 should have corrected bug https://bugzilla.redhat.com/show_bug.cgi?id=1565693 

anaconda crashed with this error.
13:53:59,329 DBG exception: running handleException                            
13:53:59,330 CRT exception: Traceback (most recent call last):                 

  File "/usr/lib64/python3.7/site-packages/pyanaconda/ui/gui/hubs/__init__.py",
line 424, in _on_spoke_clicked
    spoke.refresh()

  File "/usr/lib64/python3.7/site-packages/pyanaconda/ui/gui/spokes/storage.py", line 698, in refresh
    self._add_disk_overview(obj, self.specialized_disks_box)                   

  File "/usr/lib64/python3.7/site-packages/pyanaconda/ui/gui/spokes/storage.py", line 758, in _add_disk_overview
    description = desc[0:6] + "..." + desc[-8:]                                

TypeError: 'NoneType' object is not subscriptable                 

qemu command used:
/usr/bin/qemu-system-ppc64 -name vm54 -enable-kvm -M pseries -smp 4 -m 8G -nographic -nodefaults -monitor stdio -serial pty -device
virtio-net-pci,netdev=net10094,mac=c0:ff:ee:00:00:54 -netdev bridge,br=br0,id=net10094 -cdrom isolef29 -device virtio-scsi-pci,id=scsi -drive if=none,id=hda,file=hd1.qcow2 -device scsi-hd,drive=hda,serial=0002 -drive if=none,id=hdb,file=hd2.qcow2 -device scsi-hd,drive=hdb,serial=0002 -boot d -S


Version-Release number of selected component:
anaconda-29.24.1

The following was filed automatically by anaconda:
anaconda 29.24.1 exception report
Traceback (most recent call first):
  File "/usr/lib64/python3.7/site-packages/pyanaconda/ui/gui/spokes/storage.py", line 758, in _add_disk_overview
    description = desc[0:6] + "..." + desc[-8:]
  File "/usr/lib64/python3.7/site-packages/pyanaconda/ui/gui/spokes/storage.py", line 698, in refresh
    self._add_disk_overview(obj, self.specialized_disks_box)
  File "/usr/lib64/python3.7/site-packages/pyanaconda/ui/gui/hubs/__init__.py", line 424, in _on_spoke_clicked
    spoke.refresh()
TypeError: 'NoneType' object is not subscriptable

Additional info:
addons:         com_redhat_docker, com_redhat_kdump
blivet-gui-utils.log: 
cmdline:        /usr/bin/python3  /sbin/anaconda
cmdline_file:   BOOT_IMAGE=/ppc/ppc64/vmlinuz ro
executable:     /sbin/anaconda
hashmarkername: anaconda
kernel:         4.18.5-300.fc29.ppc64le
product:        Fedora
release:        Cannot get release name.
release_type:   pre-release
type:           anaconda
version:        29

Comment 1 Menanteau Guy 2018-09-06 13:23:01 UTC
Created attachment 1481306 [details]
File: anaconda-tb

Comment 2 Menanteau Guy 2018-09-06 13:23:03 UTC
Created attachment 1481307 [details]
File: anaconda.log

Comment 3 Menanteau Guy 2018-09-06 13:23:04 UTC
Created attachment 1481308 [details]
File: dbus.log

Comment 4 Menanteau Guy 2018-09-06 13:23:06 UTC
Created attachment 1481309 [details]
File: dnf.librepo.log

Comment 5 Menanteau Guy 2018-09-06 13:23:08 UTC
Created attachment 1481310 [details]
File: environ

Comment 6 Menanteau Guy 2018-09-06 13:23:09 UTC
Created attachment 1481311 [details]
File: hawkey.log

Comment 7 Menanteau Guy 2018-09-06 13:23:11 UTC
Created attachment 1481312 [details]
File: lorax-packages.log

Comment 8 Menanteau Guy 2018-09-06 13:23:13 UTC
Created attachment 1481313 [details]
File: lsblk_output

Comment 9 Menanteau Guy 2018-09-06 13:23:15 UTC
Created attachment 1481314 [details]
File: nmcli_dev_list

Comment 10 Menanteau Guy 2018-09-06 13:23:17 UTC
Created attachment 1481315 [details]
File: os_info

Comment 11 Menanteau Guy 2018-09-06 13:23:18 UTC
Created attachment 1481316 [details]
File: program.log

Comment 12 Menanteau Guy 2018-09-06 13:23:20 UTC
Created attachment 1481317 [details]
File: storage.log

Comment 13 Menanteau Guy 2018-09-06 13:23:25 UTC
Created attachment 1481318 [details]
File: syslog

Comment 14 Menanteau Guy 2018-09-06 13:23:26 UTC
Created attachment 1481319 [details]
File: ifcfg.log

Comment 15 Menanteau Guy 2018-09-06 13:23:27 UTC
Created attachment 1481320 [details]
File: packaging.log

Comment 16 Vendula Poncova 2018-09-07 07:59:51 UTC
From pyanaconda/ui/gui/spokes/storage.py:

if isinstance(disk, MultipathDevice):
  desc = disk.wwn
  description = desc[0:6] + "..." + desc[-8:]

Anaconda fails, because the wwn attribute is set to None. I am not sure if it is a valid value in this case. Let's see what blivet thinks about it. Reassigning.

Comment 17 Dan HorĂ¡k 2018-09-27 14:18:19 UTC
Guy, could it be reproduced with similar setup on x86? I guess it should.

Comment 18 Menanteau Guy 2018-09-28 12:25:05 UTC
same problem on x86-64 using this xml part to simulate the multipath with libvirt

    <disk type='file' device='disk'> 
      <driver name='qemu' type='qcow2' cache='none'/> 
      <source file='/home/menantea/images/vm60-fedora-Server-x86_64-29.qcow2'/> 
      <backingStore/> 
      <target dev='vda' bus='scsi'/> 
      <serial>0002</serial> 
      <address type='drive' controller='0' bus='0' target='0' unit='0'/> 
    </disk> 
    <disk type='file' device='disk'> 
      <driver name='qemu' type='qcow2' cache='none'/> 
      <source file='/home/menantea/images/vm60-fedora-Server-x86_64-29.qcow2'/> 
      <backingStore/> 
      <target dev='vdb' bus='scsi'/> 
      <serial>0002</serial> 
      <address type='drive' controller='0' bus='0' target='0' unit='1'/> 
    </disk>

Comment 19 Ben Cotton 2019-10-31 20:10:17 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 20 germyrinn 2019-11-07 04:32:35 UTC
In general, the error means that you attempted to index an object that doesn't have that functionality. You are trying to subscript an object which you think is a list or dict, but actually is None. NoneType is the type of the None object which represents a lack of value, for example, a function that does not explicitly return a value will return None. 'NoneType' object is not subscriptable is the one thrown by python when you use the square bracket notation object[key] where an object doesn't define the __getitem__ method . e.g.: http://net-informations.com/python/err/nonetype.htm

Comment 21 Ben Cotton 2019-11-27 18:12:59 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.