summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c4
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-pmap.c4
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.h2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd3_1-mops.c2
-rwxr-xr-xxlators/mount/fuse/utils/mount_glusterfs.in7
5 files changed, 6 insertions, 13 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index e22f0e40394..7e5cddac88d 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -77,7 +77,7 @@ glusterd_handle_friend_req (rpcsvc_request_t *req, uuid_t uuid,
uuid_unparse (uuid, uuid_str);
uuid_parse (uuid_str, friend_uuid);
if (!port)
- port = 6969; // TODO: use define values.
+ port = GF_DEFAULT_BASE_PORT;
ret = glusterd_remote_hostname_get (req, rhost, sizeof (rhost));
ret = glusterd_friend_find (uuid, rhost, &peerinfo);
@@ -156,7 +156,7 @@ glusterd_handle_unfriend_req (rpcsvc_request_t *req, uuid_t uuid,
glusterd_friend_req_ctx_t *ctx = NULL;
if (!port)
- port = 6969; //TODO: use define'd macro
+ port = GF_DEFAULT_BASE_PORT;
ret = glusterd_friend_find (uuid, hostname, &peerinfo);
diff --git a/xlators/mgmt/glusterd/src/glusterd-pmap.c b/xlators/mgmt/glusterd/src/glusterd-pmap.c
index 3ea09aad965..67d10bfa65e 100644
--- a/xlators/mgmt/glusterd/src/glusterd-pmap.c
+++ b/xlators/mgmt/glusterd/src/glusterd-pmap.c
@@ -78,8 +78,8 @@ pmap_registry_new (void)
pmap->ports[i].type = GF_PMAP_PORT_FOREIGN;
}
- pmap->base_port = 6971; /* 6969 default for tcp, 6970 for IB */
- pmap->last_alloc = 6971;
+ pmap->base_port = GF_DEFAULT_BASE_PORT + 2;
+ pmap->last_alloc = GF_DEFAULT_BASE_PORT + 2;
return pmap;
}
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h
index ac983760130..7763962cdd1 100644
--- a/xlators/mgmt/glusterd/src/glusterd.h
+++ b/xlators/mgmt/glusterd/src/glusterd.h
@@ -193,7 +193,7 @@ enum glusterd_vol_comp_status_ {
};
#define GLUSTERD_DEFAULT_WORKDIR "/etc/glusterd"
-#define GLUSTERD_DEFAULT_PORT 6969
+#define GLUSTERD_DEFAULT_PORT GF_DEFAULT_BASE_PORT
#define GLUSTERD_INFO_FILE "glusterd.info"
#define GLUSTERD_VOLUME_DIR_PREFIX "vols"
#define GLUSTERD_PEER_DIR_PREFIX "peers"
diff --git a/xlators/mgmt/glusterd/src/glusterd3_1-mops.c b/xlators/mgmt/glusterd/src/glusterd3_1-mops.c
index 858eb33f946..cc2f84d380c 100644
--- a/xlators/mgmt/glusterd/src/glusterd3_1-mops.c
+++ b/xlators/mgmt/glusterd/src/glusterd3_1-mops.c
@@ -757,7 +757,7 @@ glusterd3_1_probe (call_frame_t *frame, xlator_t *this,
goto out;
ret = dict_get_int32 (dict, "port", &port);
if (ret)
- port = 6969;
+ port = GF_DEFAULT_BASE_PORT;
ret = glusterd_friend_find (NULL, hostname, &peerinfo);
diff --git a/xlators/mount/fuse/utils/mount_glusterfs.in b/xlators/mount/fuse/utils/mount_glusterfs.in
index e1acb6eb42a..473ecace95e 100755
--- a/xlators/mount/fuse/utils/mount_glusterfs.in
+++ b/xlators/mount/fuse/utils/mount_glusterfs.in
@@ -82,12 +82,10 @@ start_glusterfs ()
if [ -n "$transport" ]; then
cmd_line=$(echo "$cmd_line \
--volfile-server=$server_ip \
---volfile-server-port=$server_port \
--volfile-server-transport=$transport");
else
cmd_line=$(echo "$cmd_line \
--volfile-server=$server_ip \
---volfile-server-port=$server_port");
fi
else
cmd_line=$(echo "$cmd_line --volfile=$volfile_loc");
@@ -175,11 +173,6 @@ main ()
[ -r "$volfile_loc" ] || {
server_ip=$(echo "$volfile_loc" | sed -n 's/\([^\:]*\).*/\1/p');
- server_port=$(echo "$volfile_loc" | sed -n 's/.*:\([^ ]*\).*/\1/p');
- [ -n "$server_port" ] || {
- server_port="6996";
- }
-
volfile_loc="";
}
# following line is product of love towards sed