Re: [netmod] system configuration sync mechanism

Andy Bierman <andy@yumaworks.com> Sat, 14 August 2021 15:19 UTC

Return-Path: <andy@yumaworks.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 75B9E3A12F4 for <netmod@ietfa.amsl.com>; Sat, 14 Aug 2021 08:19:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.887
X-Spam-Level:
X-Spam-Status: No, score=-1.887 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, 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.20150623.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 Vo21g_G8OReH for <netmod@ietfa.amsl.com>; Sat, 14 Aug 2021 08:19:22 -0700 (PDT)
Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) (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 42A043A12D0 for <netmod@ietf.org>; Sat, 14 Aug 2021 08:19:22 -0700 (PDT)
Received: by mail-lf1-x12b.google.com with SMTP id t9so25752484lfc.6 for <netmod@ietf.org>; Sat, 14 Aug 2021 08:19:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iStT9yIo1UTlja2qoP42MXZVtlUSV/+4YzNQgnQRDeA=; b=En3HZhFjWV9uS2FA56uSiRxVeDYLV3Xxs5DOFMvDEvb5H/3Qq0VIfH2/mBPP8sJrGr b2zTGLmz8IzlARTHcndfjL6a/vKd+Jf+fZBsrOh7wpzo3tOgyq1AcXu/t05Cq/tI/t8I LUck3EEdiHhtv3Fi7IKvfSHQnhJ/HruwZRNnEnAByoKTIdu9inqLoyYQXImJZ7i/zXa3 idw+F2s4bRV4LEimYgISlOqohjnsrZTencOSp49rY4/PzIGudywhwyNJdRTrJ3nU93zF ReV4d1YnPbVq9UkRCXhCnIilmxY7+i3TRx7zaCIkEFtUXM7swofxcFw/wLT4LQjpr4rv iioQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iStT9yIo1UTlja2qoP42MXZVtlUSV/+4YzNQgnQRDeA=; b=qYxrS8Y5iyR1DTATal8u2QnU4oARZnp3nca5ItE7FyzJZ6qWexuHRKLHZ6pS6JC/7o +Vfv4gpnLjGZQ+Dd+83I724fo0nlq0d4HX/A/ObCtu7i+jQvaq3enWa1V977x4Af0id7 Va78799hZHQfv43vYi56BTJTefPOR3wqexF+KfwAmRJOhOC6fowR4ALEMN808GIAlNyJ 4I1vzdwpMXYsQT/nXi9nkBUbmFYljC6/joLoFXePssBwYej432I6cXTK12hS54mnn9eu soHz6Kchj0j7ONpmFpT4KLheJEh0duBoCF0qZB8NtIdQQKjru3Jll5fHof1pYEpXqlt5 YW6g==
X-Gm-Message-State: AOAM531A7O/KaDPK9ZAyDPsrFtOtkqHNju4P9FcatKVOT6+20o7xfQir /GLal1xcVWLxzxCNK2gSlEvD5IO0lPtSfAuf6y4pQw==
X-Google-Smtp-Source: ABdhPJyfi/UEyn0OayYFxxQd3vxaG7NvqoC3P5+l4YjtKsgkWINlZoOXQBGHUNBTufdmViAQPtAVS4/zE93XJGVW+BQ=
X-Received: by 2002:a05:6512:33cc:: with SMTP id d12mr5169807lfg.577.1628954354800; Sat, 14 Aug 2021 08:19:14 -0700 (PDT)
MIME-Version: 1.0
References: <CABCOCHR+E7uh5EOxXaMaFEBb-Oi0U_4G41Z=Jwk3mUAcodnAPg@mail.gmail.com> <0100017b1128b30f-fe4c9258-3392-476a-ae21-604d2a80f523-000000@email.amazonses.com> <20210804133956.p73si5f63t4esmcj@anna.jacobs.jacobs-university.de> <CABCOCHSmHOQnSXwfHVr8p=2Xx8ERThtAtVk8iWgYObqNuqfo4Q@mail.gmail.com> <BN7PR08MB50739BBC55241126003EBC399BF69@BN7PR08MB5073.namprd08.prod.outlook.com> <CABCOCHQQHtSP47HVPu3+KXi1wK0qwfTh-Sw5z=9pF47RjsqByw@mail.gmail.com> <DM6PR08MB5084455E315E53F63BF7C9D29BFA9@DM6PR08MB5084.namprd08.prod.outlook.com>
In-Reply-To: <DM6PR08MB5084455E315E53F63BF7C9D29BFA9@DM6PR08MB5084.namprd08.prod.outlook.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Sat, 14 Aug 2021 08:19:03 -0700
Message-ID: <CABCOCHSeERgZE-F6TuSG06RnRvuwCXamy_FrydpEJpeksOuwfA@mail.gmail.com>
To: "Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com>
Cc: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, Kent Watsen <kent@watsen.net>, NetMod WG <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000ac727205c9867d2d"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/iQ8RqciWCTwu2mxMZfCe_gEy15k>
Subject: Re: [netmod] system configuration sync mechanism
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 14 Aug 2021 15:19:30 -0000

On Fri, Aug 13, 2021 at 2:02 PM Sterne, Jason (Nokia - CA/Ottawa) <
jason.sterne@nokia.com> wrote:

> Hi Andy,
>
> Pls see inline.
>
> Jason
>
>
>
> *From:* Andy Bierman <andy@yumaworks.com>
> *Sent:* Monday, August 9, 2021 6:23 PM
> *To:* Sterne, Jason (Nokia - CA/Ottawa) <jason.sterne@nokia.com>
> *Cc:* Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>; Kent
> Watsen <kent@watsen.net>; NetMod WG <netmod@ietf.org>
> *Subject:* Re: [netmod] system configuration sync mechanism
>
>
>
>
>
>
>
> On Mon, Aug 9, 2021 at 2:51 PM Sterne, Jason (Nokia - CA/Ottawa) <
> jason.sterne@nokia.com> wrote:
>
> Hi guys,
>
>
>
> I'm late to the game on this thread but I did read through the entire
> thing (whew - can't promise I absorbed every nuance though). I am familiar
> with this issue. I've been dealing with it from the server implementation
> side (some clients **do** complain if there are references to missing
> "system config" list entries).
>
>
>
> One of the pretty fundamental issues IMO is whether we want good ol'
> standard <running> to always be valid (including for an offline client or
> tool to be able to validate instance data retrieved from a server against
> the YANG models). Even without this "system config" topic, we already have
> a looming problem with config templates & expansion.  Servers with YANG
> models that document a lot of constraints (e.g. leafrefs, mandatory
> statements, etc) are more likely to hit this issue of an invalid running
> config (offline).
>
>
>
> I'm doubtful that it is easy for a client to know how templates are
> expanded for all given servers. Unless that expansion is fully standardized
> (which would be challenging given multiple different shipping
> implementations in the industry), there can be some subtle corner cases and
> it can be complex (multiple levels of template application, exclusion
> rules, etc).
>
>
>
> I agree there can be dynamically added system config (e.g. create a new
> qos policy, and some queue list entries are automatically created inside
> that policy).
>
>
>
> Note that config added by the system could be deletable or non-deletable.
> For deletable items there were some previous discussions a few years ago
> that those list entries could be simply a default config that is populated
> if the startup datastore is empty at boot time.
>
>
>
> The system config list entries could also have leafs that are modifiable
> and leafs that are immutable. For the modifiable objects I think this is
> basically the system merging the explicit config with the system config
> (with the explicit taking precedence).
>
>
>
> Perhaps a lot of this system config is a legacy hold over from
> human-driven CLIs. For machine interfaces maybe it's reasonable to have
> clients explicitly define their config **if** they need offline
> validation of <running> to succeed (i.e. allow clients to explicitly
> configure any of the system config policies they are actually using &
> referencing).  In many cases, users want the "master" view of the config to
> live up in the client/OSS side and just push it down to the server (without
> having the server touch the contents of the running, i.e. a read-back
> should return identically what was sent).
>
>
>
> It might be good to set up a virtual interim or call of some sort to
> discuss this one. It is pretty complex.
>
>
>
>
>
> I think Balasz captured the 2 use-cases very well.
>
> *[>>JTS: ] I looked back at Balasz' email and I don't see clear use cases.
> Do you mean his P1, etc principles ?*
>
>
>



It was a different email I think proposing extensions instead of a
datastore.

I actually do not really understand the 4 principles he mentioned:

*P1) “There is a need to validate configuration data against data created
by the system.”*

*P2) We want the running datastore to contain exactly what the operator has
written there*

*P3) the running/intended configuration MAY become invalid if the
system-data changes.*

*P4) rfc8342#section-5.3.4 MUST always be valid*

What does P1 really mean?
Provide a complete example using XML represented datastores (not
proprietary CLI)

P2) Why? What problem does this solve? What if the system creates an
interface list?
How does the client add any child nodes if this interface is not allowed to
be represented
in <running>?  IMO P2 does not even make any sense.

The "origin" attribute identifies the nodes that came from the system.
This is not visible in <running> only because of CLRs in the RFC.
It is visible in <operational>,

P3) not sure what this means. This is not what RFC 8342 says about
<intended>

P4) I agree with-origin must be supported (but it is an optional feature)
It is not possible for <operational> to always be complete and correct,
as discussed in NMDA, 5.3.

The YANG module in this proposal simply adds an identity for a new
datastore.
There are no examples and the guidelines in NMDA, Appendix A are not
followed.

The reason <system> was left out of NMDA seems to be because the system is
completely proprietary and not constrained in any way wrt/ how config and
operational
data nodes are instantiated.




> For implementations that combine the system into <running>, undoing
>
> this behavior would be quite disruptive and therefore not likely to be
> done.
>
>
>
> *[>>JTS: ] I'm not necessarily advocating for the existence of a <system>
> DS, but there are various implementations for this problem space and some
> don't put these system objects (list entries) into <running>. I'm doubtful
> about automatically putting system config into <running>. That means the
> client no longer really owns/controls <running>. Readback won't return what
> was sent. The definitive <running> would then have to sit on the server
> (i.e. can't have the client as the definitive view/ownership of running).*
>
>
>
> It would help to have some common understanding of the contents of
> <system>.
>
> Maybe start with the well-known "interface problem".  The system
> configures almost empty physical interfaces.
>
> The user is allowed to add, modify, and delete all descendants except the
> "name" and "type" leaf,
>
> which are set by the system.
>
>
>
> In this case <running> will have the /interfaces/interface nodes in them
> (or else the client-accessible
>
> nodes could not be represented in NETCONF).  So any config=true XPath can
> point at name or type leafs
>
> in <running> or <operational>.
>
> *[>>JTS: ] An alternative is that these interfaces are *not* added to
> <running> unless a client explicitly adds them. The server could
> potentially consider leafrefs to them valid even if they aren't explicitly
> added. But if a user has a workflow that does offline validation, then they
> could explicitly add the interfaces into <running>*
>


I still have no idea what problem this solves.
Maybe it is to make NMDA as hard to adopt as possible,
by being as different from non-NMDA as possible?



>
>
> I have heard that <system> is needed because it has nodes in it that do
> not exist
>
> in <running> or <operational>, but could exist.
>
>
>
> The premise is that the server could have created these nodes
>
> but it did not for some reason.  And the client can inspect these nodes
> and somehow
>
> force the server to change the nodes it adds to <running>. (So what is the
> real use-case then?)
>
>
>
> Retrieving the system-created nodes with origin=system is already
> supported by NMDA.
>
> *[>>JTS: ] I don't think reading these nodes from <operational> addresses
> the issue. Clients do a <get-config> from <running> (or maybe <intended>)
> and want to be able to validate that config against the YANG model (without
> having to do additional reads from operational).*
>
>
>



Why does the client need to know the origin of the data in <intended>
in order to validate it?  (Again, origin is only restricted to
<operational> because
the RFC forbids anything else).



>
>
>
>
>
>
>
>
>
>
> Jason
>
>
>
>
>
> Andy
>
>
>
>



Andy



>
>
>
>
> *From:* netmod <netmod-bounces@ietf.org> *On Behalf Of *Andy Bierman
> *Sent:* Wednesday, August 4, 2021 9:59 AM
> *To:* Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>; Kent
> Watsen <kent@watsen.net>; Andy Bierman <andy@yumaworks.com>; NetMod WG <
> netmod@ietf.org>
> *Subject:* Re: [netmod] system configuration sync mechanism
>
>
>
>
>
>
>
> On Wed, Aug 4, 2021 at 6:39 AM Jürgen Schönwälder <
> j.schoenwaelder@jacobs-university.de> wrote:
>
> The figure in RFC 8342 section 5 documents what was agreed upon
> before. System configuration flows into <operational> but not upwards
> into <running>. Over the years, we discussed several corner cases
> (including things like configuring a new user and the system
> automatically assigns an unused uid, which afterwards needs to be kept
> stable). While there are for sure tricky corner cases, I am not
> convinced that the model defined in RFC 8342 for the general cases is
> wrong and that merging a new system datastore into <running> is the
> right approach. If people want to change the model documented in RFC
> 8342, then they should make an explicit statement about this and
> provide strong reasons that the model is flawed or incomplete.
>
> Note that the model does allow having a system client merging config
> into <running> (ideally controlled by an ACM so that such a client can
> be turned off if it leads to surprises).
>
>
>
>
>
> This is a solved problem in proprietary ways.  It is simple to treat
> system config
>
> as an access control issue.
>
>
>
> I am quite concerned that NMDA is getting extended in ways that lead to
>
> confusion and poor interoperability.  Adding a new datastore is very
> serious.
>
> IMO ANY new datastore (even factory default) should be standardized in
>
> a new version of NMDA (replacing RFC 8342).
>
>
>
> A datastore has a lot of baggage
>
>    - YANG library
>
>    - YANG XPath evaluation
>
>    - subtree and XPath filtered retrieval
>
>    - usage in RPC operations (ds:datastore data type parameter)
>
>
>
> Every time a datastore is added, all the existing RPC operations that use
>
> datastores need to be clarified wrt/ support for the new datastore.
>
> (Of course this is never done, leading to lots of interoperability issues)
>
>
>
> I am quite confused by the XPath discussions because XPath can only
>
> access existing nodes (i.e. the "accessible tree")
>
> https://datatracker.ietf.org/doc/html/rfc7950#section-6.4.1
>
>
>
> So what does it mean for the system datastore to contain possible values
> that
>
> cannot be represented in <operational>? The accessible tree cannot include
>
> these values, so XPath-based validation cannot use them.
>
>
>
>
>
>
> /js
>
>
>
>
>
> Andy
>
>
>
>
>
> On Wed, Aug 04, 2021 at 12:34:45PM +0000, Kent Watsen wrote:
> >
> > I am confused by the confusion  ;)
> >
> > You all know that JUNOS implemented this concept before YANG was even a
> thing, right?
> >
> > Admittedly, it’s not a “datastore“, but flexing the NMDA is where we can
> do better.
> >
> > A “with-system” mechanism could also work.  The only downside is the
> inability for a client to get only the system configuration, without the
> rest of <running>.
> >
> > Please stop stating/suggesting “config true” nodes are referencing
> “config false” nodes,  or that config is referencing operational state.
> There is no intention to break either of these tenants here.
> >
> > I think that some folks just joined the conversation and may have missed
> out when we covered all this before.
> >
> > The draft needs to be updated to more clearly identify the goals.
> >
> > K.
> >
> >
> >
> > _______________________________________________
> > netmod mailing list
> > netmod@ietf.org
> > https://www.ietf.org/mailman/listinfo/netmod
>
> --
> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
> Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>
>
>