summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xhelper_scrips/download_and_install.sh157
-rw-r--r--helper_scripts/INFO (renamed from helper_scrips/INFO)0
-rwxr-xr-xhelper_scripts/clean_glusterd.sh (renamed from helper_scrips/clean_glusterd.sh)2
-rwxr-xr-xhelper_scripts/clean_logs.sh (renamed from helper_scrips/clean_logs.sh)2
-rwxr-xr-xhelper_scripts/clean_rpm_logs.sh (renamed from helper_scrips/clean_rpm_logs.sh)2
-rwxr-xr-xhelper_scripts/detach.sh (renamed from helper_scrips/detach.sh)0
-rwxr-xr-xhelper_scripts/download_and_install.sh157
-rwxr-xr-xhelper_scripts/glusterfs_uninstall.sh (renamed from helper_scrips/glusterfs_uninstall.sh)12
-rwxr-xr-xhelper_scripts/install_glusterfs_rpm.sh (renamed from helper_scrips/install_glusterfs_rpm.sh)2
-rwxr-xr-xhelper_scripts/install_parallel_glusterfs.sh (renamed from helper_scrips/install_parallel_glusterfs.sh)12
-rwxr-xr-xhelper_scripts/multi_uninstall.sh (renamed from helper_scrips/multi_uninstall.sh)12
-rwxr-xr-xhelper_scripts/probe.sh (renamed from helper_scrips/probe.sh)0
-rwxr-xr-xhelper_scripts/rpm_download_install.sh (renamed from helper_scrips/rpm_download_install.sh)50
-rwxr-xr-xhelper_scripts/rpm_qa_download_install.sh (renamed from helper_scrips/rpm_qa_download_install.sh)4
-rwxr-xr-xhelper_scripts/start_glusterd.sh (renamed from helper_scrips/start_glusterd.sh)10
-rwxr-xr-xhelper_scripts/start_stop.sh (renamed from helper_scrips/start_stop.sh)2
-rwxr-xr-xsanity/nightly_sanity/nightly_updated.sh389
-rwxr-xr-xsanity/system_light/config4
-rwxr-xr-xsanity/system_light/run.sh18
-rwxr-xr-xsanity/system_light/scripts/fs_mark.sh21
20 files changed, 471 insertions, 385 deletions
diff --git a/helper_scrips/download_and_install.sh b/helper_scrips/download_and_install.sh
deleted file mode 100755
index afbffda..0000000
--- a/helper_scrips/download_and_install.sh
+++ /dev/null
@@ -1,157 +0,0 @@
-#!/bin/bash
-
-#set -x;
-
-function _init ()
-{
- # echo $0;
- # echo $#;
- # echo $1;
- set -u;
- if [ $# -lt 1 ]; then
- echo "usage: download_and_install <glusterfs-version> [install prefix]";
- exit 1;
- fi
-
- version=$1;
- echo $version;
- echo $version | grep "glusterfs" 2>/dev/null 1>/dev/null;
- if [ $? -ne 0 ]; then
- echo "given argument is not glusterfs";
- exit 1;
- fi
-
- check_if_qa_release $version;
- op_ret=$?;
-
- if [ $op_ret -eq 0 ]; then
- download_address="http://bits.gluster.com/pub/gluster/glusterfs/src/"$version".tar.gz";
- else
- echo $version | grep "3.2" 2>/dev/null 1>/dev/null;
- if [ $? -eq 0 ]; then
- version_number=$(echo $version | cut -f 2 -d "-");
- download_address="http://ftp.gluster.com/pub/gluster/glusterfs/3.2/$version_number/"$version".tar.gz";
- else
- grep "3.1" $version 2>/dev/null 1>/dev/null;
- echo "haha yes"
- if [ $? -eq 0 ]; then
- version_number=$(echo $version | cut -f 2 -d "-");
- download_address="http://ftp.gluster.com/pub/gluster/glusterfs/3.1/$version_number/"$version".tar.gz";
- else
- grep "3.0" $version 2>/dev/null 1>/dev/null;
- if [ $? -eq 0 ]; then
- version_number=$(cut -f 2 -d "-" $version);
- download_address="http://ftp.gluster.com/pub/gluster/glusterfs/3.2/$version_number/"$version".tar.gz";
- fi
- fi
- fi
- fi
-
-echo "KK: $download_address"
-# ls -l "$version".tar.gz 2>/dev/null 1>/dev/null
-# if [ $? -ne 0 ]; then
-}
-
-function check_if_qa_release ()
-{
- glusterfs_version=$1;
-
- echo $glusterfs_version | grep "qa" 2>/dev/null 1>/dev/null;
- if [ $? -ne 0 ]; then
- echo $glusterfs_version | grep "beta" 2>/dev/null 1>/dev/null;
- fi
- ret=$?;
-
- return $ret;
-}
-
-function download_tarball ()
-{
- address=$1;
-
- wget $address;
-}
-
-function untar_tarball ()
-{
- gluster_version=$1;
-
- tar xzf $PWD/"$gluster_version".tar.gz;
-}
-
-function configure ()
-{
- if [ $# -eq 1 ]; then
- prefix_dir=$1;
- else
- prefix_dir="default";
- fi
-
- old_pwd=$PWD;
-
- cd $PWD/$version;
- check_if_qa_release $version;
-
- if [ $? -eq 0 ]; then
- export CFLAGS="-g -O0 -DDEBUG";
- else
- export CFLAGS="-g -O0";
- fi
-
- if [ ! -d build ]; then
- mkdir build;
- fi
-
- cd build;
-
- echo "KKKKK: $prefix_dir"
- sleep 1;
- if [ $prefix_dir != "default" ]; then
- ../configure --prefix=$prefix_dir --quiet;
- else
- ../configure --quiet;
- fi
-
- cd $old_pwd;
-}
-
-function build_install ()
-{
- cd $PWD/$version;
-
- cd build;
- make -j 32 >/dev/null && make -j 32 install >/dev/null;
-
- cd /root;
-}
-
-main ()
-{
- if [ ! -e $version.tar.gz ]; then
- echo $download_address;
- download_tarball $download_address;
- else
- echo "tarball already present in the directory";
- fi
-
- if [ ! -d $version ]; then
- untar_tarball $version;
- else
- echo "Source directory already present in the directory";
- fi
-
- install_prefix="default";
- if [ $# -eq 2 ]; then
- install_prefix=$2;
- fi
-
- if [ $install_prefix != "default" ]; then
- configure $install_prefix;
- else
- configure;
- fi
-
- build_install;
-}
-
-_init "$@" && main "$@"
diff --git a/helper_scrips/INFO b/helper_scripts/INFO
index d030697..d030697 100644
--- a/helper_scrips/INFO
+++ b/helper_scripts/INFO
diff --git a/helper_scrips/clean_glusterd.sh b/helper_scripts/clean_glusterd.sh
index 2ccbeb2..a68eb97 100755
--- a/helper_scrips/clean_glusterd.sh
+++ b/helper_scripts/clean_glusterd.sh
@@ -46,5 +46,3 @@ function main ()
}
_init && main "$@"
-
-
diff --git a/helper_scrips/clean_logs.sh b/helper_scripts/clean_logs.sh
index 7d30bd9..d5ff90b 100755
--- a/helper_scrips/clean_logs.sh
+++ b/helper_scripts/clean_logs.sh
@@ -50,5 +50,3 @@ function main ()
}
_init && main "$@"
-
-
diff --git a/helper_scrips/clean_rpm_logs.sh b/helper_scripts/clean_rpm_logs.sh
index c5c5a5d..a823bf0 100755
--- a/helper_scrips/clean_rpm_logs.sh
+++ b/helper_scripts/clean_rpm_logs.sh
@@ -50,5 +50,3 @@ function main ()
}
_init && main "$@"
-
-
diff --git a/helper_scrips/detach.sh b/helper_scripts/detach.sh
index 8ccca53..8ccca53 100755
--- a/helper_scrips/detach.sh
+++ b/helper_scripts/detach.sh
diff --git a/helper_scripts/download_and_install.sh b/helper_scripts/download_and_install.sh
new file mode 100755
index 0000000..76390d9
--- /dev/null
+++ b/helper_scripts/download_and_install.sh
@@ -0,0 +1,157 @@
+#!/bin/bash
+
+#set -x;
+
+function _init ()
+{
+ # echo $0;
+ # echo $#;
+ # echo $1;
+ set -u;
+ if [ $# -lt 1 ]; then
+ echo "usage: download_and_install <glusterfs-version> [install prefix]";
+ exit 1;
+ fi
+
+ version=$1;
+ echo $version;
+ echo $version | grep "glusterfs" 2>/dev/null 1>/dev/null;
+ if [ $? -ne 0 ]; then
+ echo "given argument is not glusterfs";
+ exit 1;
+ fi
+
+ check_if_qa_release $version;
+ op_ret=$?;
+
+ if [ $op_ret -eq 0 ]; then
+ download_address="http://bits.gluster.com/pub/gluster/glusterfs/src/"$version".tar.gz";
+ else
+ echo $version | grep "3.2" 2>/dev/null 1>/dev/null;
+ if [ $? -eq 0 ]; then
+ version_number=$(echo $version | cut -f 2 -d "-");
+ download_address="http://ftp.gluster.com/pub/gluster/glusterfs/3.2/$version_number/"$version".tar.gz";
+ else
+ grep "3.1" $version 2>/dev/null 1>/dev/null;
+ echo "haha yes"
+ if [ $? -eq 0 ]; then
+ version_number=$(echo $version | cut -f 2 -d "-");
+ download_address="http://ftp.gluster.com/pub/gluster/glusterfs/3.1/$version_number/"$version".tar.gz";
+ else
+ grep "3.0" $version 2>/dev/null 1>/dev/null;
+ if [ $? -eq 0 ]; then
+ version_number=$(cut -f 2 -d "-" $version);
+ download_address="http://ftp.gluster.com/pub/gluster/glusterfs/3.2/$version_number/"$version".tar.gz";
+ fi
+ fi
+ fi
+ fi
+
+echo "KK: $download_address"
+# ls -l "$version".tar.gz 2>/dev/null 1>/dev/null
+# if [ $? -ne 0 ]; then
+}
+
+function check_if_qa_release ()
+{
+ glusterfs_version=$1;
+
+ echo $glusterfs_version | grep "qa" 2>/dev/null 1>/dev/null;
+ if [ $? -ne 0 ]; then
+ echo $glusterfs_version | grep "beta" 2>/dev/null 1>/dev/null;
+ fi
+ ret=$?;
+
+ return $ret;
+}
+
+function download_tarball ()
+{
+ address=$1;
+
+ wget $address;
+}
+
+function untar_tarball ()
+{
+ gluster_version=$1;
+
+ tar xzf $PWD/"$gluster_version".tar.gz;
+}
+
+function configure ()
+{
+ if [ $# -eq 1 ]; then
+ prefix_dir=$1;
+ else
+ prefix_dir="default";
+ fi
+
+ old_pwd=$PWD;
+
+ cd $PWD/$version;
+ check_if_qa_release $version;
+
+ if [ $? -eq 0 ]; then
+ export CFLAGS="-g -O0 -DDEBUG";
+ else
+ export CFLAGS="-g -O0";
+ fi
+
+ if [ ! -d build ]; then
+ mkdir build;
+ fi
+
+ cd build;
+
+ echo "KKKKK: $prefix_dir"
+ sleep 1;
+ if [ $prefix_dir != "default" ]; then
+ ../configure --prefix=$prefix_dir --quiet;
+ else
+ ../configure --quiet;
+ fi
+
+ cd $old_pwd;
+}
+
+function build_install ()
+{
+ cd $PWD/$version;
+
+ cd build;
+ make -j 32 >/dev/null && make -j 32 install >/dev/null;
+
+ cd /root;
+}
+
+main ()
+{
+ if [ ! -e $version.tar.gz ]; then
+ echo $download_address;
+ download_tarball $download_address;
+ else
+ echo "tarball already present in the directory";
+ fi
+
+ if [ ! -d $version ]; then
+ untar_tarball $version;
+ else
+ echo "Source directory already present in the directory";
+ fi
+
+ install_prefix="default";
+ if [ $# -eq 2 ]; then
+ install_prefix=$2;
+ fi
+
+ if [ $install_prefix != "default" ]; then
+ configure $install_prefix;
+ else
+ configure;
+ fi
+
+ build_install;
+}
+
+_init "$@" && main "$@"
diff --git a/helper_scrips/glusterfs_uninstall.sh b/helper_scripts/glusterfs_uninstall.sh
index 31a000d..b3378fd 100755
--- a/helper_scrips/glusterfs_uninstall.sh
+++ b/helper_scripts/glusterfs_uninstall.sh
@@ -9,16 +9,16 @@ function _init ()
# echo $1;
set -u;
if [ $# -lt 1 ]; then
- echo "usage: download_and_install <glusterfs-version>";
- exit 1;
+ echo "usage: download_and_install <glusterfs-version>";
+ exit 1;
fi
version=$1;
echo $version;
echo $version | grep "glusterfs" 2>/dev/null 1>/dev/null;
if [ $? -ne 0 ]; then
- echo "given argument is not glusterfs";
- exit 1;
+ echo "given argument is not glusterfs";
+ exit 1;
fi
}
@@ -36,8 +36,8 @@ main ()
{
if [ ! -d $version ]; then
- echo "the glusterfs version ($version) directory is not there."
- return 1;
+ echo "the glusterfs version ($version) directory is not there."
+ return 1;
fi
un_install;
diff --git a/helper_scrips/install_glusterfs_rpm.sh b/helper_scripts/install_glusterfs_rpm.sh
index 4e82b58..9b5c6fa 100755
--- a/helper_scrips/install_glusterfs_rpm.sh
+++ b/helper_scripts/install_glusterfs_rpm.sh
@@ -71,5 +71,3 @@ function main ()
}
_init "$@" && main "$@"
-
-
diff --git a/helper_scrips/install_parallel_glusterfs.sh b/helper_scripts/install_parallel_glusterfs.sh
index 15455fb..de5840a 100755
--- a/helper_scrips/install_parallel_glusterfs.sh
+++ b/helper_scripts/install_parallel_glusterfs.sh
@@ -11,13 +11,13 @@ function install_glusterfs ()
local remote_server=;
if [ $# -eq 1 ]; then
- remote_server=$1;
+ remote_server=$1;
fi
if [ $remote_server ]; then
- ssh $remote_server cp -f /root/scripts/download_and_install.sh /root/;
- ssh $remote_server /root/download_and_install.sh $VERSION;
- return 0;
+ ssh $remote_server cp -f /root/scripts/download_and_install.sh /root/;
+ ssh $remote_server /root/download_and_install.sh $VERSION;
+ return 0;
fi
j=0;
@@ -45,9 +45,9 @@ function main ()
{
stat --printf=%i /root/machines 2>/dev/null 1>/dev/null;
if [ $? -ne 0 ]; then
- echo "servers file is not present /root. Cannot execute further.";
+ echo "servers file is not present /root. Cannot execute further.";
- exit 1;
+ exit 1;
fi
install_glusterfs;
diff --git a/helper_scrips/multi_uninstall.sh b/helper_scripts/multi_uninstall.sh
index dca2350..4f6a1cd 100755
--- a/helper_scrips/multi_uninstall.sh
+++ b/helper_scripts/multi_uninstall.sh
@@ -13,13 +13,13 @@ function uninstall_glusterfs ()
local remote_server=;
if [ $# -eq 1 ]; then
- remote_server=$1;
+ remote_server=$1;
fi
if [ $remote_server ]; then
- ssh $remote_server cp -f /root/scripts/glusterfs_uninstall.sh /root/;
- ssh $remote_server /root/glusterfs_uninstall.sh $VERSION;
- return 0;
+ ssh $remote_server cp -f /root/scripts/glusterfs_uninstall.sh /root/;
+ ssh $remote_server /root/glusterfs_uninstall.sh $VERSION;
+ return 0;
fi
j=0;
@@ -47,9 +47,9 @@ function main ()
{
stat --printf=%i /root/machines 2>/dev/null 1>/dev/null;
if [ $? -ne 0 ]; then
- echo "servers file is not present /root. Cannot execute further.";
+ echo "servers file is not present /root. Cannot execute further.";
- exit 1;
+ exit 1;
fi
uninstall_glusterfs;
diff --git a/helper_scrips/probe.sh b/helper_scripts/probe.sh
index f6fc217..f6fc217 100755
--- a/helper_scrips/probe.sh
+++ b/helper_scripts/probe.sh
diff --git a/helper_scrips/rpm_download_install.sh b/helper_scripts/rpm_download_install.sh
index f1a071a..4de3a2b 100755
--- a/helper_scrips/rpm_download_install.sh
+++ b/helper_scripts/rpm_download_install.sh
@@ -28,24 +28,24 @@ function _init ()
if [ $op_ret -eq 0 ]; then
download_address="http://bits.gluster.com/pub/gluster/glusterfs/";
else
- echo $version | grep "3.2" 2>/dev/null 1>/dev/null;
- if [ $? -eq 0 ]; then
- version_number=$(echo $version | cut -f 2 -d "-");
- download_address="http://download.gluster.com/pub/gluster/glusterfs/3.2/$version_number/RHEL/";
- else
- grep "3.1" $version 2>/dev/null 1>/dev/null;
- echo "haha yes"
- if [ $? -eq 0 ]; then
- version_number=$(echo $version | cut -f 2 -d "-");
- download_address="http://download.gluster.com/pub/gluster/glusterfs/3.1/$version_number/RHEL/";
- else
- grep "3.0" $version 2>/dev/null 1>/dev/null;
- if [ $? -eq 0 ]; then
- version_number=$(cut -f 2 -d "-" $version);
- download_address="http://download.gluster.com/pub/gluster/glusterfs/3.0/$version_number/RHEL/";
- fi
- fi
- fi
+ echo $version | grep "3.2" 2>/dev/null 1>/dev/null;
+ if [ $? -eq 0 ]; then
+ version_number=$(echo $version | cut -f 2 -d "-");
+ download_address="http://download.gluster.com/pub/gluster/glusterfs/3.2/$version_number/RHEL/";
+ else
+ grep "3.1" $version 2>/dev/null 1>/dev/null;
+ echo "haha yes"
+ if [ $? -eq 0 ]; then
+ version_number=$(echo $version | cut -f 2 -d "-");
+ download_address="http://download.gluster.com/pub/gluster/glusterfs/3.1/$version_number/RHEL/";
+ else
+ grep "3.0" $version 2>/dev/null 1>/dev/null;
+ if [ $? -eq 0 ]; then
+ version_number=$(cut -f 2 -d "-" $version);
+ download_address="http://download.gluster.com/pub/gluster/glusterfs/3.0/$version_number/RHEL/";
+ fi
+ fi
+ fi
fi
echo "Download address: $download_address" && sleep 2;
@@ -80,8 +80,8 @@ function download_rpms ()
echo $version_number | grep "3.2";
is_32=$?;
if [ $is_32 -ne 0 ]; then
- echo $version_number | grep "3.3";
- is_32=$?;
+ echo $version_number | grep "3.3";
+ is_32=$?;
fi
check_if_qa_release $version;
@@ -98,11 +98,11 @@ function download_rpms ()
else
wget $address/glusterfs-core-$version_number-1.el6.x86_64.rpm;
wget $address/glusterfs-debuginfo-$version_number-1.el6.x86_64.rpm;
- wget $address/glusterfs-fuse-$version_number-1.el6.x86_64.rpm;
- if [ $is_32 -eq 0 ]; then
- wget $address/glusterfs-geo-replication-$version_number-1.el6.x86_64.rpm;
+ wget $address/glusterfs-fuse-$version_number-1.el6.x86_64.rpm;
+ if [ $is_32 -eq 0 ]; then
+ wget $address/glusterfs-geo-replication-$version_number-1.el6.x86_64.rpm;
echo "3.2 version";
- fi
+ fi
fi
}
@@ -157,5 +157,3 @@ main ()
}
_init "$@" && main "$@"
-
- \ No newline at end of file
diff --git a/helper_scrips/rpm_qa_download_install.sh b/helper_scripts/rpm_qa_download_install.sh
index 32fc2e1..1f878f7 100755
--- a/helper_scrips/rpm_qa_download_install.sh
+++ b/helper_scripts/rpm_qa_download_install.sh
@@ -47,7 +47,7 @@ function check_if_qa_release ()
function download_rpms ()
{
address=$1;
-
+
mkdir $PWD/rpms/$version_number;
cd $PWD/rpms/$version_number;
@@ -109,5 +109,3 @@ main ()
}
_init "$@" && main "$@"
-
- \ No newline at end of file
diff --git a/helper_scrips/start_glusterd.sh b/helper_scripts/start_glusterd.sh
index 5bc0901..09c1210 100755
--- a/helper_scrips/start_glusterd.sh
+++ b/helper_scripts/start_glusterd.sh
@@ -10,12 +10,12 @@ function start_glusterd ()
local remote_server=;
if [ $# -eq 1 ]; then
- remote_server=$1;
+ remote_server=$1;
fi
if [ $remote_server ]; then
- ssh $remote_server glusterd;
- return 0;
+ ssh $remote_server glusterd;
+ return 0;
fi
for i in $(cat /root/servers)
@@ -35,8 +35,8 @@ function main ()
{
stat --printf=%i /root/servers 2>/dev/null 1>/dev/null;
if [ $? -ne 0 ]; then
- echo "servers file is not present /root. Cannot execute further."
- exit 1
+ echo "servers file is not present /root. Cannot execute further."
+ exit 1
fi
start_glusterd;
diff --git a/helper_scrips/start_stop.sh b/helper_scripts/start_stop.sh
index 83ad1bf..05ed6fa 100755
--- a/helper_scrips/start_stop.sh
+++ b/helper_scripts/start_stop.sh
@@ -22,7 +22,7 @@ function start_and_stop ()
function main ()
{
-
+
start_and_stop;
return 0;
diff --git a/sanity/nightly_sanity/nightly_updated.sh b/sanity/nightly_sanity/nightly_updated.sh
index a8f4da1..cb878a0 100755
--- a/sanity/nightly_sanity/nightly_updated.sh
+++ b/sanity/nightly_sanity/nightly_updated.sh
@@ -41,21 +41,21 @@ function _init()
sleep 1;
DEFAULT_LOGDIR="/usr/local/var/log/glusterfs";
# if [ $mount_type == "fuse" ]; then
-# WORKSPACE_DIR="/opt/users/nightly_sanity/glusterfs.git";
-# else
-# if [ $mount_type == "nfs" ]; then
-# WORKSPACE_DIR="/opt/users/nfs_sanity/glusterfs.git";
-# else
-# echo "Unknown mount type $mount_type";
-# exit 22;
-# fi
+# WORKSPACE_DIR="/opt/users/nightly_sanity/glusterfs.git";
+# else
+# if [ $mount_type == "nfs" ]; then
+# WORKSPACE_DIR="/opt/users/nfs_sanity/glusterfs.git";
+# else
+# echo "Unknown mount type $mount_type";
+# exit 22;
+# fi
# fi
WORKSPACE_DIR="/root/sanity/glusterfs.git";
WORKDIR="/export/nightly";
SPECDIR="/opt/users/nightly_sanity/$translator";
BUILDDIR="$WORKSPACE_DIR/build";
-
+
LOGDIR="$WORKDIR/logs_$translator/`date +%F`";
EXPORTDIR=$WORKDIR/data;
MOUNTDIR=$WORKDIR/mount;
@@ -67,7 +67,7 @@ function _init()
if [ "$arch" == "Linux" ]; then
echo "$COREDIR/core" > /proc/sys/kernel/core_pattern;
- echo "1" > /proc/sys/kernel/core_uses_pid;
+ echo "1" > /proc/sys/kernel/core_uses_pid;
fi
#EMAIL="dl-qa@gluster.com"
@@ -83,7 +83,7 @@ function _init()
# SPECDIR="/opt/users/vijay/nightly"
# BUILDDIR="$WORKSPACE_DIR/build"
-# LOGDIR="$WORKDIR/logs/`date +%F`"
+# LOGDIR="$WORKDIR/logs/`date +%F`"
# EXPORTDIR=$WORKDIR/data
# MOUNTDIR=$WORKDIR/mount
# RESULTDIR=/tmp/nightly-results
@@ -95,7 +95,7 @@ function _init()
# function update_git ()
# {
# cd $WORKSPACE_DIR
-# echo "$WORKSPACE_DIR in there"
+# echo "$WORKSPACE_DIR in there"
# git pull
# }
@@ -111,10 +111,10 @@ function prepare_dirs()
# mkdir -p $MOUNTDIR
# fi
-
- # j=0;
+
+ # j=0;
# #Create individual export_dirs
- # cd $SPECDIR
+ # cd $SPECDIR
# for i in `ls server*.vol`
# do
# let "j += 1"
@@ -152,27 +152,27 @@ function prepare_dirs()
mkdir -p $MOUNTDIR/nfs_client$j;
done
else
- echo "Unknown mount type; Please specify one of fuse , nfs or both";
+ echo "Unknown mount type; Please specify one of fuse , nfs or both";
fi
fi
fi
if [ ! -d $LOGDIR ]; then
mkdir -p $LOGDIR;
- mkdir -p $LOGDIR/old_dump/;
- mkdir -p $LOGDIR/new_dump/;
+ mkdir -p $LOGDIR/old_dump/;
+ mkdir -p $LOGDIR/new_dump/;
fi
-
+
if [ ! -d $SYSCALLDIR ]; then
- mkdir -p $SYSCALLDIR;
+ mkdir -p $SYSCALLDIR;
fi
-
+
if [ ! -d $COREDIR ]; then
- mkdir -p $COREDIR;
+ mkdir -p $COREDIR;
fi
if [ ! -d $CORE_REPOSITORY ]; then
- mkdir -p $CORE_REPOSITORY;
+ mkdir -p $CORE_REPOSITORY;
fi
}
@@ -185,13 +185,13 @@ function install_glusterfs()
mkdir $BUILDDIR;
fi
cd $BUILDDIR;
-
+
if [ "$arch" == "Linux" ]; then
- make clean -j 32;
- export CFLAGS="-g -O0 -DDEBUG";
- ../configure CFLAGS="-g -O0 -DDEBUG" --enable-fusermount;
+ make clean -j 32;
+ export CFLAGS="-g3 -DDEBUG -lgcov --coverage";
+ ../configure CFLAGS="-g3 -DDEBUG -lgcov --coverage" --enable-fusermount;
make -j 32>/dev/null;
- echo "Post make";
+ echo "Post make";
make install -j 32>/dev/null;
else if [ "$arch" == "SunOs" ]; then
make clean;
@@ -250,7 +250,7 @@ function volume_create ()
else
return 0;
fi
- fi
+ fi
if [ $vol_type == "disrep" ]; then
echo "Creating a distributed-replicate volume";
@@ -283,16 +283,16 @@ function start_volume()
echo "gluster volume start failed. Check glusterd log file"
return 11;
else
- # echo "Setting brick log-level to debug";
- # gluster volume set vol diagnostics.brick-log-level debug;
- # if [ $? -ne 0 ]; then
- # echo "Setting brick log level to debug failed. Going with normal log";
- # fi
- # echo "Setting client log-level to debug";
- # gluster volume set vol diagnostics.client-log-level debug;
- # if [ $? -ne 0 ]; then
- # echo "Setting client log level to debug failed. Going with normal log";
- # fi
+ # echo "Setting brick log-level to debug";
+ # gluster volume set vol diagnostics.brick-log-level debug;
+ # if [ $? -ne 0 ]; then
+ # echo "Setting brick log level to debug failed. Going with normal log";
+ # fi
+ # echo "Setting client log-level to debug";
+ # gluster volume set vol diagnostics.client-log-level debug;
+ # if [ $? -ne 0 ]; then
+ # echo "Setting client log level to debug failed. Going with normal log";
+ # fi
return 0;
fi
}
@@ -301,20 +301,20 @@ function mount_volume ()
{
echo "Started the volume. Mounting it"
if [ $mount_type == "fuse" ]; then
- modprobe fuse;
- if [ $? -ne 0 ]; then
- echo "cannot load fuse. Exiting";
- return 11;
- fi
-
- for i in $(seq 1 $num_clients)
- do
+ modprobe fuse;
+ if [ $? -ne 0 ]; then
+ echo "cannot load fuse. Exiting";
+ return 11;
+ fi
+
+ for i in $(seq 1 $num_clients)
+ do
#mount -t glusterfs $(hostname):vol $MOUNTDIR/client$i
glusterfs --volfile-server=$(hostname) --volfile-id=vol $MOUNTDIR/client$i -p /tmp/client_pid$i;
- df -h; #to be removed
- done
+ df -h; #to be removed
+ done
fi
-
+
if [ $mount_type == "nfs" ]; then
sleep 2;
gluster volume info vol;
@@ -327,7 +327,7 @@ function mount_volume ()
fi
for i in $(seq 1 $num_clients)
do
- sleep 1;
+ sleep 1;
mount -t nfs -o nolock $(hostname):vol $MOUNTDIR/nfs_client$i
done
fi
@@ -335,12 +335,12 @@ function mount_volume ()
if [ $mount_type == "both" ]; then
for i in $(seq 1 $num_clients)
do
-
- modprobe fuse;
- if [ $? -ne 0 ]; then
- echo "cannot load fuse. Exiting";
- return 11;
- fi
+
+ modprobe fuse;
+ if [ $? -ne 0 ]; then
+ echo "cannot load fuse. Exiting";
+ return 11;
+ fi
#mount -t glusterfs $(hostname):vol $MOUNTDIR/client$i
glusterfs --volfile-server=$(hostname) --volfile-id=vol $MOUNTDIR/client$i -p /tmp/client_pid$i;
@@ -353,7 +353,7 @@ function mount_volume ()
# echo "Unknown mount type"
# stop_glusterfs;
# return 11;
- fi
+ fi
}
function start_glusterfs ()
@@ -386,36 +386,36 @@ function run_tests ()
{
if [ $mount_type == "fuse" ]; then
cd $MOUNTDIR/client1;
- fi
+ fi
- if [ $mount_type == "nfs" ]; then
- cd $MOUNTDIR/nfs_client1;
- fi
+ if [ $mount_type == "nfs" ]; then
+ cd $MOUNTDIR/nfs_client1;
+ fi
- set +e;
+ set +e;
if [ "$arch" == "SunOs" ] || [ "$mount_type" == "nfs" ]; then
- /opt/qa/tools/system_light/run.sh -w $MOUNTDIR/nfs_client1 -t nfs -l /export/runlog.$translator
+ /opt/qa/tools/system_light/run.sh -w $MOUNTDIR/nfs_client1 -t nfs -l /export/runlog.$translator
fi
- if [ $mount_type == "fuse" ]; then
- echo "executing tests on a fuse mount point"
- /opt/qa/tools/system_light/run.sh -w $MOUNTDIR/client1 -l /export/runlog.$translator
- fi
+ if [ $mount_type == "fuse" ]; then
+ echo "executing tests on a fuse mount point"
+ /opt/qa/tools/system_light/run.sh -w $MOUNTDIR/client1 -l /export/runlog.$translator
+ fi
- # if [ $mount_type == "nfs" ]; then
-# echo "executing tests on an nfs mount point"
-# /opt/qa/tools/system_light/run.sh -w $MOUNTDIR/nfs_client1 -t nfs -l /export/runlog.$translator;
-# fi
+ # if [ $mount_type == "nfs" ]; then
+# echo "executing tests on an nfs mount point"
+# /opt/qa/tools/system_light/run.sh -w $MOUNTDIR/nfs_client1 -t nfs -l /export/runlog.$translator;
+# fi
x=$?;
- if [ !x ]
+ if [ !x ]
then
echo "Sanity Passed!";
else
echo "Sanity Failed. Please check your changes!";
fi
- echo "Contents of mount point after all the tests" >> /export/runlog.$translator;
+ echo "Contents of mount point after all the tests" >> /export/runlog.$translator;
if [ "$arch" == "SunOs" ] || [ "$mount_type" == "nfs" ]; then
ls -laR $MOUNTDIR/nfs_client1 >> /export/runlog.$translator;
echo "removing the mount point contents" >> /export/runlog.$translator;
@@ -427,8 +427,8 @@ function run_tests ()
echo "removing the mount point contents" >> /export/runlog.$translator;
rm -rfv $MOUNTDIR/export/client1/*;
fi
- set -e;
-
+ set -e;
+
}
function stop_glusterfs()
@@ -438,12 +438,12 @@ function stop_glusterfs()
pgrep locktests;
if [ $? -eq 0 ]; then
- pkill locktests;
- if [ $? -ne 0 ]; then
- killall -KILL locktests;
- fi
+ pkill locktests;
+ if [ $? -ne 0 ]; then
+ killall -KILL locktests;
+ fi
fi
-
+
j=0;
for i in $(seq 1 $num_clients)
do
@@ -451,33 +451,33 @@ function stop_glusterfs()
if [ $mount_type == "fuse" ]; then
umount $MOUNTDIR/client$j;
if [ $? -ne 0 ]; then
- echo "unmounting $MOUNTDIR/client$j failed.";
- fi
+ echo "unmounting $MOUNTDIR/client$j failed.";
+ fi
umount $MOUNTDIR/client$j -l;
else if [ $mount_type == "nfs" ]; then
set +e;
umount $MOUNTDIR/nfs_client$j;
if [ $? -ne 0 ]; then
- echo "unmounting $MOUNTDIR/nfs_client$j failed";
- fi
+ echo "unmounting $MOUNTDIR/nfs_client$j failed";
+ fi
umount $MOUNTDIR/nfs_client$j -l;
set -e;
else if [ $mount_type == "both" ]; then
set +e;
umount $MOUNTDIR/client$j;
- if [ $? -ne 0 ]; then
- echo "unmounting $MOUNTDIR/client$j failed";
- fi
+ if [ $? -ne 0 ]; then
+ echo "unmounting $MOUNTDIR/client$j failed";
+ fi
umount MOUNTDIR/client$j -l;
umount $MOUNTDIR/nfs_client$j;
if [ $? -ne 0 ]; then
- echo "unmounting $MOUNTDIR/nfs_client$j failed";
- fi
+ echo "unmounting $MOUNTDIR/nfs_client$j failed";
+ fi
umount $MOUNTDIR/nfs_client -l;
set -e;
- fi
- fi
- fi
+ fi
+ fi
+ fi
done
gluster --mode=script volume stop vol;
@@ -487,9 +487,9 @@ function stop_glusterfs()
fi
gluster --mode=script volume delete vol;
- if [ $? -ne 0 ]; then
- echo "Error while deleting the server processes. Going ahead with umount";
- return 11;
+ if [ $? -ne 0 ]; then
+ echo "Error while deleting the server processes. Going ahead with umount";
+ return 11;
fi
set +e;
@@ -519,47 +519,91 @@ function pre_run()
# update_git;
#set -e;
echo "Entered pre_run";
- prepare_dirs;
- set -e;
- install_glusterfs;
+ prepare_dirs;
+ set -e;
+ install_glusterfs;
+ prepare_gcov $WORKSPACE_DIR;
+
+}
+
+function prepare_gcov ()
+{
+ local dir;
+
+ dir=$1;
+ set +e;
+
+ coverage_dir=$dir/build;
+
+ if [ ! -d $coverage_dir/coverage ]; then
+ mkdir $coverage_dir/coverage;
+ fi
+
+ # Reset all execution count details.
+ lcov -d $dir --zerocounters;
+
+ # Run lcov initially with zero code coverage and put it in a ".info" file.
+ lcov -i -c -d $dir -o $coverage_dir/coverage/glusterfs-lcov.info;
+
+ # Now the sanity tests can be run after which we again look back to gcov.
+ set -e;
+}
+
+function post_run_gcov ()
+{
+ local dir;
+
+ dir=$1;
+
+ coverage_dir=$dir/build;
+ # Capture the actual code coverage.
+ lcov -c -d $dir -o $coverage_dir/coverage/glusterfs-lcov.info;
+
+ # Remove the line with "<gluster-repo>/libglusterfs/src/<stdout>"
+ # from ".info" file. For some reason genhtml fails otherwise.
+
+ sed -i.bak '/stdout/d' $coverage_dir/coverage/glusterfs-lcov.info;
+
+ # Generate the html page for code coverage details using genhtml.
+ genhtml -o $coverage_dir/coverage/ $coverage_dir/coverage/glusterfs-lcov.info;
}
function send_results()
{
- if [ ! -d $LOGDIR ]
- then
- mkdir $LOGDIR;
- fi
+ if [ ! -d $LOGDIR ]
+ then
+ mkdir $LOGDIR;
+ fi
cd $LOGDIR;
- if [ ! -d $RESULTDIR ]
- then
- mkdir $RESULTDIR;
- else
- rm -rf $RESULTDIR/*;
- fi
+ if [ ! -d $RESULTDIR ]
+ then
+ mkdir $RESULTDIR;
+ else
+ rm -rf $RESULTDIR/*;
+ fi
- cp -r $DEFAULT_LOGDIR $LOGDIR;
+ cp -r $DEFAULT_LOGDIR $LOGDIR;
- #cp -r $LOGDIR/* $RESULTDIR;
+ #cp -r $LOGDIR/* $RESULTDIR;
cp /export/runlog.$translator $RESULTDIR;
- mv /export/tests_failed $LOGDIR/tests_failed_$translator;
- echo $translator >> $LOGDIR/tests_failed_$translator;
- echo $mount_type >> $LOGDIR/tests_failed_$translator;
- cat /tmp/posix | grep FAILED >> $LOGDIR/tests_failed_$translator;
- cat /tmp/git_head* >> $LOGDIR/tests_failed_$translator;
- #cat /tmp/bonnie >> $LOGDIR/tests_failed_$translator;
- #cat /tmp/iozone >> $LOGDIR/tests_failed_$translator;
- cat /export/$(date +%F) >>$LOGDIR/tests_failed_$translator;
- mv /export/$(date +%F) $LOGDIR;
-
- DATE=$(date +%F);
+ mv /export/tests_failed $LOGDIR/tests_failed_$translator;
+ echo $translator >> $LOGDIR/tests_failed_$translator;
+ echo $mount_type >> $LOGDIR/tests_failed_$translator;
+ cat /tmp/posix | grep FAILED >> $LOGDIR/tests_failed_$translator;
+ cat /tmp/git_head* >> $LOGDIR/tests_failed_$translator;
+ #cat /tmp/bonnie >> $LOGDIR/tests_failed_$translator;
+ #cat /tmp/iozone >> $LOGDIR/tests_failed_$translator;
+ cat /export/$(date +%F) >>$LOGDIR/tests_failed_$translator;
+ mv /export/$(date +%F) $LOGDIR;
+
+ DATE=$(date +%F);
found_gluster_core=0;
- ls $COREDIR/core* ;
- if [ $? -eq 0 ]; then
+ ls $COREDIR/core* ;
+ if [ $? -eq 0 ]; then
if [ ! -d $CORE_REPOSITORY/$DATE ]; then
- mkdir $CORE_REPOSITORY/$DATE;
- fi
+ mkdir $CORE_REPOSITORY/$DATE;
+ fi
for i in $(ls $COREDIR)
do
@@ -576,8 +620,8 @@ function send_results()
else
rm -rf $COREDIR/core*;
fi
- #mv $COREDIR/core* $CORE_REPOSITORY/core*_$translator_`date +%F`
- fi
+ #mv $COREDIR/core* $CORE_REPOSITORY/core*_$translator_`date +%F`
+ fi
echo "Critical and error logs for client, nfs and glusterd" >> $LOGDIR/logs_failed_$translator;
for i in $(find $DEFAULT_LOGDIR -type f -iname "*.log")
@@ -596,9 +640,11 @@ function send_results()
done
rm -rf $DEFAULT_LOGDIR/*.log;
- rm -rf $DEFAULT_LOGDIR/bricks/*;
+ rm -rf $DEFAULT_LOGDIR/bricks/*;
+
+ cp -r $LOGDIR/* $RESULTDIR;
+ cp -r $BUILDDIR/coverage/ $RESULTDIR;
- cp -r $LOGDIR/* $RESULTDIR;
tar cjf results_$translator.bz2 $RESULTDIR;
############################### copying the patches applied today ##################################
@@ -607,40 +653,51 @@ function send_results()
####################################################################################################
- # git push log files
- echo "Pushing logs to qalogs git repo: "
+ # git push log files
+ echo "Pushing logs to qalogs git repo: "
mkdir -p $LOGREPO/`date +%F`/$translator/
cp $LOGDIR/results_$translator.bz2 $LOGREPO/`date +%F`/$translator/;
cd /export/qalogs && git pull && git add . && git commit -a -m "log for `date +%F`" && git push;
- if [ $? -ne 0 ]; then
- echo "Commit failed. Recommit bz2 log manually." > /tmp/git_log_commit;
- else
- echo "Commit successful." > /tmp/git_log_commit;
- fi
- cd $LOGDIR;
+ if [ $? -ne 0 ]; then
+ echo "Commit failed. Recommit bz2 log manually." > /tmp/git_log_commit;
+ else
+ echo "Commit successful." > /tmp/git_log_commit;
+ fi
+ cd $LOGDIR;
# echo "Sending results";
# sleep 2;
# mutt -a results_$translator.bz2 -s "Sanity Results for `date +%F`" -i $LOGDIR/tests_failed_$translator $EMAIL <.;
- ###############IMP##############################
- #This part is needed if the iozone and bonnie results are to be uploaded in the dev server
+ ###############IMP##############################
+ #This part is needed if the iozone and bonnie results are to be uploaded in the dev server
# cp /tmp/bonnie /tmp/bonnie_$translator_`date +%F`;
# cp /tmp/iozone /tmp/iozone_$translator_`date +%F`;
# scp /tmp/bonnie_`date +%F` raghavendrabhat@dev.gluster.com:/home/raghavendrabhat/public_html/test;
# scp /tmp/iozone_`date +%F` raghavendrabhat@dev.gluster.com:/home/raghavendrabhat/public_html/test;
- ##############IMP################################
+ ##############IMP################################
# rm /export/bonnie /export/iozone;
- rm /tmp/posix;
-
- scp $LOGDIR/logs_failed_$translator $EMAIL/result/;
- scp $LOGDIR/tests_failed_$translator $EMAIL/nightly_sanity/;
- if [ $? -ne 0 ]; then
- echo "sending mail failed" > /tmp/mail_result;
- else
- echo "sending mail successful" >/tmp/mail_result;
- fi
+ rm /tmp/posix;
+
+ mkdir /tmp/gcov_logs;
+ cp -r $BUILDDIR/coverage/ /tmp/gcov_logs;
+ cp $LOGDIR/logs_failed_$translator /tmp/gcov_logs;
+
+ cd /tmp/;
+ tar cjf logs_failed_$translator.bz2 gcov_logs;
+ cd -;
+
+ scp /tmp/logs_failed_$translator.bz2 $EMAIL/result/;
+ scp $LOGDIR/tests_failed_$translator $EMAIL/nightly_sanity/;
+ if [ $? -ne 0 ]; then
+ echo "sending mail failed" > /tmp/mail_result;
+ else
+ echo "sending mail successful" >/tmp/mail_result;
+ fi
+
+ # remove the logs and the index file containing directory.
+ rm -rf /tmp/gcov_logs /tmp/logs_failed_$translator.bz2;
}
function clean_results()
@@ -654,27 +711,27 @@ function clean_results()
function syscallbench_plot()
{
cp /tmp/`date +%F` $SYSCALLDIR
- cd $SYSCALLDIR
+ cd $SYSCALLDIR
mv today yesterday
ln -s `date +%F` today
$TOOLDIR/syscallbench-plot today yesterday > $LOGDIR/plot.ps
}
-
+
function check_and_kill ()
{
pgrep glusterfs;
if [ $? -eq 0 ]; then
- pkill glusterfs;
+ pkill glusterfs;
fi
pgrep glusterfsd;
if [ $? -eq 0 ]; then
- pkill glusterfsd;
+ pkill glusterfsd;
fi
pgrep glusterd;
- if [ $? -eq 0 ]; then
- pkill glusterd;
+ if [ $? -eq 0 ]; then
+ pkill glusterd;
fi
}
@@ -682,11 +739,12 @@ function post_run()
{
set +e;
stop_glusterfs;
- check_and_kill;
- send_results;
+ check_and_kill;
+ post_run_gcov $WORKSPACE_DIR;
+ send_results;
cleanup;
- syscallbench_plot;
- clean_results;
+ syscallbench_plot;
+ clean_results;
}
function take_statedump ()
@@ -717,15 +775,15 @@ function take_statedump ()
function main()
{
echo "In main";
- #translator=$1
+ #translator=$1
trap "post_run" INT TERM EXIT;
- pre_run_cleanup;
+ pre_run_cleanup;
pre_run;
- start_glusterd;
+ start_glusterd;
start_glusterfs;
- take_statedump $LOGDIR/old_dump/;
+ take_statedump $LOGDIR/old_dump/;
run_tests;
- take_statedump $LOGDIR/new_dump/;
+ take_statedump $LOGDIR/new_dump/;
trap - INT TERM EXIT
post_run;
}
@@ -739,4 +797,3 @@ function main()
# fi
_init "$@" && main "$@"
-
diff --git a/sanity/system_light/config b/sanity/system_light/config
index 85bdb76..3acde78 100755
--- a/sanity/system_light/config
+++ b/sanity/system_light/config
@@ -137,3 +137,7 @@ export SYSCALL_PLOT=$TOOL_DIR/syscallbench/syscallben-plot
#tiobench related variables
export TIO_BIN=/opt/qa/tools/tiobench-0.3.3/tiotest
+
+#fsmark related variables
+export SUBDIR_COUNT=4
+export THR_COUNT=4
diff --git a/sanity/system_light/run.sh b/sanity/system_light/run.sh
index b244030..12198a2 100755
--- a/sanity/system_light/run.sh
+++ b/sanity/system_light/run.sh
@@ -30,7 +30,8 @@ _init ()
15.syscallbench
16.tiobench
17.locktests
-18.ioblazer";
+18.ioblazer
+19.fsmark";
}
run_ffsb ()
@@ -354,6 +355,20 @@ run_rpc_coverage ()
fi
}
+run_fsmark ()
+{
+ echo "Executing fsmark"
+ set +x
+ $SCRIPTS_PATH/fs_mark.sh
+ if [ "${?}" -eq 0 ]; then
+ CNT=$((CNT+1))
+ echo $CNT
+ else
+ echo "fsmark failed"
+ echo $CNT
+ fi
+}
+
main ()
{
echo " Changing to the specified mountpoint";
@@ -378,6 +393,7 @@ main ()
run_arequal;
run_syscallbench;
run_tiobench;
+ run_fsmark;
if [ $TYPE != "nfs" ]; then
run_locktests;
fi
diff --git a/sanity/system_light/scripts/fs_mark.sh b/sanity/system_light/scripts/fs_mark.sh
new file mode 100755
index 0000000..53404c5
--- /dev/null
+++ b/sanity/system_light/scripts/fs_mark.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+function main ()
+{
+
+ echo "start: `date +%T`"
+
+ for i in `seq 1 6`
+ do
+ time fs_mark -d . -D SUBDIR_COUNT -t THR_COUNT -S $i 2>>$LOG_FILE 1>>$LOG_FILE
+ if [ $? -ne 0 ]; then
+ echo "end:`date +%T`";
+ return 11;
+ fi
+ done
+
+ echo "end:`date +%T`";
+ return 0;
+}
+
+main "$@";