From 76a83f98b78a0bdf29bbb0f8e4c9ab74dae52be4 Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Thu, 9 Nov 2017 22:42:22 +0530 Subject: tests: fix bug-1483058-replace-brick-quorum-validation.t spurious failure Change-Id: I04c35305bfb663eabbf715eee78695adfd4a2d20 BUG: 1511310 Signed-off-by: Atin Mukherjee --- tests/cluster.rc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/cluster.rc') diff --git a/tests/cluster.rc b/tests/cluster.rc index c1ff8ab5b74..e258b586847 100644 --- a/tests/cluster.rc +++ b/tests/cluster.rc @@ -142,6 +142,16 @@ function peer_count() { $CLI_1 peer status | grep 'Peer in Cluster (Connected)' | wc -l } +function attempt_replace_brick { + local cli_no=$1 + local vol=$2; + local src_brick=$3; + local dst_brick=$4; + + eval \$CLI_$cli_no volume replace-brick $vol $src_brick $dst_brick commit force; + echo $? +} + function cluster_rebalance_status_field { #The rebalance status can be up to 3 words, (e.g.:'fix-layout in progress'), hence the awk-print $7 thru $9. #But if the status is less than 3 words, it also prints the next field i.e the run_time_in_secs.(e.g.:'completed 3.00'). -- cgit