summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kp@gluster.com>2012-05-23 15:15:51 +0530
committerAnand Avati <avati@redhat.com>2012-05-27 21:47:59 -0700
commitcc5b1f06a8bfd94c669007d27d0e5103a8856dc3 (patch)
tree4ef6cf997f333b265ac6469e55e4da441252764d /xlators
parentfdb85ae8f90ace0d105b81217adac6790fc2c9ae (diff)
glusterd: Replace-brick should create dst brick path only on 'dst' node.
Change-Id: I61e6f8aa44dfef85c7cd98f40b176b796422c4b2 BUG: 824302 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/3415 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-replace-brick.c3
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
index 58829832683..83122cdee6f 100644
--- a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
+++ b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
@@ -462,7 +462,8 @@ glusterd_op_stage_replace_brick (dict_t *dict, char **op_errstr,
goto out;
}
- if (!glusterd_is_rb_ongoing (volinfo)) {
+ if (!glusterd_is_rb_ongoing (volinfo) &&
+ !glusterd_is_local_addr (host)) {
ret = glusterd_brick_create_path (host, path,
volinfo->volume_id,
op_errstr);
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 2ee55b7c111..f2d96e36364 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -201,6 +201,8 @@ get_ip_from_addrinfo (struct addrinfo *addr, char **ip)
return *ip;
}
+/*TODO:FIXME: The function is expected to return a "yes/no" result.
+ change return type to bool.*/
int32_t
glusterd_is_local_addr (char *hostname)
{