Re: [netconf] RPC request Timeout

Andy Bierman <andy@yumaworks.com> Mon, 21 March 2022 17:44 UTC

Return-Path: <andy@yumaworks.com>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D3D0A3A115A for <netconf@ietfa.amsl.com>; Mon, 21 Mar 2022 10:44:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.896
X-Spam-Level:
X-Spam-Status: No, score=-1.896 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_PERMERROR=0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks-com.20210112.gappssmtp.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id louvdJHz0y_s for <netconf@ietfa.amsl.com>; Mon, 21 Mar 2022 10:44:40 -0700 (PDT)
Received: from mail-yw1-x112b.google.com (mail-yw1-x112b.google.com [IPv6:2607:f8b0:4864:20::112b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C5B8F3A0B6C for <netconf@ietf.org>; Mon, 21 Mar 2022 10:44:39 -0700 (PDT)
Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-2e612af95e3so52867657b3.9 for <netconf@ietf.org>; Mon, 21 Mar 2022 10:44:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xrzSP40GckTxlGCaCI5gSZ1RO7ycFh9pn0Dd+gkHZxo=; b=wE0P0S2D9Uq2xf28ON4Ip8+mObEDk3alCFQgT2yNhD8sglfl9jL4gGSErz/r7GAeHD KBwTYw3uSyGP02Lx/Vizf3EeKRzQUBHF4nRcA8+OiTEcIOy8blgslbJD5+VBt6yM4dBT nFE2wQqKSYB78MvMxD3tDF7IVg8aq23Kg7hpRMibU1qBPNQS7SqsPlcwV/MqPdUNofZg yOMVK87gbPY1D19zkNNczOmL6OTFjsedf34nbGvY0JWOz6Qcc+63JYeGgfxzUiYUV0lk 2cxQ8gzJ5S6ODJBaNn2qEEtnBkludnw5RNS53Do8AZWnaAag9P1Lw0XKMAn29aIgNJy4 CVSQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xrzSP40GckTxlGCaCI5gSZ1RO7ycFh9pn0Dd+gkHZxo=; b=K4NmgZ0K/sQ3M2c5MzqDQ0v/g5Bn49NlQFfWoWfCpmiR1razQ+1uyFciBmnZnqL0bu dvxUgQ0Q4BsHBHCQRnYE+I9rnxu/OWSa6oCk0ekg2+kCX5gh/xxkVJ2iWIdhWQIKvcO6 B3+xqPN+WScbxgj47cyfqvQQGszzqBYy85H7L35lMjrLbi2aX7dubHlHTRe8BR+jWvpu Wm55FeohsBueY206LjzKmhSuu+blj+jrqR+AB91t0kz2eKnLbxxWzMsxH+KJ7ApPbmtb hu/zdnzPgB2l81ZLQt3SBOUJMqqWCugaX+dBSlj0AaTnziWOv/Q49oIgvjGx3+LoJBdi Lpww==
X-Gm-Message-State: AOAM533bBmQyU8AuoclqNQsLKwYQCjgcXqTdE95sD19W1mIjnt/t8q7a ruqICpCgpYCk6b3x11rVmpPaGCeLHaT2MLY35sxiYA==
X-Google-Smtp-Source: ABdhPJw6JJdI8Ti0nfjJm0/NN7s+FjaQx0gTanLZGyBzZZxBSltB7pspYxo3uN9CMYQ4aj33Z6Mk4PX/dN4hQ6JEYDM=
X-Received: by 2002:a81:a18b:0:b0:2e6:4427:81ec with SMTP id y133-20020a81a18b000000b002e6442781ecmr4799496ywg.159.1647884678369; Mon, 21 Mar 2022 10:44:38 -0700 (PDT)
MIME-Version: 1.0
References: <em6de2e9d8-75b4-4715-b22b-f0c5c4797a78@vanguard> <0100017fac9e342d-bc20b9fd-7ef0-41e5-b83b-766f0159953c-000000@email.amazonses.com> <emb9c5a4f2-282c-4458-8744-b077543f49fa@vanguard>
In-Reply-To: <emb9c5a4f2-282c-4458-8744-b077543f49fa@vanguard>
From: Andy Bierman <andy@yumaworks.com>
Date: Mon, 21 Mar 2022 10:44:27 -0700
Message-ID: <CABCOCHSoitkVmJKXEWPsmp+nrMbVDAs56Lw92RGD8sgO-EEZ7w@mail.gmail.com>
To: Jonathan Hansford <jonathan@hansfords.net>
Cc: Kent Watsen <kent@watsen.net>, "netconf@ietf.org" <netconf@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000e2add605dabe0c6b"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/LH39tKpULN-ZPeJ_Q4uQhViSNbU>
Subject: Re: [netconf] RPC request Timeout
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETCONF WG list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 21 Mar 2022 17:44:45 -0000

On Mon, Mar 21, 2022 at 8:34 AM Jonathan Hansford <jonathan=
40hansfords.net@dmarc.ietf.org> wrote:

> Hi Kent,
>
> I'm grateful for your reply, however I don't believe it addressed my
> questions which relate to aspects of NETCONF error handling for which I
> cannot find guidance in RFC 6241. I think what I am looking for is any
> guidance from existing implementations, if people are willing to share.
>
> 1) How should a client behave if it doesn't receive an <rpc-reply> to an
> <rpc> request? Is the assumption that, since the transport protocol
> "provides reliable, sequenced data delivery", the server has failed and the
> session should be terminated, or should the client retry? If the latter,
> for how long should it wait before retrying? Should it retry with the
> same message-id? And how many times should it try to send the <rpc>
> request before terminating and attempting to re-establish the session?
>
>
The client should (usually) timeout after a configured amount of time.
yangcli-pro uses a default of 30 seconds.
https://www.yumaworks.com/pub/latest/cli/yumapro-cli-reference.html#timeout



> 2) If the server receives a duplicate <rpc> request with the same
> message-id, how should it behave? Should it resend its previous
> <rpc-reply>? Respond as though it were a new request? What if other clients
> have managed to send <rpc> requests in the meantime that have e.g. changed
> one of the server's configuration datastores?
>

The netconfd-pro server just makes sure a message-id attribute is present.
It ignores the value and just returns all attributes for this requirement

      If additional attributes are present in an <rpc> element, a NETCONF

   peer MUST return them unmodified in the <rpc-reply> element.  This
   includes any "xmlns" attributes.


This sentence implies the server should reuse any prefix mappings
in xmlns attributes passed by the client. It has to (at least)
not conflict with them.




> 3) If the client is pipelining, is there a maximum number of additional
> <rpc> requests one might typically expect it to send while awaiting an
> <rpc-reply>?
>
>
A small number (like 3), but this is really implementation specific, so who
knows.



> 4) What should a client do if it receives an <rpc-reply> with the wrong
> message-id? Should it terminate and re-establish the session?
>
>

Wrong or just late?
yangcli-pro just drops the message and prints an error message in both
cases.



> Thanks,
>
> Jonathan
>


Andy


>
> On 21/03/2022 13:15:23, "Kent Watsen" <kent@watsen.net> wrote:
>
> Hi Jonathan,
>
> On Mar 21, 2022, at 4:59 AM, Jonathan Hansford <
> jonathan=40hansfords.net@dmarc.ietf.org> wrote:
>
> Hi,
>
> back in 2004, V. Sarma asked (see Pipelining and Timeout queries
> <https://mailarchive.ietf.org/arch/msg/netconf/h_vSQNr9YY2ewAQQHudNJaTCpns/>
> ):
>
> Once the netconf manager sends a rpc request to the managed device, how
> long should it wait for the rpc-reply?
>
> Can the netconf manager time-out after a specified time interval?
>
> I know this is a basic question, but it doesn't appear it was ever
> answered. So, can anyone advise what the typical strategies are:
> When the client doesn't receive an rpc-reply (e.g. time interval to retry,
> number of retries, presumably followed by closing the session if it is
> still open)?
> When the server receives a duplicate rpc request (e.g. reply based on
> latest config and state)?
>
>
> I'm unaware of the client-behavior being defined but, in general, I expect
> server-interaction to be fairly responsive (seconds, not minutes).
> Notably, the undefined expectation is that the server will ACK an
> <edit-config> or <commit> immediately after validating the input but
> *before* applying the update (e.g., to the data plane), which may take
> minutes.  The opstate-reqs draft
> <https://datatracker.ietf.org/doc/html/draft-ietf-netmod-opstate-reqs> discussed
> asynchronous responses, but the WG didn't act on it...instead an ability to
> compare datastores to detect what didn't get applied in RFC 9144
> <https://datatracker.ietf.org/doc/rfc9144/>.
>
> Kent // contributor
>
>
>
>
>
>
> Thanks,
>
> Jonathan
> _______________________________________________
> netconf mailing list
> netconf@ietf.org
> https://www.ietf.org/mailman/listinfo/netconf
>
>
> _______________________________________________
> netconf mailing list
> netconf@ietf.org
> https://www.ietf.org/mailman/listinfo/netconf
>