Re: [netconf] RESTCONF support in private candidates draft

Andy Bierman <andy@yumaworks.com> Tue, 19 March 2024 00:24 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 3ED6AC1E9C94 for <netconf@ietfa.amsl.com>; Mon, 18 Mar 2024 17:24:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.105
X-Spam-Level:
X-Spam-Status: No, score=-2.105 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, HTML_MESSAGE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks.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 LiJl4RR4rLex for <netconf@ietfa.amsl.com>; Mon, 18 Mar 2024 17:24:52 -0700 (PDT)
Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) (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 17A0DC14F680 for <netconf@ietf.org>; Mon, 18 Mar 2024 17:24:52 -0700 (PDT)
Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-29a8911d11cso2781188a91.1 for <netconf@ietf.org>; Mon, 18 Mar 2024 17:24:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks.com; s=google; t=1710807891; x=1711412691; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=X/88FW29wk/iNvjcvOqqvndj/U33tytogHgTAmSlYaU=; b=s6oTqmrZTThyq6yGBIJ04699zK+fjvOuWyCmUcFRQ9PIQgvlytER9j9UE7iDaQDBSN WyazFv+wA4nBLYWVSvp+a/IMspz/9JQ7w/M1+s2FqZgUt/Zsy3oaY16tTp2rtcO5FfOq NaEeSvsfRBETi8Gql4YGv6vBqrYLksptxTVjt3XGu5/fnyILAKKTnzVzrWfb3wgbbzVw lW3lpO5a89e+0UCYwaZKFyl80Sh3+9qyizoMOxFoS+CYPejrEEqgFx0EajtvtbdNyMnF 7UqFp/mqzFuYTfFBPRTlm+AsbdmM8JMoe9kqEkZLs6FsjlxwRuC+oSeyQ6XogRYxgsng gjjg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710807891; x=1711412691; h=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=X/88FW29wk/iNvjcvOqqvndj/U33tytogHgTAmSlYaU=; b=LTK/+JGeQ+s00+1UKfXxrH1veYHoXADjVRVz+OjCyBtJsKuHyR3FLJmpJkgCGk3Phh YqlFAoAFslDm0wqieeCPw58J32EQ2RLaenoW3Jpq1Xsv7Am4N7A66FOiXDCQcXAgN2y/ kPCv+IU2yfXsyUU1GIoJy5hToxN75lAWIUbX+hSahwTAJvGh53WvviuM1hoFbgGK+pwN yO2mIbuhOw3cXX0M+bsnpG7ibwTuQApn9scwLxB3RbyZG+bDYRTIDHa2jlVk3yG5ubyS KvSGLfKu+HXwTb3EJLwGiGOq8l0VPjLgaK3F7RObW/OyD8LsVayGuKFYo9dsIbMmpltP Dj9g==
X-Forwarded-Encrypted: i=1; AJvYcCVqhqjfTi7BigVgQdxYH86l5z6ya1wr3+DHDtBZJRWKIHqaBYQEp8qfvy1pHK1cREQAqCm3WKUN4W8QC5Va5Srs
X-Gm-Message-State: AOJu0Yygu9sglAkRG0Ge9XTmkoajG1SqZT0RtYKieVmdhAkjo6NWh1tb KuL5m/MYtxBtsfbsgIK4Ienzi1L2qpkDgo5leJyN0pkFyDxa10VP2HXqk6tm65dSbUCgvpbcyCe hGCJ8TP4jswll8MiUtmIqIK/dYJfrEXDKJAku9bMBNtxqi6h/
X-Google-Smtp-Source: AGHT+IFjLQsbbtZbmDHzR2aZmcjnPvHMedASNmczR81AViv5bTjDt9iJ0WQ+GekEKZKASGTXygAGpSL43D6BnD+YGOY=
X-Received: by 2002:a17:90a:8c16:b0:29d:32cf:aa6c with SMTP id a22-20020a17090a8c1600b0029d32cfaa6cmr10448184pjo.39.1710807891451; Mon, 18 Mar 2024 17:24:51 -0700 (PDT)
MIME-Version: 1.0
References: <58EBA620-2449-4A0C-8A53-41DB5113D9D5@cisco.com> <CABCOCHTCftFmvK8p1zQBR74Hs5QauakX_LeG8CASxdzxqt+Q0g@mail.gmail.com> <0100018d8aa0bb70-aa305423-1846-4f81-915f-8815f7b9d169-000000@email.amazonses.com> <CABCOCHQy2fVsXu6S9_jxAQj8ZPhDv1nnZjSpOFv98FNnd8TAOQ@mail.gmail.com> <4B2A8C69-7C79-4B88-8D4E-D0FE7CACE024@cisco.com>
In-Reply-To: <4B2A8C69-7C79-4B88-8D4E-D0FE7CACE024@cisco.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Mon, 18 Mar 2024 17:24:39 -0700
Message-ID: <CABCOCHTA_FdBptA7jQWMtDtckum=7cMza042YKM2a4JeVJrZAg@mail.gmail.com>
To: "Robert Wills (rowills)" <rowills@cisco.com>
Cc: Kent Watsen <kent+ietf@watsen.net>, "netconf@ietf.org" <netconf@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000a63eb70613f88052"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/Nq21t4qgkWrhg6DWS-LU-9RWdOA>
Subject: Re: [netconf] RESTCONF support in private candidates draft
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.39
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: Tue, 19 Mar 2024 00:24:56 -0000

Hi,

On Sat, Mar 16, 2024 at 11:21 PM Robert Wills (rowills) <rowills@cisco.com>
wrote:

> Kent, Andy,
>
>
>
> Thank you both for taking the time to provide feedback.
>
>
>
> In draft-ietf-netconf-privcand-02, which was recently published, I have
> attempted to incorporate this feedback.
>
>
>
> Summarising:
>
>    1. With RESTCONF, the private candidate is tied to the client, using
>    the client identity as described in RFC 8040 Section 2.5
>    2. When the private candidate datastore is explicitly referenced in
>    the request, then edits are made to the client’s private candidate and are
>    NOT committed. The client must execute an ietf-netconf:commit operation to
>    commit them.
>    3. When the private candidate datastore is not explicitly referenced
>    in the request, changes are made in a private candidate and the private
>    candidate is instantly committed.
>
>
>

I need to study the details more, but I prefer:

-  a YANG-based solution, meaning the entire management feature is defined
in YANG.
   That way, different protocols that map YANG to operations can be used
without any special
   standards or special code (on the client or server).  This allows NC,
RC, and CC to provide
   consistent behavior, and do it automatically with minimal development
costs.

-   a solution that is not tied to sessions at all
    - client must create and later delete a private candidate (with
configurable timeout before auto-deleted)
    - many tools use multiple sessions to get edits into <candidate>.   The
current auto-clean only applies
      if <candidate> is locked.

-   must be one mandatory-to-implement solution, not several optional
server variants
    - OK to add-on optional functionality using YANG features

-  must not get in the way of implementations the way NETCONF
'error-option' did.
   Any client control over behavior must be optional with YANG features

I am not sure how the draft handles auto-deletions.
  - explicit edit causes existing nodes in a YANG choice to be replaced
with a new case
  - explicit edit causes when-stmt to change to 'false' for other data nodes



Andy


The bulk of the changes are in Section 4.4.3, with small changes elsewhere
> to make it hang together.
>
>
>
> Elaborating on each of the points above:
>
>
>
> (1) Private candidate is tied to the client
>
> On re-reading the draft, I think it should be more explicit that it’s tied
> to the client identity from 8040. I will make this change in -03.
>
>
>
> (2) Privcand datastore explicitly referenced in the request
>
> Kent and Andy, you both agree that a candidate datastore that’s instantly
> committed is not useful. Hopefully what I’ve now written (in Section
> 4.4.3.2) provides something more useful in implementations that support
> privcand.
>
>
>
> (3) Privcand datastore not explicitly referenced
>
> In this case, the private candidate datastore IS automatically committed.
> This is for backwards compatibility with clients that aren’t aware of
> private candidates: they are expecting their changes to be committed. Kent,
> I hope this captures the spirit of what you were after?
>
>
>
> Further comments are very welcome.
>
>
>
> Many thanks,
>
> Robert.
>
>
>
> *From: *Andy Bierman <andy@yumaworks.com>
> *Date: *Thursday, 8 February 2024 at 22:02
> *To: *Kent Watsen <kent+ietf@watsen.net>
> *Cc: *"Robert Wills (rowills)" <rowills@cisco.com>, "netconf@ietf.org" <
> netconf@ietf.org>
> *Subject: *Re: [netconf] RESTCONF support in private candidates draft
>
>
>
>
>
>
>
> On Thu, Feb 8, 2024 at 1:30 PM Kent Watsen <kent+ietf@watsen.net> wrote:
>
> Robert, Andy, et. al.,
>
>
>
>
>
> On Feb 6, 2024, at 12:35 PM, Andy Bierman <andy@yumaworks.com> wrote:
>
>
>
>
>
>
>
> On Mon, Feb 5, 2024 at 4:32 AM Robert Wills (rowills) <rowills=
> 40cisco.com@dmarc.ietf.org> wrote:
>
> Hi Netconf Working Group,
>
>
>
> After James and I presented an update on draft-ietf-netconf-privcand-01 at
> IETF 118, Kent asked about RESTCONF support in the draft, and specifically
> about the lifecycle of a private candidate when using RESTCONF. This email
> is to follow up on that question, and to ask the Working Group whether
> RESTCONF support should be kept in this draft.
>
> Currently, the draft states that
>
> "When a private candidate is used by RESTCONF, it exists only for the
> duration of the RESTCONF request." (draft-ietf-netconf-privcand-01 Section
> 2.3).
>
> Later, the draft expands on this by stating that changes made to a private
> candidate will be committed as part of the same request:
>
> "When the server advertises the :private-candidate capability and the
> client does not explicitly reference a datastore in their request, all
> edits are made to a new private candidate, and the private candidate is
> committed. This is analagous to the behavior of RESTCONF when the
> :candidate capability is specified by the server.
>
> "When the private-candidate datastore is explicitly referenced, edits are
> made to a new private candidate and the private candidate is committed."
>
> (draft-ietf-netconf-privcand-01 Section 4.4.3)
>
> It would be better for this draft to define nothing than to define it this
> way.
>
> But all is not lost.  This is an opportunity to fix it.
>
>
>
> This wording is intended to preserve the high-level goal of private
> candidates, namely allowing multiple clients to make independent
> configuration changes, and to behave similarly to RESTCONF's current
> behavior for the (shared) candidate. (RESTCONF RFC 8040 Section 1.4: "The
> candidate MUST be automatically committed to running immediately after each
> successful edit").
>
> RFC 8040 should’ve just said to use the operations supported by the
> various NETCONF’s capabilities under the {+restconf}/operations resource.
>
>
>
>
>
> I disagree.
>
> RESTCONF does not have sessions.
>
> NETCONF :candidate is session-specific.
>
> No changes to the existing URI s (e.g. /restconf/data) should be made.
>
>
>
>
>
> As far as I'm aware, RESTCONF doesn't currently have a mechanism for
> editing a datastore and then committing the changes in a separate request.
> The authors wanted to avoid having to specify such a mechanism, partly
> because neither of us are RESTCONF experts, and partly because it could
> also apply to other datastores (such as the “shared” candidate).
>
> As a RESTCONF expert, I will help.
>
>
>
> RFC 8040 only says what happens when certain datastores are supported.
> It says nothing about what happens when a datastore called
> “private-candidate” is implemented.  Thus this draft gets to define that
> behavior, and it doesn’t have to match RFC 8040’s “support” for :candidate.
>
>
>
>
>
> As long as new mechanisms and URIs are used, this should be OK.
>
>
>
> IMO RESTCONF does not really need its own way of doing everything, because
> the /restconf/operations interface
>
> is very easy to use.
>
>
>
> Andy
>
>
>
> This draft can state:
>
>
>
> - when "“private-candidate” is implemented:
>
> - edits accumulate in the client-specific candidate datastore
>
> - the client-specific candidate datastore can be committed
>
>   using  {+restconf}/operations/ietf-netconf:commit
>
> - the client-specific candidate datastore can be discarded
>
>   using {+restconf}/operations/ietf-netconf:discard-changes
>
>
>
> - if :validate is also implemented:
>
> - the client-specific candidate datastore can be validated
>
>   using {+restconf}/operations/ietf-netconf:validate
>
>
>
> - if :confirmed-commit is also implemented:
>
> - the {+restconf}/operations/ietf-netconf:commit operation
>
>   can take the “confirmed” attribute
>
> - the commit can be canceled using
>
>   {+restconf}/operations/ietf-netconf:cancel-commit
>
>
>
> Note:  I am not trying at all to introduce to RESTCONF an equivalency to
> NETCONF’s <target> attribute.  I’m perfectly okay with the following
> auto-selection:
>
>
>
> if :running implemented:
>
> - RC-edits go to <running> and are auto-committed
>
> - this is from RFC 8040 and is fine (matches :writable-running behavior)
>
>
>
> else if :candidate is implemented:
>
> - RC-edits go to <candidate> and are auto-committed
>
> - this is from RFC 8040 and is not good (explained above)
>
> - but let’s hope that :candidate becomes a thing of the
>
>   past in an NBC-update to RESTCONF
>
>
>
> else if :private-candidate is implemented:
>
> - see behavior described above.
>
> - but, to work, this draft needs to say that neither
>
>   :running nor :candidate can be implemented…
>
> - this would be goodness
>
>
>
> If more work is needed on the RESTCONF support for the private candidate
> datastore, I think it would be better to remove RESTCONF from this draft
> and address it in a separate draft later, with an author who's a RESTCONF
> expert.
>
> A common strategy is to have one “place” where protocol-independent
> behavior is defined, and then a “place” for each protocol, where
> protocol-specific syntax is defined.   The only question is if the *places*
> are sections in a draft, or separate drafts (e.g., in the list-pagination
> work).
>
>
>
> IMO, if you want to isolate RESTCONF, then NETCONF should be also be
> isolated (i.e.: there would be 3 drafts).  Good reasons for doing this are
> 1) because each is a heavy topic, perhaps too big for all be in one draft)
> and 2) because independent documents make for better references.
>
>
>
> Thoughts and comments are very welcome.
>
> Thank you for sending out this message.
>
>
>
>
>
> From Andy:
>
> A candidate datastore that can only accept one edit and then automatically
> commit is not useful.
>
>
>
> I agree that it would not be useful.
>
> It was also not useful when RFC 8040 defined it.
>
>
>
>
>
> Also from Andy:
>
> I agree RESTCONF should be removed from this draft.
>
>
>
> This is too important to not support in RESTCONF (and CORECONF, I assume).
>
>
>
>
>
> Kent // contributor
>
>
>
>
>
>
>
>