opencompute-developers team mailing list archive
-
opencompute-developers team
-
Mailing list archive
-
Message #00143
[Merge] lp:~bladernr/opencompute/add-disk-stress into lp:opencompute/checkbox
Jeff Lane has proposed merging lp:~bladernr/opencompute/add-disk-stress into lp:opencompute/checkbox.
Commit message:
This does two things:
1: Enables the storage_devices tests using bonnie++ after determining that Bonnie is easily available via both apt and yum (for CentOS).
2: Adds a new io_stress test for disks that uses the disk I/O capabilities of googles stressapptest
Requested reviews:
Open Compute Developers (opencompute-developers)
For more details, see:
https://code.launchpad.net/~bladernr/opencompute/add-disk-stress/+merge/188052
This does two things:
1: Enables the storage_devices tests using bonnie++ after determining that Bonnie is easily available via both apt and yum (for CentOS).
2: Adds a new io_stress test for disks that uses the disk I/O capabilities of googles stressapptest
--
https://code.launchpad.net/~bladernr/opencompute/add-disk-stress/+merge/188052
Your team Open Compute Developers is requested to review the proposed merge of lp:~bladernr/opencompute/add-disk-stress into lp:opencompute/checkbox.
=== modified file 'data/whitelists/opencompute-ready-local.whitelist'
--- data/whitelists/opencompute-ready-local.whitelist 2013-09-25 23:48:44 +0000
+++ data/whitelists/opencompute-ready-local.whitelist 2013-09-27 13:45:12 +0000
@@ -62,6 +62,10 @@
disk/stats_.*
disk/smart
disk/smart_.*
+disk/io_stress
+disk/io_stress_.*
+disk/storage_devices
+disk/storage_device_.*
__memory__
memory/info
memory/stress_30min
=== modified file 'debian/changelog'
--- debian/changelog 2013-09-25 23:49:36 +0000
+++ debian/changelog 2013-09-27 13:45:12 +0000
@@ -9,6 +9,9 @@
[ Jeff Lane ]
* Updated OCP Checkbox to latest checkbox trunk, 0.16.11 revno 2353
+ * Enabled bonnie++ tests after noting that bonnie++ is available via yum and
+ apt. Added new disk io_stress jobs and disk_stress script to add disk
+ testing via stressapptest.
-- Jeff Marcom <jeff.marcom@xxxxxxxxxxxxx> Mon, 23 Sep 2013 10:13:04 -0400
=== modified file 'jobs/disk.txt.in'
--- jobs/disk.txt.in 2012-10-27 10:33:23 +0000
+++ jobs/disk.txt.in 2013-09-27 13:45:12 +0000
@@ -76,6 +76,7 @@
name: disk/storage_devices
requires:
device.category == 'DISK'
+ package.name == 'bonnie++'
_description: Verify that storage devices, such as Fibre Channel and RAID can be detected and perform under stress.
command:
cat <<'EOF' | run_templates -t -s 'udev_resource | filter_templates -w "category=DISK"'
@@ -89,6 +90,24 @@
command: storage_test `ls /sys$path/block | sed 's|!|/|'`
EOF
+plugin: local
+name: disk/io_stress
+requires:
+ device.category == 'DISK'
+ package.name == 'stressapptest'
+_description: Verify that storage devices, such as Fibre Channel and RAID can be detected and perform under stress.
+command:
+ cat <<'EOF' | run_templates -t -s 'udev_resource | filter_templates -w "category=DISK"'
+ plugin: shell
+ name: disk/io_stress_`ls /sys$path/block`
+ user: root
+ requires:
+ device.path == "$path"
+ block_device.`ls /sys$path/block`_state != 'removable'
+ description: Disk I/O stress test for $product
+ command: disk_stress `ls /sys$path/block | sed 's|!|/|'`
+ EOF
+
plugin: shell
name: disk/spindown
requires:
=== added file 'scripts/disk_stress'
--- scripts/disk_stress 1970-01-01 00:00:00 +0000
+++ scripts/disk_stress 2013-09-27 13:45:12 +0000
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+# disk_stress <TEMPDIR>
+# Written by Jeff Lane <jeff@xxxxxxxxxx>
+# Wrapper to execute stressapptest creating one disk I/O thread
+# per CPU core.
+
+#RUNTIME=600 #10 Minutes
+RUNTIME=1800 #30 Minutes
+#RUNTIME=3600 #1 Hour
+CMD="stressapptest -v 20 -s $RUNTIME"
+TIME=`date +%s`
+FILESIZE='402653184' #384 MB
+#FILESIZE='536870912' #512 MB
+#FILESIZE='1073741824' #1 GB
+
+# DISK is required
+if [ ! -n $1 ]; then
+ echo "You must specify a block device (ex. /dev/sda)"
+ exit 1
+else
+ DISK=$1
+fi
+
+# Find out where we're mounted or exit
+if [[ `mount | grep $DISK` ]]; then
+ TEMPDIR=`mount | grep $DISK | awk '{print $3}'`/temp
+else
+ echo "Disk $DISK does not appear to be mounted. Exiting."
+ exit 1
+fi
+
+# Verify TEMPDIR exists, or create it
+if [ ! -d $TEMPDIR ]; then
+ mkdir -p $TEMPDIR
+fi
+
+# Create our command line. SAT requires one -f parameter per disk I/O thread
+for x in `seq 1 $(cat /proc/cpuinfo |grep ocessor|wc -l)`; do
+ CMD="$CMD -f $TEMPDIR/disk_stress_data-$x-$TIME --filesize $FILESIZE"
+done
+
+echo "Executing SAT command: ${CMD}"
+echo
+$CMD 2>&1
+retcode=$?
+
+echo "Cleaning up"
+rm -rf $TEMPDIR
+
+exit $retcode
=== modified file 'scripts/storage_test'
--- scripts/storage_test 2013-09-08 04:35:07 +0000
+++ scripts/storage_test 2013-09-27 13:45:12 +0000
@@ -42,6 +42,15 @@
echo "$disk reports a size of $size."
# Have to account for the end of the size descriptor
size_range=${size:(-2)}
+
+ if mount | grep -q $disk
+ then
+ echo "$disk is mounted, proceeding."
+ else
+ echo "$disk is not mounted. It must be mounted before testing."
+ exit 1
+ fi
+
if [ $size_range == "KB" ]
then
References