Skip to contentSkip to conversation

nfs4.1 server: DSs should have diff server owners

PATCH In review Weston Andros Adamson 2 participants 2 messages Feb 10, 2014 – Feb 11, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nfs4.1 server: DSs should have diff server owners

Use getpid() to generate the minor_id component of the server owner.

Witout this, all DSs are considered to be the same server by NFS clients that detect server trunking, such as the upstream Linux client.

---
 nfs4.1/config.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
nfs4.1/config.py +2 -1
index 4f91e84..2238aee 100644
@@ -3,6 +3,7 @@ from nfs4_const import *
 import nfs4_const
 import nfs4lib
 from copy import deepcopy
+import os
 
 class ConfigAction(Exception):
     pass
@@ -129,7 +130,7 @@ class ServerConfig(object):
               ]
 
     def __init__(self):
-        self.minor_id = 0
+        self.minor_id = os.getpid()
         self.major_id = "PyNFSv4.1"
         self._owner = server_owner4(self.minor_id, self.major_id)
         self.scope = "Default_Scope"
Signature · 1 line
1.8.3.4 (Apple Git-47)
#1 lore raw
Quoted 4 lines · Weston Andros Adamson

Use getpid() to generate the minor_id component of the server owner.

Witout this, all DSs are considered to be the same server by NFS clients that detect server trunking, such as the upstream Linux client.

Applied and pushed out, thanks.--b.

Quoted 30 lines
---
 nfs4.1/config.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
nfs4.1/config.py +2 -1
index 4f91e84..2238aee 100644
@@ -3,6 +3,7 @@ from nfs4_const import *
 import nfs4_const
 import nfs4lib
 from copy import deepcopy
+import os
 
 class ConfigAction(Exception):
     pass
@@ -129,7 +130,7 @@ class ServerConfig(object):
               ]
 
     def __init__(self):
-        self.minor_id = 0
+        self.minor_id = os.getpid()
         self.major_id = "PyNFSv4.1"
         self._owner = server_owner4(self.minor_id, self.major_id)
         self.scope = "Default_Scope"
Signature · 1 line
1.8.3.4 (Apple Git-47)