From 82684f1efeb1685a1c794c1c875e3ac21f810481 Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Thu, 12 Feb 2015 18:59:35 +0530 Subject: snapshot: Handshake with glusterd is not proper If a snap is activated or deactivated, when a node is down, it is not retrieving the data properly during the handshake of glusterd With this patch, a version check will made when a glusterd is started running. If there is a mismach in version, then peers will exchange the healed data. Change-Id: I8bd2a347723db2194d3fa73295878b4dd2e9be5d BUG: 1122377 Signed-off-by: Mohammed Rafi KC Reviewed-on: http://review.gluster.org/9664 Tested-by: Gluster Build System Reviewed-by: Avra Sengupta Reviewed-by: Rajesh Joseph Tested-by: NetBSD Build System Reviewed-by: Kaushal M --- tests/snapshot.rc | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'tests/snapshot.rc') diff --git a/tests/snapshot.rc b/tests/snapshot.rc index 7fe9b39cd7c..f2ff047a8ea 100644 --- a/tests/snapshot.rc +++ b/tests/snapshot.rc @@ -307,6 +307,33 @@ function snapshot_status() } +#Check the different status of a particular snapshot +#Arg1 : +#Arg2 : +#Arg3 : +function snapshot_snap_status() +{ + + local snap=$1; + local cli=$CLI_1; + local field=$2; + local expected=$3; + if [ "$cli" = "" ]; then + cli=$CLI + fi + for i in $($cli snapshot status $snap | grep "$field" | \ + cut -d ':' -f2 | awk '{print $1}') ; + do + if [ "$i" != "$expected" ]; then + echo "Failed" + return 1; + fi; + done; +echo "Success" +return 0; +} + + # TODO: Cleanup code duplication function volinfo_field() { -- cgit