hdparm job fails with KeyError: 'description'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox |
Fix Released
|
Medium
|
Daniel Manrique |
Bug Description
Checkbox 0.12.4 on Ubuntu Oneiric with the image from 20110823.
If the info/hdparm job, defined in jobs/info.txt is added to a whitelist, it fails with the following trace:
2011-08-23 16:46:27,760 DEBUG Calling ./plugins/
tiated', 'command': 'cat <<\'EOF\' | run_templates -t -s \'udev_resource | filter_templates -w "category=
ock`.txt\nrequires: device.path == "$path"\nuser: root\ncommand: hdparm -I /dev/`ls /sys$path/
', 'type': 'suite', 'requires': ["package.name == 'hdparm'", "device.category == 'DISK'"]}) for prompt-job with priority -100.
2011-08-23 16:46:27,760 DEBUG Calling ./plugins/
: 'uninitiated', 'command': 'cat <<\'EOF\' | run_templates -t -s \'udev_resource | filter_templates -w "category=
$path/block`
__info__', 'type': 'suite', 'requires': ["package.name == 'hdparm'", "device.category == 'DISK'"]}) for prompt-job with priority -10.
2011-08-23 16:46:27,762 DEBUG Calling ./plugins/
ninitiated', 'command': 'cat <<\'EOF\' | run_templates -t -s \'udev_resource | filter_templates -w "category=
h/block`
fo__', 'type': 'suite', 'requires': ["package.name == 'hdparm'", "device.category == 'DISK'"], 'resources': [{'status': 'Installed', 'desired': 'Install', 'version': '9
.32-1ubuntu3', 'name': 'hdparm', 'description': 'tune hard disk parameters for high performance'}, {'category': 'DISK', 'product': 'SAMSUNG HM641JI', 'vendor': 'ATA', '
bus': 'scsi', 'driver': 'sd', 'path': '/devices/
2011-08-23 16:46:27,763 ERROR Error running event handler ./plugins/
Traceback (most recent call last):
File "/home/
results.
File "./plugins/
if job[attribute] in self._ignore:
KeyError: 'description'
How to reproduce:
- Add info/hdparm to a whitelist (for instance, the default whitelist) - best to add it at the very end.
- Launch checkbox-gtk.
- Deselect all tests.
- Complete the checkbox run.
Expected result:
- No hdparm-related errors in the log file
Actual result:
Error trace as shown above.
Changed in checkbox: | |
milestone: | none → 0.12.5 |
Changed in checkbox: | |
status: | In Progress → Fix Committed |
Changed in checkbox: | |
status: | Fix Committed → Fix Released |
Turned out to be pretty easy to fix, as the info/hdparm job was simply missing the description field. :)