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

Subscribers

People subscribed via source and target branches