From e8c13fa9bd2a838335e923ec48bcb66e2cb5861d Mon Sep 17 00:00:00 2001 From: Avra Sengupta Date: Thu, 29 May 2014 11:59:30 +0000 Subject: glusterd: Fetching the txn_id before performing glusterd_op_bricks_select in glusterd_brick_op() In glusterd_brick_op(), the txn_id mut be fetched before failing the transaction for any other reason. Moving the fetching of txn_id to the beginning of the function. Also initializing txn_id to priv->global_txn_id where it wasn't initialized. Change-Id: I44d7daa444f00a626f24670c92324725f6c5fb35 BUG: 1102656 Signed-off-by: Avra Sengupta Reviewed-on: http://review.gluster.org/7926 Tested-by: Gluster Build System Reviewed-by: Atin Mukherjee Reviewed-by: Krishnan Parthasarathi Tested-by: Krishnan Parthasarathi --- tests/bugs/bug-1102656.t | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/bugs/bug-1102656.t (limited to 'tests/bugs') diff --git a/tests/bugs/bug-1102656.t b/tests/bugs/bug-1102656.t new file mode 100644 index 00000000000..18f2b93eb49 --- /dev/null +++ b/tests/bugs/bug-1102656.t @@ -0,0 +1,20 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc + +cleanup; + +TEST glusterd +TEST pidof glusterd +TEST $CLI volume create $V0 replica 2 $H0:$B0/brick0 $H0:$B0/brick1 +TEST $CLI volume start $V0 +EXPECT_WITHIN $PROCESS_UP_TIMEOUT 'Started' volinfo_field $V0 'Status'; + +TEST $CLI volume top $V0 open +TEST ! $CLI volume top $V0 open brick $H0:/tmp/brick +TEST $CLI volume top $V0 read + +TEST $CLI volume status +TEST $CLI volume stop $V0 +EXPECT_WITHIN $PROCESS_UP_TIMEOUT 'Stopped' volinfo_field $V0 'Status'; +cleanup; -- cgit