diff options
author | Sanju Rakonde <srakonde@redhat.com> | 2020-06-16 18:03:21 +0530 |
---|---|---|
committer | MOHIT AGRAWAL <moagrawa@redhat.com> | 2020-06-21 04:21:02 +0000 |
commit | c18782bc91bb028fe206996a7ef0075beabdf067 (patch) | |
tree | aba6dfaa2a4f1dfcbd7f5d74957bb1ac9e9d5ada /tests/cluster.rc | |
parent | d55218781876005323d8c146ed4bd73e2146866a (diff) | |
download | glusterfs-c18782bc91bb028fe206996a7ef0075beabdf067.tar.gz glusterfs-c18782bc91bb028fe206996a7ef0075beabdf067.tar.xz glusterfs-c18782bc91bb028fe206996a7ef0075beabdf067.zip |
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 <srakonde@redhat.com>
Diffstat (limited to 'tests/cluster.rc')
-rw-r--r-- | tests/cluster.rc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/cluster.rc b/tests/cluster.rc index 2d826d07e3..96ca722f27 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 } |