storage_test scans all disks with parted
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:/
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 |
This script has been re-worked and does not use parted anymore. Marking invalid.