summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
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)
{