Re: [netmod] a few comments on draft-wilton-netmod-opstate-yang

Robert Wilton <rwilton@cisco.com> Mon, 08 February 2016 21:21 UTC

Return-Path: <rwilton@cisco.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2292C1B335C for <netmod@ietfa.amsl.com>; Mon, 8 Feb 2016 13:21:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -13.902
X-Spam-Level:
X-Spam-Status: No, score=-13.902 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, J_CHICKENPOX_64=0.6, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham
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 RjjZT2QhHhui for <netmod@ietfa.amsl.com>; Mon, 8 Feb 2016 13:21:11 -0800 (PST)
Received: from aer-iport-1.cisco.com (aer-iport-1.cisco.com [173.38.203.51]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 232351B3354 for <netmod@ietf.org>; Mon, 8 Feb 2016 13:21:10 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=5656; q=dns/txt; s=iport; t=1454966471; x=1456176071; h=subject:to:references:cc:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=tGFHMovFjyk4mkfBgvbNMmxYThOB8je/+EDNT7MW5A8=; b=MiGCJ1koUJ6KdsyhEpX0pkN6FOskd6bTnWDECR2wq2YLiKR5+U/13haR Ls4Gtotia3nKF2IB85L7Qc/+dBzkCczfzscouyc+LawUqWcAJ5vn+ulco qGs0MLhMZs5EBoPxiYraxkscR1mrtPMYFXH+Db8P2f2xu/PqT2Ssw27+y M=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0DOAQAIBrlW/xbLJq1UCoR5iFuxDwENgWaGDQKBZxQBAQEBAQEBgQqEQQEBAQMBJxFAARALDgoJFg8JAwIBAgFFBg0GAgEBF4d4CL12AQEBAQEBAQEBAQEBAQEBAQEBGIYShDeEAQeEZAEEjSeJTo1QgVuHRoVSimyDUh4BAUKDZDwuiFMBAQE
X-IronPort-AV: E=Sophos;i="5.22,417,1449532800"; d="scan'208";a="649143717"
Received: from aer-iport-nat.cisco.com (HELO aer-core-4.cisco.com) ([173.38.203.22]) by aer-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Feb 2016 21:21:08 +0000
Received: from [10.61.105.141] (dhcp-10-61-105-141.cisco.com [10.61.105.141]) by aer-core-4.cisco.com (8.14.5/8.14.5) with ESMTP id u18LL8l7026514; Mon, 8 Feb 2016 21:21:08 GMT
To: Martin Bjorklund <mbj@tail-f.com>
References: <56B89670.9090300@cisco.com> <20160208.144553.2082644981061361024.mbj@tail-f.com> <56B8B2BC.9050809@cisco.com> <20160208.204128.275969700916546426.mbj@tail-f.com>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <56B906C4.1020307@cisco.com>
Date: Mon, 08 Feb 2016 21:21:08 +0000
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0
MIME-Version: 1.0
In-Reply-To: <20160208.204128.275969700916546426.mbj@tail-f.com>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/netmod/TAc2V4eRG-QZXKhi0g1QszBa-UA>
Cc: netmod@ietf.org
Subject: Re: [netmod] a few comments on draft-wilton-netmod-opstate-yang
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.15
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, 08 Feb 2016 21:21:13 -0000


On 08/02/2016 19:41, Martin Bjorklund wrote:
> Hi,
>
> Robert Wilton <rwilton@cisco.com> wrote:
>> Hi Martin,
>>
>> On 08/02/2016 13:45, Martin Bjorklund wrote:
>>> Robert Wilton <rwilton@cisco.com> wrote:
>>>> On 06/02/2016 00:41, Andy Bierman wrote:
>>> [...]
>>>
>>>>> IMO, this solution is a non-starter.
>>>> OK, and yet my understanding is that the folks requesting a solution
>>>> to the opstate problem are saying that the applied datastore approach
>>>> is also a non-starter, or at least very undesirable.
>>> But the key to finding a solution that works for everyone is to
>>> understand *why* a datastore is a non-starter.  As I noted in a
>> [Caveat - I don't speak for the OpenConfig operators, this is just
>> my perception from previous drafts, conversations, implementing some
>> of the OpenConfig models]
>>
>> My understanding is that they want something this is very similar to
>> how the OpenConfig models look.  After all, their preferred solution
>> to the opstate problem would be for IETF to standardize on the
>> approach used in OpenConfig model design.  E.g. all config nodes are
>> defined in groupings, and then instantiated under both "config" and
>> "state" containers.
>>
>> I believe that their concerns are primarily about how the operators
>> systems interact with the models from a management client
>> perspective rather than device implementation concerns.
>>
>> With the OpenConfig model/approach they get:
>>   - The choice of having one single tree that contains all the data
>>     (intended, applied and derived) - but can be split into multiple
>>     trees if they wish.  (I.e. with their model they have no
>>     requirement to be aware of separate data stores at all.)
>>   - Every piece of data in that tree has a unique path to identify it
>>     (makes the data easy to interact with).
>>   - The intended config, applied config, and derived state can all be
>>     programmatically compared.
>>   - Related information is co-located in the tree (e.g. if you were
>>     browsing the data tree).
> Here's a slightly updated version of a drawing that has been used to
> explain how configuration data flows through the system:
>
>    [candidate] -> [running/intended] -> [applied]
>                          |
>                          v
>                      [startup]
>
> We used to have three instantiations of configuration nodes, now we
> have four (applied).
>
> Three of these are datastores.  They can be programmatically compared
> (even without data model knowledge).  Note that a "datastore" can be
> viewed as a label (with associated semantics) of an instantiation of
> these nodes.
>
> It is unclear to me why applied must be special (modelled explicitly
> rather than a named instantiation of the nodes).

I would say that applied configuration differs from the other three in 
that it isn't really configuration at all.

It is a just a representation of what the system is currently doing, but 
to make it easy to relate back to the configuration it happens to use an 
equivalent schema as for the configuration (but logically with the 
config:true labels replaced with config:false).

Given that the applied configuration is operational state, technically I 
think that it should just be part of the existing "operational state" 
datastore.  But then the problem is that the nodes have the same path as 
the intended configuration nodes in the running configuration datastore 
and hence the namespace will collide during a get request ...


>
> Your list above applies only to the intended,applied subset of the
> instantiations.  If you want to e.g. check how startup differs from
> running you need a different mechanism than to check how applied
> differs from running, which means different code paths etc.
>
>> With a datastore solution, I think that it means:
>>   - Either they have to put intended and applied config into separate
>>     trees, or they have to come up with their own scheme to combine
>>     them into a single tree (given that the cfg intended/applied names
>>     clash).
> Do you mean in their proprietary protocol?
No, I was meaning in the proprietary management systems application code.

>
>>   - If separate trees, to ensure paths are unique they would need to
>>     prefix every path with the name of the datastore/tree (hassle).
> I don't see why it would be such a hassle; compare:
>
>    /intended/interfaces/interface[name='eth0']/mtu
>
> vs.
>
>    /interfaces/interface[name='eth0']/config/mtu
I think that the existing protocol messages (e.g. NETCONF/etc) don't 
explicitly include the datastore name in the request/reply.  Often the 
appropriate data store is inferred from the context (or the request).  
Hence more code is needed to add/remove the datastore name when appropriate.

E.g. when I do a get request on 
"/intended/interfaces/interface[name='eth0']/mtu" I need to remember to 
strip off "/intended", and ensure that I frame the request to the right 
datastore.  And when I get a rpc-reply from a get-config request I need 
to know the context of the request so that I can annotate the reply with 
the appropriate datastore.

What if I want to get both 
"/intended/interfaces/interface[name='eth0']/mtu" and 
"/applied/interfaces/interface[name='eth0']/mtu"?  Do I need to split 
this into two separate requests and combine the responses?

So, given the choice between the two paths above, once of them seems to 
involve more code and work on the client side, and more chance of 
mistakes/confusion.

Rob