Systems with a particular RAID controller generate tests which run an invalid command

Bug #942769 reported by Brendan Donegan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox
Fix Released
Critical
Brendan Donegan
0.9
Fix Released
Critical
Unassigned

Bug Description

Some server systems contain a particular type of RAID controller which refers to itself as '/dev/cciss/c0d0' instead of e.g. /dev/sda. The Checkbox disk tests use the path of devices as stated by udevadm to work out what the name of the device is. For these devices this is something like:

/devices/pci0000:00/0000:00:0d.0/0000:03:00.0/cciss0/c0d0/block/cciss!c0d0

Note the exclaimation mark towards the end. This causes problems in such job descriptions as:

plugin: local
name: disk/benchmarks
requires: device.category == 'DISK'
_description: Benchmark for each disk
command:
 cat <<'EOF' | run_templates -t -s 'udev_resource | filter_templates -w "category=DISK"'
 plugin: shell
 name: disk/benchmark_`ls /sys$path/block`
 requires: device.path == "$path" and package.name == 'linux'
 user: root
 command: hdparm -tT /dev/`ls /sys$path/block` | sed 's/:.*= */ = /' | grep -v "^$"
 description: This test runs hdparm timing tests as a benchmark for $path
 EOF

For these devices, the generated command line will be:

hdparm -tT /dev/cciss!c0d0 | sed 's/:.*= */ = /' | grep -v "^$"

Bash doesn't appreciate the ! in the command and complains about an unknown event. Really what we want is an output like this:

hdparm -tT /dev/cciss/c0d0 | sed 's/:.*= */ = /' | grep -v "^$"

To achieve this we need to sed the ! for a / wherever it appears.

Related branches

Changed in checkbox:
status: New → Confirmed
status: Confirmed → In Progress
assignee: nobody → Brendan Donegan (brendan-donegan)
importance: Undecided → Critical
summary: - Systems with a particular RAID controller generated tests which run an
+ Systems with a particular RAID controller generate tests which run an
invalid command
Changed in checkbox:
status: In Progress → Fix Committed
Daniel Manrique (roadmr)
Changed in checkbox:
milestone: none → 0.13.4
Ara Pulido (ara)
Changed in 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.