diff options
author | anand <anekkunt@redhat.com> | 2015-07-24 15:48:50 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2015-07-29 20:50:37 -0700 |
commit | 62ba572f12d3300cec70a68d959d16a9a74023dd (patch) | |
tree | 7f132f84dcc45db29d0aa1923169503d5be02fd8 | |
parent | cc2ebbd7f5a043cb953521bb9d65ddc3235cae43 (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.
Back port of :
>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>
>(cherry picked from commit 51f48bc9a41a5e2004d9051ff90517b01626b08f)
Change-Id: I4ca707f84544ba9e4e3ea77752c6576af8572f0c
BUG: 1247917
Reviewed-on: http://review.gluster.org/11787
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
-rwxr-xr-x | tests/basic/volume-snapshot.t | 6 |
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 |