summaryrefslogtreecommitdiffstats
path: root/perf-framework/acl
diff options
context:
space:
mode:
authorRahul C S <rahulcs@redhat.com>2012-02-17 17:23:28 +0530
committerRahul C S <rahulcs@redhat.com>2012-02-17 17:24:19 +0530
commitdb468693ef5faa294d9bc3cd3c5d70c0d99d488b (patch)
treef552d0a8e88304dba5038eac670a5c7afe3c267e /perf-framework/acl
parent01a77a1ae18d9add01f893e06e58191b065602e8 (diff)
Adding the performance framework to the qa repo
Change-Id: Ia7dbd82e9bb2e5e65e9345234ce34f8518a091ad Signed-off-by: Rahul C S <rahulcs@redhat.com>
Diffstat (limited to 'perf-framework/acl')
-rwxr-xr-xperf-framework/acl42
1 files changed, 42 insertions, 0 deletions
diff --git a/perf-framework/acl b/perf-framework/acl
new file mode 100755
index 0000000..c971fee
--- /dev/null
+++ b/perf-framework/acl
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+source gf_perf_config
+
+function usage()
+{
+ echo "Usage: $0 <on|off>"
+ exit 1
+}
+
+function get_mount()
+{
+ brick=$1
+ export_dir=$2
+ ssh -l root $brick ls -d $export_dir > /dev/null
+ if [ $? -ne 0 ]
+ then
+ echo "FATAL : Export directory does not exist. Exiting..."
+ exit 1
+ fi
+ echo `ssh -l root $brick df -h $export_dir | grep -v ^Filesystem | awk '{print $NF}'`
+}
+
+
+if [ $# -ne 1 ]
+then
+ usage
+fi
+
+for brick in $BRICK_IP_ADDRS
+do
+ mount_point=`get_mount $brick $SERVER_EXPORT_DIR`
+ if [ "$1" == "on" ]
+ then
+ ssh -l root $brick mount -o remount,acl $mount_point
+ elif [ "$1" == "off" ]
+ then
+ ssh -l root $brick mount -o remount,noacl $mount_point
+ else
+ usage
+ fi
+done