Linux NFS development
 help / color / mirror / Atom feed
From: Weston Andros Adamson <dros@primarydata.com>
To: bfields@fieldses.org
Cc: linux-nfs@vger.kernel.org, Weston Andros Adamson <dros@primarydata.com>
Subject: [PATCH pynfs] nfs4.1 server: DSs should have diff server owners
Date: Mon, 10 Feb 2014 11:37:02 -0500	[thread overview]
Message-ID: <1392050222-1470-1-git-send-email-dros@primarydata.com> (raw)

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.

Signed-off-by: Weston Andros Adamson <dros@primarydata.com>
---
 nfs4.1/config.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/nfs4.1/config.py b/nfs4.1/config.py
index 4f91e84..2238aee 100644
--- a/nfs4.1/config.py
+++ b/nfs4.1/config.py
@@ -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"
-- 
1.8.3.4 (Apple Git-47)


             reply	other threads:[~2014-02-10 16:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-10 16:37 Weston Andros Adamson [this message]
2014-02-11 17:08 ` [PATCH pynfs] nfs4.1 server: DSs should have diff server owners J. Bruce Fields

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1392050222-1470-1-git-send-email-dros@primarydata.com \
    --to=dros@primarydata.com \
    --cc=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox