From patchwork Mon Feb 10 16:37:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weston Andros Adamson X-Patchwork-Id: 3620661 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E77999F39B for ; Mon, 10 Feb 2014 16:37:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1CB6320115 for ; Mon, 10 Feb 2014 16:37:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F354820121 for ; Mon, 10 Feb 2014 16:37:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752783AbaBJQhK (ORCPT ); Mon, 10 Feb 2014 11:37:10 -0500 Received: from mail-ie0-f178.google.com ([209.85.223.178]:45175 "EHLO mail-ie0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752540AbaBJQhH (ORCPT ); Mon, 10 Feb 2014 11:37:07 -0500 Received: by mail-ie0-f178.google.com with SMTP id rl12so434614iec.37 for ; Mon, 10 Feb 2014 08:37:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=TwoWt0MuZhWCziPKOwjYQrdEMapmABSrm5GjxSnHeIk=; b=NFf+N+wStMlngFUlLq5HpQD2hJhIvwSGoOT3zrvg8lV+0VZMLYg6h+KBcJAM2Vph1j qhM1pxBa+CQqSkl2oDw+c1beEuEF+JgqBXoHZmdYHjbZQt8pkPCpoXgzfmAMOrESxQFO 6PBjhB5hVtlPd6FurrSB1/apQQ2UA1hL2SRvkvpGoRtFlP2PSO2xgcuawVWddqyaMy1B s/j6xBe7rA7NK1serHjOaH475T3IOGbuyjRSfz1aT4E8SOLQLUp7UNSppERuxEUZ9Njo UZF15Ur5YudgLORKM1kOcVsnnJFnBFneRAjG7URSgsj9+Jg2B66z8t0vDA/tKOZtCme8 XKug== X-Gm-Message-State: ALoCoQm2CjRm5gScVe/Ip2uS2er7Q5h6p7zovfHozLnUPlTQrNsfkTEys6Bs4ZyFA2REIOWR2ijG X-Received: by 10.42.97.193 with SMTP id p1mr16661485icn.32.1392050226964; Mon, 10 Feb 2014 08:37:06 -0800 (PST) Received: from gavrio.gateway.2wire.net (99-82-247-89.lightspeed.livnmi.sbcglobal.net. [99.82.247.89]) by mx.google.com with ESMTPSA id z5sm43910929igw.0.2014.02.10.08.37.05 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 10 Feb 2014 08:37:06 -0800 (PST) From: Weston Andros Adamson To: bfields@fieldses.org Cc: linux-nfs@vger.kernel.org, Weston Andros Adamson Subject: [PATCH pynfs] nfs4.1 server: DSs should have diff server owners Date: Mon, 10 Feb 2014 11:37:02 -0500 Message-Id: <1392050222-1470-1-git-send-email-dros@primarydata.com> X-Mailer: git-send-email 1.8.3.4 (Apple Git-47) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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"