From c18782bc91bb028fe206996a7ef0075beabdf067 Mon Sep 17 00:00:00 2001 From: Sanju Rakonde Date: Tue, 16 Jun 2020 18:03:21 +0530 Subject: glusterd: add-brick command failure Problem: add-brick operation is failing when replica or disperse count is not mentioned in the add-brick command. Reason: with commit a113d93 we are checking brick order while doing add-brick operation for replica and disperse volumes. If replica count or disperse count is not mentioned in the command, the dict get is failing and resulting add-brick operation failure. fixes: #1306 Change-Id: Ie957540e303bfb5f2d69015661a60d7e72557353 Signed-off-by: Sanju Rakonde --- tests/cluster.rc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tests/cluster.rc') diff --git a/tests/cluster.rc b/tests/cluster.rc index 2d826d07e39..96ca722f273 100644 --- a/tests/cluster.rc +++ b/tests/cluster.rc @@ -11,7 +11,7 @@ function launch_cluster() { define_backends $count; define_hosts $count; define_glusterds $count $2; - define_clis $count; + define_clis $count $3; start_glusterds; } @@ -134,8 +134,13 @@ function define_clis() { lopt1="--log-file=$logdir/$logfile1" - eval "CLI_$i='$CLI --glusterd-sock=${!b}/glusterd/gd.sock $lopt'"; - eval "CLI$i='$CLI --glusterd-sock=${!b}/glusterd/gd.sock $lopt1'"; + if [ "$2" == "-NO_FORCE" ]; then + eval "CLI_$i='$CLI_NO_FORCE --glusterd-sock=${!b}/glusterd/gd.sock $lopt'"; + eval "CLI$i='$CLI_NO_FORCE --glusterd-sock=${!b}/glusterd/gd.sock $lopt1'"; + else + eval "CLI_$i='$CLI --glusterd-sock=${!b}/glusterd/gd.sock $lopt'"; + eval "CLI$i='$CLI --glusterd-sock=${!b}/glusterd/gd.sock $lopt1'"; + fi done } -- cgit