From e4811fd339dc6c77fb81c1bef3466a521c8c134b Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Tue, 29 Jan 2013 22:58:17 +0530 Subject: Tests: util to check if replace brick completed Change-Id: I7748395395454765a35e34611d11f58dd4ef3efb BUG: 857549 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/4450 Reviewed-by: Anand Avati Tested-by: Anand Avati --- tests/volume.rc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests/volume.rc') diff --git a/tests/volume.rc b/tests/volume.rc index 2a2b32744..935e50390 100644 --- a/tests/volume.rc +++ b/tests/volume.rc @@ -168,3 +168,17 @@ function gf_rm_file_and_gfid_link { rm -f $(gf_get_gfid_backend_file_path $brickpath $filepath_in_brick) rm -f "$brickpath/$filepath_in_brick" } + + +function gd_is_replace_brick_completed { + local host=$1 + local vol=$2 + local src_brick=$3 + local dst_brick=$4 + $CLI volume replace-brick $vol $src_brick $dst_brick status | grep -i "Migration complete" + if [ $? -eq 0 ]; then + echo "Y" + else + echo "N" + fi +} -- cgit