Merge lp:~bladernr/opencompute/add-disk-stress into lp:opencompute/checkbox

Proposed by Jeff Lane 
Status: Merged
Approved by: Jeff Lane 
Approved revision: 2162
Merged at revision: 2160
Proposed branch: lp:~bladernr/opencompute/add-disk-stress
Merge into: lp:opencompute/checkbox
Diff against target: 141 lines (+86/-0)
5 files modified
data/whitelists/opencompute-ready-local.whitelist (+4/-0)
debian/changelog (+3/-0)
jobs/disk.txt.in (+19/-0)
scripts/disk_stress (+51/-0)
scripts/storage_test (+9/-0)
To merge this branch: bzr merge lp:~bladernr/opencompute/add-disk-stress
Reviewer Review Type Date Requested Status
Jeff Marcom (community) Approve
Review via email: mp+188052@code.launchpad.net

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

Description of the change

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

To post a comment you must log in.
Revision history for this message
Jeff Marcom (jeffmarcom) wrote :

Looks good...kid tested, mother approved.

review: Approve
Revision history for this message
Jeff Marcom (jeffmarcom) wrote :

Attempt to merge into lp:opencompute/checkbox failed due to conflicts:

text conflict in data/whitelists/opencompute-ready-local.whitelist

Revision history for this message
Thao Nguyen (thaoannguyen) wrote :

good job!

2162. By Jeff Lane 

Rebased on current trunk

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/whitelists/opencompute-ready-local.whitelist'
2--- data/whitelists/opencompute-ready-local.whitelist 2013-09-27 04:36:44 +0000
3+++ data/whitelists/opencompute-ready-local.whitelist 2013-09-27 18:22:22 +0000
4@@ -62,6 +62,10 @@
5 disk/stats_.*
6 disk/smart
7 disk/smart_.*
8+disk/io_stress
9+disk/io_stress_.*
10+disk/storage_devices
11+disk/storage_device_.*
12 __ipmi__
13 ipmi/in_band/admin/chassis_info
14 ipmi/in_band/admin/chassis_self_test
15
16=== modified file 'debian/changelog'
17--- debian/changelog 2013-09-25 23:49:36 +0000
18+++ debian/changelog 2013-09-27 18:22:22 +0000
19@@ -9,6 +9,9 @@
20
21 [ Jeff Lane ]
22 * Updated OCP Checkbox to latest checkbox trunk, 0.16.11 revno 2353
23+ * Enabled bonnie++ tests after noting that bonnie++ is available via yum and
24+ apt. Added new disk io_stress jobs and disk_stress script to add disk
25+ testing via stressapptest.
26
27 -- Jeff Marcom <jeff.marcom@canonical.com> Mon, 23 Sep 2013 10:13:04 -0400
28
29
30=== modified file 'jobs/disk.txt.in'
31--- jobs/disk.txt.in 2012-10-27 10:33:23 +0000
32+++ jobs/disk.txt.in 2013-09-27 18:22:22 +0000
33@@ -76,6 +76,7 @@
34 name: disk/storage_devices
35 requires:
36 device.category == 'DISK'
37+ package.name == 'bonnie++'
38 _description: Verify that storage devices, such as Fibre Channel and RAID can be detected and perform under stress.
39 command:
40 cat <<'EOF' | run_templates -t -s 'udev_resource | filter_templates -w "category=DISK"'
41@@ -89,6 +90,24 @@
42 command: storage_test `ls /sys$path/block | sed 's|!|/|'`
43 EOF
44
45+plugin: local
46+name: disk/io_stress
47+requires:
48+ device.category == 'DISK'
49+ package.name == 'stressapptest'
50+_description: Verify that storage devices, such as Fibre Channel and RAID can be detected and perform under stress.
51+command:
52+ cat <<'EOF' | run_templates -t -s 'udev_resource | filter_templates -w "category=DISK"'
53+ plugin: shell
54+ name: disk/io_stress_`ls /sys$path/block`
55+ user: root
56+ requires:
57+ device.path == "$path"
58+ block_device.`ls /sys$path/block`_state != 'removable'
59+ description: Disk I/O stress test for $product
60+ command: disk_stress `ls /sys$path/block | sed 's|!|/|'`
61+ EOF
62+
63 plugin: shell
64 name: disk/spindown
65 requires:
66
67=== added file 'scripts/disk_stress'
68--- scripts/disk_stress 1970-01-01 00:00:00 +0000
69+++ scripts/disk_stress 2013-09-27 18:22:22 +0000
70@@ -0,0 +1,51 @@
71+#!/bin/bash
72+
73+# disk_stress <TEMPDIR>
74+# Written by Jeff Lane <jeff@ubuntu.com>
75+# Wrapper to execute stressapptest creating one disk I/O thread
76+# per CPU core.
77+
78+#RUNTIME=600 #10 Minutes
79+RUNTIME=1800 #30 Minutes
80+#RUNTIME=3600 #1 Hour
81+CMD="stressapptest -v 20 -s $RUNTIME"
82+TIME=`date +%s`
83+FILESIZE='402653184' #384 MB
84+#FILESIZE='536870912' #512 MB
85+#FILESIZE='1073741824' #1 GB
86+
87+# DISK is required
88+if [ ! -n $1 ]; then
89+ echo "You must specify a block device (ex. /dev/sda)"
90+ exit 1
91+else
92+ DISK=$1
93+fi
94+
95+# Find out where we're mounted or exit
96+if [[ `mount | grep $DISK` ]]; then
97+ TEMPDIR=`mount | grep $DISK | awk '{print $3}'`/temp
98+else
99+ echo "Disk $DISK does not appear to be mounted. Exiting."
100+ exit 1
101+fi
102+
103+# Verify TEMPDIR exists, or create it
104+if [ ! -d $TEMPDIR ]; then
105+ mkdir -p $TEMPDIR
106+fi
107+
108+# Create our command line. SAT requires one -f parameter per disk I/O thread
109+for x in `seq 1 $(cat /proc/cpuinfo |grep ocessor|wc -l)`; do
110+ CMD="$CMD -f $TEMPDIR/disk_stress_data-$x-$TIME --filesize $FILESIZE"
111+done
112+
113+echo "Executing SAT command: ${CMD}"
114+echo
115+$CMD 2>&1
116+retcode=$?
117+
118+echo "Cleaning up"
119+rm -rf $TEMPDIR
120+
121+exit $retcode
122
123=== modified file 'scripts/storage_test'
124--- scripts/storage_test 2013-09-08 04:35:07 +0000
125+++ scripts/storage_test 2013-09-27 18:22:22 +0000
126@@ -42,6 +42,15 @@
127 echo "$disk reports a size of $size."
128 # Have to account for the end of the size descriptor
129 size_range=${size:(-2)}
130+
131+ if mount | grep -q $disk
132+ then
133+ echo "$disk is mounted, proceeding."
134+ else
135+ echo "$disk is not mounted. It must be mounted before testing."
136+ exit 1
137+ fi
138+
139
140 if [ $size_range == "KB" ]
141 then

Subscribers

People subscribed via source and target branches