summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendra@redhat.com>2012-11-14 19:25:14 +0530
committerAnand Avati <avati@redhat.com>2013-01-17 21:15:13 -0800
commitfd8b19af1713f2800af743d851706b96ca15d9ec (patch)
treec64194b286718ab320b328b2375901a34eb03b6e /tests
parent165044cee54ceaa8f0adec6d571e9ad54f4f8e5d (diff)
debug/trace: save the recent fops received in the event-history
* Make use of event-history in debug/trace xlator to dump the recent fops, when statedump is given. trace xlator saves the fop it received along with the time in the event-history and upon statedump signal, dumps its history. The size of the event-history can be given as a xlator option. * Make changes in trace to take logging into log-file or logging to history as an option. By default both are off. Change-Id: I12baee5805c6efb55735cead4e2093fb94d7a6a0 BUG: 797171 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4088 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/bugs/bug-797171.t43
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/bugs/bug-797171.t b/tests/bugs/bug-797171.t
new file mode 100755
index 0000000..d560367
--- /dev/null
+++ b/tests/bugs/bug-797171.t
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+. $(dirname $0)/../include.rc
+
+cleanup;
+
+TEST glusterd
+TEST pidof glusterd
+TEST $CLI volume info;
+
+TEST $CLI volume create $V0 $H0:$B0/brick1;
+TEST $CLI volume set $V0 debug.trace marker;
+TEST $CLI volume set $V0 debug.log-history on
+
+TEST $CLI volume start $V0;
+
+sleep 1;
+TEST glusterfs --entry-timeout=0 --attribute-timeout=0 -s $H0 --volfile-id $V0 \
+$M0;
+
+sleep 5;
+
+touch $M0/{1..22};
+rm -f $M0/*;
+
+pid_file=$(ls /var/lib/glusterd/vols/$V0/run);
+brick_pid=$(cat /var/lib/glusterd/vols/$V0/run/$pid_file);
+
+mkdir /tmp/statedump_tmp/;
+echo "path=/tmp/statedump_tmp" > /tmp/glusterdump.options;
+echo "all=yes" >> /tmp/glusterdump.options;
+
+TEST $CLI volume statedump $V0 history;
+
+file_name=$(ls /tmp/statedump_tmp);
+TEST grep "xlator.debug.trace.history" /tmp/statedump_tmp/$file_name;
+
+TEST umount $M0
+
+rm -rf /tmp/statedump_tmp;
+rm -f /tmp/glusterdump.options;
+
+cleanup;