Traceback in disk/detect when disk has "Unknown" in it's data

Bug #1522128 reported by Jeff Lane 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Fix Released
Medium
Sylvain Pineau

Bug Description

From a Power system under cert:

Name: /dev/sda
 Description: ATA Disk
 Vendor: Toshiba
 Product: TOSHIBA MG03ACA4
 Size: 4000GB
Name: /dev/sdb
 Description: ATA Disk
 Vendor: Toshiba
 Product: TOSHIBA MG03ACA4
 Size: 4000GB
Name: /dev/sdc
 Description: SCSI Disk
 Vendor: Unknown
 Product: Unknown
Traceback (most recent call last):
  File "/tmp/nest-pcbcrtb2.90740e0964b0bdb3458bc6f50f16558b9c8e5cb7dee2a7756bd5cac781ed1136/disk_info", line 72, in <module>
    sys.exit(main())
  File "/tmp/nest-pcbcrtb2.90740e0964b0bdb3458bc6f50f16558b9c8e5cb7dee2a7756bd5cac781ed1136/disk_info", line 64, in main
    int(disk.find('size').text) / (1000**3)))
AttributeError: 'NoneType' object has no attribute 'text'

I believe the root cause of this will end up being the "Unknown" device has a NoneType for it's size, thus the attribute error.

Related branches

Jeff Lane  (bladernr)
Changed in plainbox-provider-checkbox:
status: Confirmed → In Progress
Revision history for this message
Kristin Chuang (kristinchuang) wrote :

Same Traceback issue occurs on a 14.04.3 enabled machine while testing, though this system's /dev/sdc device doesn't seem to have any "unknown" in its data:

Name: /dev/sda
 Description: ATA Disk
 Vendor: Seagate
 Product: ST2000DM001-1ER1
 Size: 2000GB
Name: /dev/sdb
 Description: ATA Disk
 Vendor: Seagate
 Product: ST2000DM001-1ER1
 Size: 2000GB
Name: /dev/sdc
 Description: SCSI Disk
 Vendor: Generic-
 Product: USB3.0 CRW
Traceback (most recent call last):
  File "/tmp/nest-qijsnwl9.90740e0964b0bdb3458bc6f50f16558b9c8e5cb7dee2a7756bd5cac781ed1136/disk_info", line 72, in <module>
    sys.exit(main())
  File "/tmp/nest-qijsnwl9.90740e0964b0bdb3458bc6f50f16558b9c8e5cb7dee2a7756bd5cac781ed1136/disk_info", line 64, in main
    int(disk.find('size').text) / (1000**3)))
AttributeError: 'NoneType' object has no attribute 'text'

tags: added: ce-qa-concern
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

I rewrote disk_info as part of bug #1528426. There's no additional compution to get the size, we're taking the lsblk output.

Changed in plainbox-provider-checkbox:
assignee: Jeff Lane (bladernr) → Sylvain Pineau (sylvain-pineau)
status: In Progress → Fix Committed
milestone: none → 0.26
Pierre Equoy (pieq)
Changed in plainbox-provider-checkbox:
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.