summaryrefslogtreecommitdiffstats
path: root/tests/basic/volume-snapshot.t
diff options
context:
space:
mode:
authoranand <anekkunt@redhat.com>2015-07-24 15:48:50 +0530
committerRaghavendra Talur <rtalur@redhat.com>2015-07-28 06:26:44 -0700
commit51f48bc9a41a5e2004d9051ff90517b01626b08f (patch)
tree2b1f59d68e58cf70912a6f4515807e5efc13808d /tests/basic/volume-snapshot.t
parent8d915d196fc591b141bb5267e16453d18dff7955 (diff)
glusterd: glusterd crash due to race between handshake and snapshot remove threads
Issue : glusterd was crashing due to race between handshake thread and snapshot remove RCA : Snapshot thread referring voinfo and same time volinfo is modified during handshake, glusterd was crashing due to this inconsistent data of volinfo . Note: Sending commands without checking cluster status may lead to crash Fix:.Wait for handshake complete/cluster ready before proceeding commands. Change-Id: Iefd986664bd9dd225f0abf8f85476d6afd206914 BUG: 1246432 Signed-off-by: anand <anekkunt@redhat.com> Reviewed-on: http://review.gluster.org/11757 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Diffstat (limited to 'tests/basic/volume-snapshot.t')
-rwxr-xr-xtests/basic/volume-snapshot.t6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/basic/volume-snapshot.t b/tests/basic/volume-snapshot.t
index fb6a73c8953..a5e6d2d1b56 100755
--- a/tests/basic/volume-snapshot.t
+++ b/tests/basic/volume-snapshot.t
@@ -119,12 +119,14 @@ EXPECT 'Started' snapshot_status ${V1}_snap;
TEST kill_glusterd 2
deactivate_snapshots
TEST start_glusterd 2
-sleep 10
+#Wait for glusterd handsahke complete/check status of cluster.
+EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "Success" snapshot_snap_status ${V0}_snap "Brick\ Running" "No"
TEST kill_glusterd 2
activate_snapshots
TEST start_glusterd 2
-sleep 10
+#Wait for glusterd handsahke complete/check status of cluster.
+EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "Success" snapshot_snap_status ${V0}_snap "Brick\ Running" "Yes"
TEST snapshot_exists 1 ${V0}_snap