Re: [nfsv4] Draft is updated following your comments, Thanks//答复: draft-mzhang-nfsv4-sequence-id-calibration-01

Rick Macklem <rick.macklem@gmail.com> Tue, 11 April 2023 00:57 UTC

Return-Path: <rick.macklem@gmail.com>
X-Original-To: nfsv4@ietfa.amsl.com
Delivered-To: nfsv4@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 49E8AC14F73F for <nfsv4@ietfa.amsl.com>; Mon, 10 Apr 2023 17:57:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.096
X-Spam-Level:
X-Spam-Status: No, score=-2.096 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2YuEITd5eRQD for <nfsv4@ietfa.amsl.com>; Mon, 10 Apr 2023 17:57:34 -0700 (PDT)
Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 88E29C151B12 for <nfsv4@ietf.org>; Mon, 10 Apr 2023 17:57:34 -0700 (PDT)
Received: by mail-pg1-x535.google.com with SMTP id h193so3149119pgc.6 for <nfsv4@ietf.org>; Mon, 10 Apr 2023 17:57:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1681174653; x=1683766653; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=6XJEVdfxNadEzsdBRQUbMbGlBP7zUnvHdKMZxugkr7U=; b=dGncCLU3qTaoziddYGLp1+3Upysai/9nyuwMWtvoM5ZuEsWLRfzY86JNXPpl44RYSa P4R1BahGja4h6wiaI9HnWhC5VHJfxVDdP4qJlYIpzo6jo2VX3NcN+bD3FC3W2J287t51 h0po+DYz4IR3bJxBTePestbAsyjY28OxmpHnb+07K/SlXBg+jSmJnJmy2Jf2iJMyOX8d UBqTVLKSTa6iqn78wYGBxIUEiwnRuTBFI8Nmd9wKm8s0AsXOI0Mal93wIy3TsPFWA9Gy H4EGwfFHRl19U75HfXJBDTZRaip2DmulttdDli0KIf41mtsx5ptuWSskS9yDRbinaIqO JpTQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681174653; x=1683766653; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6XJEVdfxNadEzsdBRQUbMbGlBP7zUnvHdKMZxugkr7U=; b=kyHw+iL3QmKXgorpu/LaGCMecaWRnZn0OoO+mxxxiKkhtlhZe69aSrMpGMqUKYFUGt cbMVYjVlzoPipC0qpUGkDpyCjDV1c4KhbDtP3YCHSEVszSVMXEdHq8MUpr56xuFXFpi0 IITDKEiNQLGikY76xQJoeuvFtuXs3HlfeFJWPkQITM4NQkSUA7EfCqGbqPWFPaEAOyBM Gdgq5n05tQmpeGxDP7edXKafT282ceqUx7HZJCY1lE+Zb2fQvi6001lPcf/FU6bcsZii bp5GDZUa1ZUeraks8M2jDXUv5betD0XlCh8vqqXSiWAei4FRPRf5cB0Dhx8MaDVN8G2n wpvg==
X-Gm-Message-State: AAQBX9d2irQ2AYLwHrRh9m8bljTPRk5eamioKyloekY1+5EQ0Xuyaoo+ du8jCplqgZ3rj7iAOkxZzP8zOykvak4ex6FW+w==
X-Google-Smtp-Source: AKy350Z3J/vSYTcgRzMSMnkQNWTzOo1IcfGpmkZrYAOd2ClYmUhcVIB0Bw7lELRyI12STzuUg8AXG1VnGFI6vUFezew=
X-Received: by 2002:a63:4905:0:b0:513:b7a5:cb27 with SMTP id w5-20020a634905000000b00513b7a5cb27mr213865pga.0.1681174653285; Mon, 10 Apr 2023 17:57:33 -0700 (PDT)
MIME-Version: 1.0
References: <83389b42bb0f49509c757cdabd5c6b3f@huawei.com> <CAM5tNy7F9Yf8rJQqy4rOwtcK_FSa+SuRsG=9KenB=mG9Wqv6MA@mail.gmail.com> <CAM5tNy56P0XxrDU==hjocvtBuY9DO2JrOn8PThyfBxRorbW74g@mail.gmail.com> <CAM5tNy6=3JRZTZZH5NW=QHocTd1DOS9HSav+PXnVC=N0_xduxA@mail.gmail.com>
In-Reply-To: <CAM5tNy6=3JRZTZZH5NW=QHocTd1DOS9HSav+PXnVC=N0_xduxA@mail.gmail.com>
From: Rick Macklem <rick.macklem@gmail.com>
Date: Mon, 10 Apr 2023 17:57:23 -0700
Message-ID: <CAM5tNy6x75sprE2Zqkxu5QE3wBFysuOUKj056Uyj9fqHPbkLbg@mail.gmail.com>
To: "yangjing (U)" <yangjing8=40huawei.com@dmarc.ietf.org>
Cc: Thomas Haynes <loghyr@gmail.com>, "nfsv4@ietf.org" <nfsv4@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/Xi69lurXngY0MmfKvzL0kL4AP_Q>
Subject: Re: [nfsv4] Draft is updated following your comments, Thanks//答复: draft-mzhang-nfsv4-sequence-id-calibration-01
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: NFSv4 Working Group <nfsv4.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/nfsv4/>
List-Post: <mailto:nfsv4@ietf.org>
List-Help: <mailto:nfsv4-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 11 Apr 2023 00:57:38 -0000

On Mon, Apr 10, 2023 at 2:20 PM Rick Macklem <rick.macklem@gmail.com> wrote:
>
> On Mon, Apr 10, 2023 at 1:58 PM Rick Macklem <rick.macklem@gmail.com> wrote:
> >
> > On Mon, Apr 10, 2023 at 1:15 PM Rick Macklem <rick.macklem@gmail.com> wrote:
> > >
> > > On Sun, Apr 9, 2023 at 11:39 PM yangjing (U)
> > > <yangjing8=40huawei.com@dmarc.ietf.org> wrote:
> > > >
> > > > The draft is updated as https://www.ietf.org/archive/id/draft-mzhang-nfsv4-sequence-id-calibration-02.txt
> > > Here are a few generic comments about the draft (I know nothing about
> > > detailed formatting, etc).
> > >
> > > 1 - It is my understanding that new operations can only be added to
> > > minor version 2 and not
> > >      minor version 1.
> > > 2 - I largely agree with what Tom Talpey said in his comments. I think
> > > you need to figure out
> > >      how/when the sequenceid is getting messed up.
> > >      Note that it is my understanding that the main purpose of
> > > sessions is to achieve
> > >      "exactly once RPC semantics" (the fact that the reply cache is
> > > bounded in size is a nice
> > >      added feature, but not the principal purpose).
> > >      As such, a sequenceid being misordered implies that "exactly
> > > once" semantics could
> > >      already have been broken by a software bug in the client.
> > >
> > >      You note that the misordered sequenceid could be caused by
> > > "network partitioning".
> > >      In a correct implementation that should not be the case. After a
> > > network partition heals,
> > >      the client should re-send all outstanding RPCs with the same
> > > Session/slot/sequenceid
> > >      as was used in the original RPC request message. These should
> > > succeed (no misordered
> > >      error reply) using cached replies, as required.
> > >      --> If a client's recovery from network partitioning is not doing
> > > this, then it needs to be
> > >            fixed.
> > >      --> As above, if a misordered sequenceid error reply is due to a
> > > client bug, then that
> > >            must be fixed, since "exactly once" semantics may already be broken.
> > > The common client bug that results in a misordered sequenceid error
> > > reply happens when
> > > an in-progress RPC gets interrupted before the RPC reply is processed.
> > > This is not a case
> > > where your suggested extension should be used, since the in-progress
> > > RPC may still be
> > > "in-progress". Although I am not sure there is a 100% correct way for
> > > a client to handle
> > > the need to interrupt an in-progress RPC, marking the session slot as
> > > broken and no
> > > longer using it is the best approach I am aware of. (I suspect you
> > > might be referring to
> > > the Linux client and I cannot comment on how it handles interruption
> > > via signals or
> > > timeouts for session slots, since I am not a Linux client implementor.)
> > >
> > > It sounds like migration might be an exception to the above, but it
> > > should be addressed
> > > specifically (as Tom Talpey notes).
> > >
> > > 3 - If your extension were used by a client, how would the client know
> > > whether or not
> > >      there are still RPC(s) in-progress that have been assigned that
> > > session/slot/sequenceid?
> > An additional comment:
> > - If the client knows that the outstanding RPC request on the
> >   session/slot/sequenceid that got a misordered error reply
> >   is one where "exactly once" semantics is not required,
> >   then I can see that the client implementor might be able to
> >    safely resynchronize the sequenceid.
Oops again. It would be the outstanding RPC request for
which no reply has been received that causes the sequenceid
to be misordered and that is the RPC that cannot require
"exactly once" semantics.

rick
> >   To do this, I do not think your extensions are needed.
> >    If the client issues an RPC that consists of only the
> >    Sequence operation repeatedly, with the sequenceid incremented
> >    by one each attempt after waiting for a reply to the previous
> >    attempt, it should get NFS_OK within a few attempts.
> >    Then the correct sequenceid to be used for the session/slot is known.
> Oops, "known" is probably too strong a word here. Since the cause of
> the misordered sequenceid is not known, I think there is a very low
> probability that an RPC using the session/slot is still in flight and will
> change the sequenceid when processed on the server, causing another
> misordered sequenceid error reply.
>
> rick
>
> >
> > rick
> >
> > >
> > > rick
> > >
> > > > _______________________________________________
> > > > nfsv4 mailing list
> > > > nfsv4@ietf.org
> > > > https://www.ietf.org/mailman/listinfo/nfsv4