summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kp@gluster.com>2012-05-23 15:15:51 +0530
committerVijay Bellur <vijay@gluster.com>2012-05-28 10:45:12 -0700
commit063679d8fbeaad7034db33f1dc4cb1713754cb3a (patch)
tree23c5e20215b9a58b7d9eb43389615526b64e5c39 /xlators/mgmt/glusterd
parenta1904d84f7a62f0defe195d3c316fbe95adb51e4 (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/3457 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd')
-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 b75fad18347..e5cfdda301b 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)
{