From e80daecc3dd3023f010c785ff0e238fc92214477 Mon Sep 17 00:00:00 2001 From: Avra Sengupta Date: Tue, 6 May 2014 04:19:48 +0000 Subject: glusterd: Use a calloc-ed copy of txn_id for glusterd_do_replace_brick As glusterd_do_replace_brick() is spawned through gf_timer_call_after(), by the time it's called the event is freed, and the txn_id is lost. Hence using a calloc-ed copy, which will be freed as a part of rb_ctx dict. Change-Id: I3e309fe1a7ba96ad1d1ce01f4d2aa18178f59244 BUG: 1095097 Signed-off-by: Avra Sengupta Reviewed-on: http://review.gluster.org/7686 Reviewed-by: Krishnan Parthasarathi Tested-by: Gluster Build System Reviewed-by: Kaushal M --- tests/bugs/bug-1095097.t | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 tests/bugs/bug-1095097.t (limited to 'tests') diff --git a/tests/bugs/bug-1095097.t b/tests/bugs/bug-1095097.t new file mode 100755 index 00000000000..9f9db7a3df5 --- /dev/null +++ b/tests/bugs/bug-1095097.t @@ -0,0 +1,21 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc + +cleanup; +TEST glusterd; +TEST pidof glusterd; +TEST $CLI volume info; + +TEST $CLI volume create $V0 $H0:$B0/brick1 $H0:$B1/brick1; +EXPECT 'Created' volinfo_field $V0 'Status'; + +TEST $CLI volume start $V0; +EXPECT 'Started' volinfo_field $V0 'Status'; + +TEST $CLI volume profile $V0 start +TEST $CLI volume profile $V0 info +TEST $CLI volume replace-brick $V0 $H0:$B0/brick1 $H0:$B0/brick2 start +TEST $CLI volume replace-brick $V0 $H0:$B0/brick1 $H0:$B0/brick2 status + +cleanup; -- cgit