summaryrefslogtreecommitdiff
path: root/qa/553
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2014-10-26 12:33:50 +0400
committerIgor Pashev <pashev.igor@gmail.com>2014-10-26 12:33:50 +0400
commit47e6e7c84f008a53061e661f31ae96629bc694ef (patch)
tree648a07f3b5b9d67ce19b0fd72e8caa1175c98f1a /qa/553
downloadpcp-debian.tar.gz
Debian 3.9.10debian/3.9.10debian
Diffstat (limited to 'qa/553')
-rwxr-xr-xqa/553116
1 files changed, 116 insertions, 0 deletions
diff --git a/qa/553 b/qa/553
new file mode 100755
index 0000000..5ac03ea
--- /dev/null
+++ b/qa/553
@@ -0,0 +1,116 @@
+#!/bin/sh
+# PCP QA Test No. 553
+# Exercise the gluster filesystem PMDA.
+#
+# Copyright (c) 2013 Red Hat.
+#
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+# get standard environment, filters and checks
+. ./common.product
+. ./common.filter
+. ./common.check
+
+pmda_path="$PCP_PMDAS_DIR/gluster"
+pmda_script="$pmda_path/pmdagluster.python"
+test -f "$pmda_script" || _notrun "pmdagluster not supported"
+python -c "from pcp import pmda" >/dev/null 2>&1
+[ $? -eq 0 ] || _notrun "python pcp pmda module not installed"
+
+status=1 # failure is the default!
+$sudo rm -rf $tmp.* $seq.full
+trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
+
+_filter()
+{
+ tee -a $seq.full | \
+ sed \
+ -e "s;$PCP_PMDAS_DIR;\$PCP_PMDAS_DIR;" \
+ -e '/pmResult/s/ .* numpmid/ ... numpmid/' \
+ -e '/[0-9][0-9]:[0-9][0-9]:[0-9][0-9]/s/[^ ]*/TIMESTAMP/' \
+
+ test -f gluster.log && cat gluster.log >> $seq.full
+}
+
+_filter_result()
+{
+ _filter | _filter_dumpresult
+}
+
+domain=118
+test="$here/gluster"
+export GLUSTER_HOME="$test"
+export GLUSTER_VOL_INFO="$test/test.sh info info-single"
+export GLUSTER_VOL_STATS="$test/test.sh stats profile-%s-info"
+export GLUSTER_VOL_STOP="$test/test.sh stop %s $seq $tmp.stop"
+export GLUSTER_VOL_START="$test/test.sh start %s $seq $tmp.start"
+
+# real QA test starts here
+PCP_PYTHON_PMNS=root python "$pmda_script" > $tmp.root
+
+echo "== Testing volume instance domain" | tee -a $seq.full
+$sudo dbpmda -n $tmp.root -ie <<End-of-File 2>&1 | _filter
+open pipe /usr/bin/python $pmda_script
+instance $domain.0
+End-of-File
+
+echo "== Testing volume information metrics" | tee -a $seq.full
+$sudo dbpmda -n $tmp.root -ie <<End-of-File 2>&1 | _filter
+open pipe /usr/bin/python $pmda_script
+getdesc on
+desc gluster.volume.dist.count
+desc gluster.volume.stripe.count
+desc gluster.volume.replica.count
+fetch gluster.volume.dist.count
+fetch gluster.volume.stripe.count
+fetch gluster.volume.replica.count
+End-of-File
+
+echo "== Testing volume control metric store" | tee -a $seq.full
+$sudo rm -f $tmp.start $tmp.stop
+$sudo dbpmda -n $tmp.root -ie <<End-of-File 2>&1 | _filter
+open pipe /usr/bin/python $pmda_script
+getdesc on
+desc gluster.volume.profile
+fetch gluster.volume.profile
+store gluster.volume.profile "1"
+store gluster.volume.profile "0"
+End-of-File
+# store should produce start/stop files via gluster/test.sh
+cat $tmp.start $tmp.stop
+$sudo rm -f $tmp.start $tmp.stop
+
+echo "== Testing brick instance domain" | tee -a $seq.full
+$sudo dbpmda -n $tmp.root -ie <<End-of-File 2>&1 | _filter
+open pipe /usr/bin/python $pmda_script
+instance $domain.1
+End-of-File
+
+echo "== Testing brick throughput metrics" | tee -a $seq.full
+$sudo dbpmda -n $tmp.root -ie <<End-of-File 2>&1 | _filter
+open pipe /usr/bin/python $pmda_script
+getdesc on
+desc gluster.brick.read_bytes
+fetch gluster.brick.read_bytes
+desc gluster.brick.write_bytes
+fetch gluster.brick.write_bytes
+End-of-File
+
+echo "== Testing brick file operation latency metrics" | tee -a $seq.full
+$sudo dbpmda -n $tmp.root -ie <<End-of-File 2>&1 | _filter
+open pipe /usr/bin/python $pmda_script
+getdesc on
+desc gluster.brick.latency.getxattr.avg
+desc gluster.brick.latency.getxattr.min
+desc gluster.brick.latency.getxattr.max
+desc gluster.brick.latency.getxattr.count
+fetch gluster.brick.latency.getxattr.avg
+fetch gluster.brick.latency.getxattr.min
+fetch gluster.brick.latency.getxattr.max
+fetch gluster.brick.latency.getxattr.count
+End-of-File
+
+status=0
+exit