aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-extended/glusterfs/files/glusterfs-change-default-nfs-port-number.patch
blob: 9d5d7c1f18ab37e6c8a5928c6a7b7a5098530414 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From b8b48d3c4ab92ce167db8137426fad45e938b11b Mon Sep 17 00:00:00 2001
From: Vu Tran <vu.tran@windriver.com>
Date: Wed, 24 Apr 2019 22:50:01 -0400
Subject: [PATCH] glusterfs: change default nfs port number

Currently both native nfs and glusterfs-nfs use NFS well
known port 2049.  This causes native nfs not to be able
to run on the same machine if glusterfs is already running
with the following error:

starting 8 nfsd kernel threads: rpc.nfsd: unable to bind inet TCP
socket: errno 98 (Address already in use) rpc.nfsd: unable to set
any sockets for nfsd
done
starting mountd: done

This error will be seen if there are gluster volumes started.

This patch changes the default glusterfs NFS port from 2049
to 38467.

This patch infact inverses the commit
3bee716c7a740c3cb6adececcea84bac0ba8abaa
upstream https://github.com/gluster/glusterfs.git branch
remotes/origin/release-3.4.

Upstream-Status: Pending

Signed-off-by: Vu Tran <vu.tran@windriver.com>
Signed-off-by: Xulin Sun <xulin.sun@windriver.com>
[Yi: minor adjust to apply the patch on 3.11.1]
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
[Hongzhi: modify patch for release-6.1]
Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
---
 libglusterfs/src/glusterfs/common-utils.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libglusterfs/src/glusterfs/common-utils.h b/libglusterfs/src/glusterfs/common-utils.h
index 0e2ecc7..59237a9 100644
--- a/libglusterfs/src/glusterfs/common-utils.h
+++ b/libglusterfs/src/glusterfs/common-utils.h
@@ -108,7 +108,7 @@ trap(void);
 /* Defining this here as it is needed by glusterd for setting
  * nfs port in volume status.
  */
-#define GF_NFS3_PORT 2049
+#define GF_NFS3_PORT 38467
 
 #define GF_CLIENT_PORT_CEILING 1024
 #define GF_IANA_PRIV_PORTS_START 49152 /* RFC 6335 */
-- 
2.8.1