Re: [netmod] leafref to lists that contain system-controlled entries

Martin Bjorklund <mbj@tail-f.com> Mon, 16 October 2017 06:57 UTC

Return-Path: <mbj@tail-f.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 C47CF13431D for <netmod@ietfa.amsl.com>; Sun, 15 Oct 2017 23:57:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 tsn6lwcZRvAo for <netmod@ietfa.amsl.com>; Sun, 15 Oct 2017 23:57:28 -0700 (PDT)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 066E3134316 for <netmod@ietf.org>; Sun, 15 Oct 2017 23:57:27 -0700 (PDT)
Received: from localhost (unknown [173.38.220.41]) by mail.tail-f.com (Postfix) with ESMTPSA id 5C8661AE02A7; Mon, 16 Oct 2017 08:57:26 +0200 (CEST)
Date: Mon, 16 Oct 2017 08:55:59 +0200 (CEST)
Message-Id: <20171016.085559.1980566759403577584.mbj@tail-f.com>
To: jason.sterne@nokia.com
Cc: netmod@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <HE1PR07MB08435A124031631CF19E92BE9B480@HE1PR07MB0843.eurprd07.prod.outlook.com>
References: <HE1PR07MB08435A124031631CF19E92BE9B480@HE1PR07MB0843.eurprd07.prod.outlook.com>
X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/_2jyFH3XjF0uokRu_VYT9TVvB9w>
Subject: Re: [netmod] leafref to lists that contain system-controlled entries
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
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: Mon, 16 Oct 2017 06:57:30 -0000

"Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com> wrote:
> Hi all,
> 
> There are a few threads on the mailing list that touch on the concept
> of system-controlled resources (mostly list entries):
> 
> https://mailarchive.ietf.org/arch/msg/netmod/3fTSHIh_MfHzmuDCoicAGiXA2E0
> https://mailarchive.ietf.org/arch/msg/netmod/KIsSgKByQWpqYzA4i6Bwc8fuH3w
> https://mailarchive.ietf.org/arch/msg/netmod/mjLJdiYErtNG41dJ5bJ5ji07cz0
> 
> A few drafts & RFCs also refer to the concept:
> https://tools.ietf.org/html/draft-ietf-netmod-revised-datastores-04
> https://tools.ietf.org/html/rfc7223
> 
> Several vendor implementations have list entries (instance data) that
> are populated by the server and can be referenced (leafref) from other
> places in the configuration.  These system entries are useful
> pre-created policies, interfaces, etc that can then be used (and
> referred-to) by operators in their explicit configuration.
> 
> If those entries are only expected to exist in the <operational>
> datastore, then in theory any references to them in user created
> configuration will cause a validation problem in the candidate/running
> (missing leafref target).
> 
> One solution discussed in the mailing lists is to change every
> reference to lists that could contain a system created entry to a
> "require-instance false" leafref.  But then some useful validation is
> lost.  In many cases the model is more correctly "require-instance
> true" but the set of targets includes the system create entries.
> 
> Another solution discussed is to have the system created entries
> appear in the <intended> datastore (as part of template/expansion).
> That would make validation pass on the intended datastore, but then
> the candidate/running/startup datastores would not be valid (would be
> missing leafref targets if any part of the config refers to system
> created entries).  THis sounds similar to the problem that has been
> discussed in the past about the fact that templates (in the running)
> basically mean the running/candidate aren't necessarily valid (until
> after template expansion, which means only the intended would be
> valid).
> 
> Another approach could be to actually have those system created
> entries show up in running/candidate.  That would ensure that
> references to those entries are valid.

This works if the "system created entries" behave just like any other
entry, i.e., a client (with proper access rigths) can modify and
delete them.

If this is not the case, the next question is what happens if the
client creates its own entry with the same name as a system created
entry?  Is this illegal, or will the user created entry override the
system created entry?

Another question to think about is what happpens with user config that
refers to such a system created entry if a new software image is
loaded where the system created entry is no longer present?


/martin