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

Robert Wilton <rwilton@cisco.com> Tue, 09 February 2016 15:06 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 110D41A910A for <netmod@ietfa.amsl.com>; Tue, 9 Feb 2016 07:06:58 -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 0JIt1tYzkxtt for <netmod@ietfa.amsl.com>; Tue, 9 Feb 2016 07:06:57 -0800 (PST)
Received: from aer-iport-4.cisco.com (aer-iport-4.cisco.com [173.38.203.54]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9123F1A9109 for <netmod@ietf.org>; Tue, 9 Feb 2016 07:06:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=7442; q=dns/txt; s=iport; t=1455030416; x=1456240016; h=subject:to:references:cc:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=MBXJ3Bqu593cD50cRfNB+VhwgoXbDkF1yYyiO4aV+3g=; b=QY0370LcczsoLbvj/W4uq/Cw8qUUEMf2h19wdAaV8U7mfFD6fMIw7ieC Ty1tEQRKUzhiXJjuc3Z9d4iih9l2BARwXKPo5ODRONim+MxHI/oDqz+PL FS48UkeDuOi0Q7d0+NNTv1m+ASmNc9I86bS0vyg4iSSVeheaE/36IyR9n k=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0CqBACx/7lW/xbLJq1UCoR5iFyzD4YNAoF/AQEBAQEBgQuEQQEBAQMBJxFAARALDgoJFg8JAwIBAgFFBg0GAgEBF4d4CL57AQEBAQEBAQEBAQEBAQEBAQEBGIYShDeEAQcShFIBBI0niVGNUIFbhEODA4VSim2DUmKDZDwuiFMBAQE
X-IronPort-AV: E=Sophos;i="5.22,421,1449532800"; d="scan'208";a="630357945"
Received: from aer-iport-nat.cisco.com (HELO aer-core-1.cisco.com) ([173.38.203.22]) by aer-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Feb 2016 15:06:54 +0000
Received: from [10.63.23.76] (dhcp-ensft1-uk-vla370-10-63-23-76.cisco.com [10.63.23.76]) by aer-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id u19F6sH9016663; Tue, 9 Feb 2016 15:06:54 GMT
To: Martin Bjorklund <mbj@tail-f.com>
References: <56B8B2BC.9050809@cisco.com> <20160208.204128.275969700916546426.mbj@tail-f.com> <56B906C4.1020307@cisco.com> <20160208.223750.1590868900898520013.mbj@tail-f.com>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <56BA008E.5070102@cisco.com>
Date: Tue, 09 Feb 2016 15:06:54 +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.223750.1590868900898520013.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/i2J4CyWoCRtCfi1AAxrQfy5pHeQ>
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: Tue, 09 Feb 2016 15:06:59 -0000


On 08/02/2016 21:37, Martin Bjorklund wrote:
> Robert Wilton <rwilton@cisco.com> wrote:
>>
>> 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).
> Just like "running" is not writable in a server that supports
> "candidate" but not :writable-running.
That isn't really the same.

The issue isn't so much about whether this is writable or not, but 
whether the data is configuration or state.

>> 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 ...
> This is a problem/known issue with <get> in NETCONF.  There have been
> various proposals to fix this, e.g. Andy's "get2".  I'd rather fix the
> problem in the protocol once, than in all data models.
>
>
>>> 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.
> ... just like I have to remember to remove the last occurance of
> "config" and replace it with "state" to get applied.  This (path
> handling) is trivial in both solutions.
I don't agree that the complexity is the same here for both cases.

In the OpenConfig models you just get and process the item that you want:
  - No extra path manipulation is required.
  - The path itself always fully resolves to an individual value.
  - There is never any ambiguity.

>
>> 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?
> Currently yes.  Just like if you want to get both the values from
> startup and from running.  Also in this case, I'd prefer to solve the
> problem generically in the protocol.
OK.

Can you please suggest an approach of how to return a single tree that 
contains the data from two separate datastores (where the leaf paths may 
overlap)?  I think that the approach would need to work both for get 
requests and also notification data.

Rob


>
>
> /martin
>
>
>> 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
>>
>>
> .
>