Re: [netmod] OpsState and Schema-Mount

Ladislav Lhotka <lhotka@nic.cz> Tue, 09 August 2016 14:23 UTC

Return-Path: <lhotka@nic.cz>
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 8331D12D5A5 for <netmod@ietfa.amsl.com>; Tue, 9 Aug 2016 07:23:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.247
X-Spam-Level:
X-Spam-Status: No, score=-8.247 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-1.247] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nic.cz
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 LU8rcwvv813A for <netmod@ietfa.amsl.com>; Tue, 9 Aug 2016 07:23:29 -0700 (PDT)
Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5CC8912D876 for <netmod@ietf.org>; Tue, 9 Aug 2016 07:16:44 -0700 (PDT)
Received: from [IPv6:2001:718:1a02:1:79c6:95cb:b1f6:9427] (unknown [IPv6:2001:718:1a02:1:79c6:95cb:b1f6:9427]) by mail.nic.cz (Postfix) with ESMTPSA id CD3A261515; Tue, 9 Aug 2016 16:16:42 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1470752202; bh=To/6ew0qBlsqU4OvvYgU4c+i7Ia7XyCe8M1LVo0bjBM=; h=From:Date:To; b=T5WLdWCRg/lC80HaFYsOxMcqN33X1QfrJ161f2fuOiLza61Ze5GQ19gSomDCQVzzB ksB3/x1y1hKy3jJiLoMTCBqjDGpK9QChQyrHz9thj13HdvqcNr0AWmdVhZy2xCXvdt HD0y9fL5IST2HNb8sXEOrHvQgdZeY8gtBOyasEWI=
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
From: Ladislav Lhotka <lhotka@nic.cz>
In-Reply-To: <20160809133854.GD313@elstar.local>
Date: Tue, 09 Aug 2016 16:16:46 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <6007E205-5B8F-4A23-A7EE-3393A730FC61@nic.cz>
References: <100B5D71-C23E-4C72-9EA2-2DB6574DEB87@nic.cz> <5153eab1-8d87-6e3c-3b54-441f683695e4@cisco.com> <D3C7B1A4.7482A%acee@cisco.com> <18066971-3353-b13f-04fa-e214a47ab9a7@cisco.com> <D3C8C14F.74A40%acee@cisco.com> <3175490B-E8DA-4819-B294-C64D1A7D8A40@juniper.net> <CABCOCHRuzTTBM-9OU5GaXS_fHmpNSn5Yp-3K6oXF33SeObSonA@mail.gmail.com> <673D4236-7564-4B64-8088-BE6CBA3A790E@juniper.net> <CABCOCHTkUsLfrDZh4a3fGvpcTR0YVjpG2AHUwfLQGSa30JqQcA@mail.gmail.com> <4c5eedb9-ce73-3693-1e17-6012755a2fdd@cisco.com> <20160809133854.GD313@elstar.local>
To: Jürgen Schönwälder <j.schoenwaelder@jacobs-university.de>
X-Mailer: Apple Mail (2.3124)
X-Virus-Scanned: clamav-milter 0.98.7 at mail
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/DZ3YucYT6KacY-pumaaqLuKpzvM>
Cc: netmod WG <netmod@ietf.org>
Subject: Re: [netmod] OpsState and Schema-Mount
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.17
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: Tue, 09 Aug 2016 14:23:30 -0000

> On 09 Aug 2016, at 15:38, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> wrote:
> 
> On Tue, Aug 09, 2016 at 02:12:01PM +0100, Robert Wilton wrote:
>> 
>> In particular, I think that the guideline would be along the lines:
>> If a given module "foo" only contains state and no configuration, then
>> having a single top-level "foo" config false node is fine, but if a given
>> module contains both config and state then the recommendation is to put that
>> under a config=true "foo" top-level node.  Refining that slightly, If the
>> state data is relevant even if "foo" hasn't been enabled then make the top
>> level "foo" an NP container.  If "foo" has to be enabled on the system for
>> the state data to be relevant then make "foo" a P container (or give it a
>> separate foo/enable leaf).  In summary, I would suggest that the foo state
>> data should be pushed as far down the combined config/state tree as
>> possible.  It should be sited below (or adjacent to) whichever config node
>> is required to make that state data relevant.
>> 
>> If config and state are in the same tree then it is easy to return all the
>> data in one RPC, or have separate RPC operations that just return
>> configuration (e.g. <get-config>), or just return "state + containing
>> hieararchy" (e.g. a newly defined <get-state>, or equivalent).
>> 
>> Having separate foo vs foo-state trees at the top level is always going to
>> make it harder to return and manage a combined view of the config and state
>> data.
> 
> I think it is crucial to separate (a) what protocols do today and (b)
> what protocols might do at some time in the future.
> 
> The current protocol reality, that is (a), paired with the reality of
> network interfaces has lead to the (/interfaces, /interfaces-state)
> design pattern and until we have (b) in place I do not think we have
> really an alternative for the (/interfaces, /interfaces-state)
> design pattern.

I would also add that some aspects of YANG (config true/false dichotomy, validation rules) make everything else difficult. 

> 
> If you have config and state are in the same tree, you simply can't
> represent certain things that exist in reality. A single tree may look
> 'simpler' but in several cases also simply 'unusable'. We did not
> particularly like the (/interfaces, /interfaces-state) design but it
> was the only solution that seemed to work for all cases given the
> protocol reality we were in.

Right. We have tried hard to find something more elegant, and some attempts (for example [1]) were quite similar to the current OpState proposals, but we eventually realised that our shortcuts only work in simple examples and break down in more complex situations.

That said, I don't claim that a more elegant solution is impossible (and Randy Presuhn would probably note that it was already available 25 years ago:-) but IMO it is not a low-hanging fruit given what we currently have (YANG and the protocols).

Lada

[1] https://tools.ietf.org/html/draft-bjorklund-netmod-operational-00

> 
> /js
> 
> -- 
> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
> Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>
> 
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod

--
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C