Traceback in disk/detect when disk has "Unknown" in it's data
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-
sys.
File "/tmp/nest-
int(
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
- Po-Hsu Lin: Approve
-
Diff: 14 lines (+3/-1)1 file modifiedproviders/plainbox-provider-checkbox/bin/disk_info (+3/-1)
Changed in plainbox-provider-checkbox: | |
status: | Confirmed → In Progress |
Changed in plainbox-provider-checkbox: | |
status: | Fix Committed → Fix Released |
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 qijsnwl9. 90740e0964b0bdb 3458bc6f50f1655 8b9c8e5cb7dee2a 7756bd5cac781ed 1136/disk_ info", line 72, in <module> exit(main( )) qijsnwl9. 90740e0964b0bdb 3458bc6f50f1655 8b9c8e5cb7dee2a 7756bd5cac781ed 1136/disk_ info", line 64, in main disk.find( 'size') .text) / (1000**3)))
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-
sys.
File "/tmp/nest-
int(
AttributeError: 'NoneType' object has no attribute 'text'