Re: [Netconf] In an update, when is a delete a delete?

Alexander Clemm <alexander.clemm@huawei.com> Fri, 19 May 2017 00:53 UTC

Return-Path: <alexander.clemm@huawei.com>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 54FEC12EC1D for <netconf@ietfa.amsl.com>; Thu, 18 May 2017 17:53:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.22
X-Spam-Level:
X-Spam-Status: No, score=-4.22 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, 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 OIwxFs88HVxB for <netconf@ietfa.amsl.com>; Thu, 18 May 2017 17:53:39 -0700 (PDT)
Received: from lhrrgout.huawei.com (lhrrgout.huawei.com [194.213.3.17]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0CDBB12EBF9 for <netconf@ietf.org>; Thu, 18 May 2017 17:48:33 -0700 (PDT)
Received: from 172.18.7.190 (EHLO lhreml701-cah.china.huawei.com) ([172.18.7.190]) by lhrrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DGW94213; Fri, 19 May 2017 00:48:31 +0000 (GMT)
Received: from SJCEML703-CHM.china.huawei.com (10.208.112.39) by lhreml701-cah.china.huawei.com (10.201.108.42) with Microsoft SMTP Server (TLS) id 14.3.301.0; Fri, 19 May 2017 01:48:30 +0100
Received: from SJCEML701-CHM.china.huawei.com ([169.254.3.56]) by SJCEML703-CHM.china.huawei.com ([169.254.5.229]) with mapi id 14.03.0235.001; Thu, 18 May 2017 17:48:26 -0700
From: Alexander Clemm <alexander.clemm@huawei.com>
To: Andy Bierman <andy@yumaworks.com>, Kent Watsen <kwatsen@juniper.net>, "Eric Voit (evoit)" <evoit@cisco.com>
CC: Netconf <netconf@ietf.org>
Thread-Topic: [Netconf] In an update, when is a delete a delete?
Thread-Index: AQHS0Bvr5ppCqKOrQVCrK5qvBNQM2KH7F1GA//+3hYA=
Date: Fri, 19 May 2017 00:48:25 +0000
Message-ID: <644DA50AFA8C314EA9BDDAC83BD38A2E0DFAF042@SJCEML701-CHM.china.huawei.com>
References: <8340AFB7-350A-4641-A130-4114E39C73E1@juniper.net> <CABCOCHS-qYRJuvrDNj+CbL6p+cdt84Mc+a-P-MiqU4x=V814aQ@mail.gmail.com>
In-Reply-To: <CABCOCHS-qYRJuvrDNj+CbL6p+cdt84Mc+a-P-MiqU4x=V814aQ@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.213.48.75]
Content-Type: multipart/alternative; boundary="_000_644DA50AFA8C314EA9BDDAC83BD38A2E0DFAF042SJCEML701CHMchi_"
MIME-Version: 1.0
X-CFilter-Loop: Reflected
X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020203.591E40E0.006F, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=169.254.3.56, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32
X-Mirapoint-Loop-Id: 199caaf241fb3db042866cd50c5a84f9
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/8WA90RWqcukT1aqJeufAnVTwm9g>
Subject: Re: [Netconf] In an update, when is a delete a delete?
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Network Configuration WG mailing list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 19 May 2017 00:53:42 -0000

So, I think so far the consensus is #1 is not a good idea.  So we can probably drop #1 and should choose between #2 and #3.

Personally, I would tend to agree with leaving RMON-type stuff separate, i.e. use a filter to select data nodes, not apply additional comparators for values.  However, if a filter allows to refer to state/values, then really the subscription could cover that.  I am not sure if a general warning would be sufficient to not issue such requests.  A client might issue an according request, but a publisher could feel free to reject a subscription request if the filter construct requests something that is not supported.  However, if the publisher could accept the request, then we run into the encoding issue that we need to distinguish why an object was omitted (or included): because it was deleted (created), or because its value no longer matches (or does match) the filter.

I interpret the “modified-in” and “modified-out” suggested by Kent precisely as a distinction between those cases.  “Modified-out” simply means its value changed so it no longer matches the filter (but the object still exists).  Whether we call it modified-in/out or something else is another question.  Of course, the issue is that this means this is a new case that is not covered by the patch syntax, which would require an extension of the encoding.

I find #3 simpler and more straightforward, but I can see applications for #2 and it results in the more general and potentially powerful mechanism.  Perhaps #2 then?

--- Alex

From: Andy Bierman [mailto:andy@yumaworks.com]
Sent: Thursday, May 18, 2017 2:53 PM
To: Kent Watsen <kwatsen@juniper.net>
Cc: Alexander Clemm <alexander.clemm@huawei.com>; Netconf <netconf@ietf.org>
Subject: Re: [Netconf] In an update, when is a delete a delete?



On Thu, May 18, 2017 at 2:15 PM, Kent Watsen <kwatsen@juniper.net<mailto:kwatsen@juniper.net>> wrote:
I'm unsure if this is a good example, but assuming you have data model snippet:

  list foo {
    key name;
    leaf name { type string;}
  }

and the on-change subscription snippet:

   /foo[name="x]

and the following occurs in time:

  T0: there are no 'foo' entries
  T1: foo entry w/ name=="y" is created
  T2: foo entry w/ name=="x" is created
  T3: foo entry "x" is renamed to "z"
  T4: foo entry "y" is renamed to "x"


Do you mean some proprietary non-standard rename operation?
Because NETCONF and RESTCONF have only delete(x) and create(y)

  T5: foo entry "x" is deleted

I'd expect:

  T0: nothing
  T1: nothing
  T2: "x" created notification
  T3: "x" modified-out notification
  T4: "x" modified-in notification


T3 and T4 events are not possible in NETCONF or RESTCONF.
There is no way to rename a data node. These protocols will
produce delete(x) and a create(y) events


  T5: "x" deleted notification

I think that this is your #2.

Kent  // as a contributor




Andy


On 5/17/17, 5:29 PM, "Netconf on behalf of Alexander Clemm" <netconf-bounces@ietf.org<mailto:netconf-bounces@ietf.org> on behalf of alexander.clemm@huawei.com<mailto:alexander.clemm@huawei.com>> wrote:

Hello all,

In updating the YANG-Push document (draft-ietf-netconf-yang-push), we have come across one issue that we wanted to raise with the working group.

As part of an on-change subscription, update records reflect the type of change (e.g. whether the value of an object has changed, or whether an object was created or deleted); a subscription allows also to specify whether interested only in specific types of changes (for example, only creates and deleted but no value changes).

At the same time, a subscription filter specifies which objects to include as part of a subscription and which not.  (Really, it is not so much of a “filter” on a stream that is generated independently of the filter, than it is a policy of which objects to include as part of subscribed update records.)   However, a subscription filter (such as XPath) can be used to also specify a value filter, which will include or exclude objects based on their current value. This makes it possible to e.g. subscribe to an object “foo” but only if its value is 5.

Now, this means that the same object could be included in one update, but excluded in another update, due to its value no longer meeting the filter criteria.  For example, if foo’s value changes from 5 to 3 in one cycle, a periodic subscription will no longer include foo in its next update.  The question now concerns how to properly handle this in the case of an on-change subscription.

One possibility concerns reporting the fact that “foo” no longer meets the subscription criteria and is no longer included in the update record as a “delete” event.  If foo’s value again becomes “5” at a later point in time, that would be reported as a “create” event.  If foo’s value changes again from 5 at a later point in time and then changes back to 3  before the time of the update (perhaps because the value changed during the dampening interval), it would be reported as another “delete” event (without ever reporting a create event).  On the other hand, if foo’s value changed from 3 to 6 and back again, nothing would be reported because it did not meet the filter criteria at any point in time.

From the perspective of the receiver this may make sense if it is synching its copy of the state.  However, from the perspective of the publisher, the object was never created or deleted – only its value changed, and the case when the object was truly created or deleted can no longer be distinguished from the case when its value changed.  A “create” simply means “an object now meets a filter criteria, that was not reported in the previous cycle” (which does not mean that the object was actually created – it may have been created, or it may have simply undergone a value change).

An alternative (let’s call it alternative 2) is therefore to make a distinction between whether an object was created or deleted, or whether its value fell in or out of a filter range.  This appears semantically cleaner.  However, it will require modifying the encoding to allow for distinction between those cases (currently, just plain patch encoding is used).

A third alternative is to let filters select only data nodes to subscribe to, and separate out the value filter (or disallow it as a feature altogether).  This alternative has the drawback of being less conceptually powerful, even if it may be easier to implement.

Thoughts?  Any preferences between 1, 2, and 3?
--- Alex


_______________________________________________
Netconf mailing list
Netconf@ietf.org<mailto:Netconf@ietf.org>
https://www.ietf.org/mailman/listinfo/netconf