From 51f48bc9a41a5e2004d9051ff90517b01626b08f Mon Sep 17 00:00:00 2001 From: anand Date: Fri, 24 Jul 2015 15:48:50 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/11757 Tested-by: Gluster Build System Reviewed-by: Atin Mukherjee Tested-by: NetBSD Build System Reviewed-by: Raghavendra Talur --- tests/basic/volume-snapshot.t | 6 ++++-- 1 file 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 -- cgit