summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshish Pandey <aspandey@redhat.com>2015-06-16 15:18:50 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2015-07-06 23:33:22 -0700
commit3e1866aee751a8e7870cdce5b171a9007029e63c (patch)
tree53d96e7e1948d16572221939203645ec6b83120e
parentcd43a3e15ee2d0f551740bf8d15a45f1d1f17e96 (diff)
glusterd: Correction in Error message for disperse
volume create Problem: If all the bricks are on same server and creating "disperse" volume without using "force", it throws a failure message mentioning "replicate" as volume. Solution: Adding failure message for disperse volume too Change-Id: I9e466b1fe9dae8cf556903b1a2c4f0b270159841 BUG: 1232183 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/11250 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-ops.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
index 26650934026..fbcb032d549 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
@@ -96,7 +96,7 @@ glusterd_check_brick_order(dict_t *dict, char *err_str)
const char failed_string[2048] = "Failed to perform brick order "
"check. Use 'force' at the end of the command"
" if you want to override this behavior. ";
- const char found_string[2048] = "Multiple bricks of a replicate "
+ const char found_string[2048] = "Multiple bricks of a %s "
"volume are present on the same server. This "
"setup is not optimal. Use 'force' at the "
"end of the command if you want to override "
@@ -243,7 +243,12 @@ check_failed:
found_bad_brick_order:
gf_msg (this->name, GF_LOG_INFO, 0,
GD_MSG_BAD_BRKORDER, "Bad brick order found");
- snprintf (err_str, sizeof (found_string), found_string);
+ if (type == GF_CLUSTER_TYPE_DISPERSE) {
+ snprintf (err_str, sizeof (found_string), found_string, "disperse");
+ } else {
+ snprintf (err_str, sizeof (found_string), found_string, "replicate");
+ }
+
ret = -1;
out:
ai_list_tmp2 = NULL;