Re: [netmod] OpsState Direction Impact on Recommended IETF YANG Model Structure

Robert Wilton <rwilton@cisco.com> Fri, 22 July 2016 07:59 UTC

Return-Path: <rwilton@cisco.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 0B4A712D61F for <netmod@ietfa.amsl.com>; Fri, 22 Jul 2016 00:59:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -15.808
X-Spam-Level:
X-Spam-Status: No, score=-15.808 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.287, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.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 uMpl7oDY-Udq for <netmod@ietfa.amsl.com>; Fri, 22 Jul 2016 00:59:23 -0700 (PDT)
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 C694E12D63E for <netmod@ietf.org>; Fri, 22 Jul 2016 00:59:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=15000; q=dns/txt; s=iport; t=1469174362; x=1470383962; h=subject:to:references:from:message-id:date:mime-version: in-reply-to; bh=P8bPO0gvTz8LG40WrkcMoyQP7K8+/c5vKbaZSSLE2gU=; b=GQO4LlgWRZIplmOh2nDECUp3Rv7RCwZAgrqxbpG8aTzStcrpuLjt+nrJ UIQJ2Ph+WL0OOu1CvqMtS/JaGRmR7ZXO5OS+yNmM7X8K1fS5yVZ/jTLY5 u5vBvDx+fzGWs4C6bVeQx1JW47WXGDtR9UOva+fp1QITkt73CNSm452m4 A=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0C1BgAv0ZFX/xbLJq1dgnGBTrQqgnaCD4F7hhwCgWkTAQEBAQEBAV0nhFwBAQQBfgsLGC5XBg0IAQEXiA0IvEsBAQEBAQEEAQEBAQEBAQEBAQEchiqBeIJVhCqFcQEEmSaObYFshFmDDYVokCEgAjKCCB+BTjqJBwEBAQ
X-IronPort-AV: E=Sophos;i="5.28,403,1464652800"; d="scan'208,217";a="678524311"
Received: from aer-iport-nat.cisco.com (HELO aer-core-1.cisco.com) ([173.38.203.22]) by aer-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jul 2016 07:59:20 +0000
Received: from [10.61.228.202] ([10.61.228.202]) by aer-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id u6M7xKCQ026417 for <netmod@ietf.org>; Fri, 22 Jul 2016 07:59:20 GMT
To: netmod WG <netmod@ietf.org>
References: <D3A935F0.6A4DC%acee@cisco.com> <eb15fd23-2c0a-50c4-1ebc-7c0e4867dfd8@cisco.com> <20160721174033.GB54646@elstar.local>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <d18f5dd0-64d0-e223-88a9-faa4df4b7866@cisco.com>
Date: Fri, 22 Jul 2016 09:59:20 +0200
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0
MIME-Version: 1.0
In-Reply-To: <20160721174033.GB54646@elstar.local>
Content-Type: multipart/alternative; boundary="------------D840529BC2CC8349CD297339"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/M6pPeTEEMNKPbooDt24Fp9gkKWE>
Subject: Re: [netmod] OpsState Direction Impact on Recommended IETF YANG Model Structure
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: Fri, 22 Jul 2016 07:59:26 -0000


On 21/07/2016 19:40, Juergen Schoenwaelder wrote:
> On Thu, Jul 21, 2016 at 06:39:29PM +0200, Robert Wilton wrote:
>> Hi,
>>
>> So after the various meetings and discussions this week, I think that the
>> most important thing for IETF to do is to publish reviewed YANG models
>> quickly, with the understanding that it is better to publish imperfect
>> models than to end up not publishing any models at all.  This is with the
>> understanding that these models could be fixed by subsequent RFCs if
>> required.
>>
>> So, I effectively support Acee's solution (2).  But to state this more
>> precisely, I would suggest that the specific guidance should be:
>> 1) IETF Models MUST NOT have a split for applied configuration leaves.  All
>> IETF models that have not been turned into RFCs must be modified to remove
>> any applied configuration nodes.  Any models that have this convention in
>> RFCs should be revised to follow a consistent intended/applied convention
>> for IETF models.  [The justification here is that IETF standard models have
>> to be able to assume that the applied configuration will be available via a
>> separate applied configuration (or operational state) datastore or
>> equivalent mechanism.]
> Are there any published models that have "applied configuration
> nodes"?
I'm not 100% sure.  I thought that there was a BGP model that was about 
to be published as an RFC standard that contains intended vs applied 
configuration split.  Possibly draft-ietf-idr-bgp-model-02.

>   What is actually an "applied configuration node"?
A config false node written in the schema with the sole purpose of 
indicating whether of not the configuration has been applied on the device.

For example, looking at the "bgp-common-neighbor-group-timers-config" 
grouping in draft-ietf-idr-bgp-model-02, then the uses statement 
instantiates it twice for the BGP peer group timers, once under a 
"config" (config true) container to hold the configuration, and also 
under "state" (config false) to solely represent whether the 
configuration has been applied.

>   Perhaps an
> example helps: Are you trying to suggest that
>
>    /if:interfaces-state/if:interface/ipv4/address/ip
>
> is now made illegal and we have right now no way to represent
> operationally used IP addresses? That sounds somewhat broken to me.
No, I'm not suggesting that.  I don't see that node as specifically only 
indicating whether the IP address configuration is applied, but instead 
represents the actual IP address in use by the system.


>
>> 2) All IETF Models MUST put "derived state and statistics" into a separate
>> namespace from the configuration (i.e. top level "feature" and
>> "feature-state").  The two trees must be as structurally similar as
>> possible, sharing the same paths, node names (except the top level node),
>> using the same lists keys where appropriate, etc.*
> Not sure what exactly drived state is.
 From draft-ietf-netmod-opstate-reqs-04:

    Derived State:  This data represents information which is generated
        as part of the server's own interactions.  For example, derived
        state may consist of the results of protocol interactions (the
        negotiated duplex state of an Ethernet link), statistics (such as
        message queue depth), or counters (such as packet input or output
        bytes).


But in essence, I mean all config false nodes that are not "applied 
configuration nodes" (as per my example above).

>   And even then, why MUST derived
> state and statistics be in a separate tree?
My aim is to make the structure of the models consistent and 
predictable, with the specific aim of making it easier for tooling. If 
some IETF models are going to split configuration and state into 
separate trees (e.g. RFC 7723), then I'm suggesting that all IETF 
modules must have same structure.


>   And can we please avoid
> 'feature' and 'feature-state' since YANG uses the term 'feature' in a
> very different sense.
Yes, OK.

>
>> 3) Both of these rules should be written into rfc6087bis.  We should then
>> get this guidelines document finished as quickly as possible at the highest
>> priority, and use that as the definitive guideline for the modules that the
>> working groups are working on.
>>
>> * Note, I chose this option not because I think that it is elegant (because
>> I don't) but because it seems to me that it is the only pragmatically option
>> that we have available.  The alternatives appear to be: (i) we wait another
>> year before publishing any models (if ever), or (ii) we publish models that
>> no-one can use today without violating the existing RFCs, or (iii) we end up
>> with a hybrid mess without any consistency.
> I do not see how the proposed rules achieve the goals you stated. Again,
> examples may help:
>
>    /if:interfaces-state/if:interface/ipv4/address/ip
>
> This can be implemented today.


>   It may not be necessary anymore some
> time in the future if we have a revised datastore model plus matching
> solutions. The upgrade path from this is, however, extremly simple:
> We change the status of the definition of this object to deprecated.
Potentially true.  But in the future, if we try to combine "foo-state" 
into "foo" for all IETF models then that would mean updating every 
published IETF YANG model.  Is that realistic?  I don't think that just 
changing some modules makes sense, neither does having two ways to do 
this.  I would rather have a single consistent approach that applied to 
all IETF (and hopefully other SDO) models.

>
> Bottom line: I think we should continue to follow the model used by
> the ietf-interfaces model and the ietf-ip model until we have a better
> solution in place (and subsequently we can deprecate objects that
> became redundant).
This is pretty much what I'm trying to say as well, but in a stronger 
way.  I.e. mandating that all IETF YANG models MUST follow this 
structure, and split config and state into two top level trees.

Rob

>
> /js
>