summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2011-10-13 17:29:34 +0530
committerVijay Bellur <vijay@gluster.com>2011-10-17 01:49:57 -0700
commit7f8d2e19bb09cb49a19f835bd69b03612a1f007e (patch)
tree2571da8e88cd101fc64bc0cbe9c89d73cc9922b4 /xlators
parent90d691d049420f712f5bd1898c75cc66edd1b315 (diff)
mgmt/glusterd: send the duplicate brick info to the cli
suppose one gives create volume from a peer whose bricks are hostname:/a/b hostname:/a/b/c, then send that error information to the cli. Change-Id: Ic2149647f753fcf9218e468f13c52d0fc013a5d3 BUG: 2803 Reviewed-on: http://review.gluster.com/582 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c10
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c2
2 files changed, 8 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index a4af71e3bc1..552998ad058 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -1000,8 +1000,9 @@ glusterd_handle_create_volume (rpcsvc_request_t *req)
&tmpvolinfo, &tmpbrkinfo);
if (!ret) {
ret = -1;
- snprintf (err_str, sizeof (err_str), "Brick: %s:%s, %s"
- " in the arguments mean the same",
+ snprintf (err_str, sizeof (err_str), "Brick: %s:%s and "
+ "Brick: %s have overlapping export directories"
+ " from the same peer",
tmpbrkinfo->hostname, tmpbrkinfo->path,
brick);
goto out;
@@ -1422,8 +1423,9 @@ brick_val:
&tmpvolinfo, &tmpbrkinfo);
if (!ret) {
ret = -1;
- snprintf (err_str, sizeof (err_str), "Brick: %s:%s, %s"
- " in the arguments mean the same",
+ snprintf (err_str, sizeof (err_str), "Brick: %s:%s and "
+ "Brick: %s have overlapping export directories"
+ " from the same peer",
tmpbrkinfo->hostname, tmpbrkinfo->path,
brick);
goto out;
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 1410af3225d..e2ab6d38bab 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -738,6 +738,7 @@ glusterd_volume_brickinfo_get (uuid_t uuid, char *hostname, char *path,
"given path %s lies"
" within %s", path,
brickiter->path);
+ *brickinfo = brickiter;
break;
}
} else
@@ -747,6 +748,7 @@ glusterd_volume_brickinfo_get (uuid_t uuid, char *hostname, char *path,
" %s", brickiter->path,
path);
ret = 0;
+ *brickinfo = brickiter;
break;
}
}