storage_test scans all disks with parted

Bug #1651244 reported by Rod Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Invalid
Medium
Unassigned

Bug Description

The storage_test script includes the following line:

    size=`parted -l -s |grep "Disk.*${disk}" |awk '{print $3}'`

The call `parted -l -s` causes parted to scan ALL the disks in the system, and grep then extracts the desired data. This is fine in a way; however, if parted encounters a problem on ANY disk, it may emit a warning that will end up in the test output for the disk on which the script was called. This has shown up in, e.g.:

https://certification.canonical.com/hardware/201511-19982/submission/114848/test/363/result/8427219/

This output includes the following lines:

/dev/sdb is a block device
Warning: The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.

The warning, though, applies to /dev/sdc, whereas the test was run on /dev/sdb.

The solution is simple: Replace "parted -l -s" with "parted -s ${disk}", which restricts parted's actions to the specified disk device.

Changed in checkbox-ng:
status: New → Triaged
importance: Undecided → Medium
affects: checkbox-ng → plainbox-provider-checkbox
Changed in plainbox-provider-checkbox:
milestone: none → 0.47.0
Changed in plainbox-provider-checkbox:
milestone: 0.47.0 → 0.48.0
Changed in plainbox-provider-checkbox:
milestone: 0.48.0 → 0.49.0
Revision history for this message
Jonathan Cave (jocave) wrote :

This script has been re-worked and does not use parted anymore. Marking invalid.

Changed in plainbox-provider-checkbox:
status: Triaged → Invalid
milestone: 0.49.0 → none
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.