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

"Eric Voit (evoit)" <evoit@cisco.com> Tue, 23 May 2017 16:13 UTC

Return-Path: <evoit@cisco.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 9EDF2129BB0 for <netconf@ietfa.amsl.com>; Tue, 23 May 2017 09:13:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.523
X-Spam-Level:
X-Spam-Status: No, score=-14.523 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, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=unavailable 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 BKciCAO9mmbt for <netconf@ietfa.amsl.com>; Tue, 23 May 2017 09:13:14 -0700 (PDT)
Received: from rcdn-iport-7.cisco.com (rcdn-iport-7.cisco.com [173.37.86.78]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2E3A6120046 for <netconf@ietf.org>; Tue, 23 May 2017 09:04:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=8120; q=dns/txt; s=iport; t=1495555441; x=1496765041; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=Fq+POhB459MHtS11wgwB6QyU3aWjii+2a4K+0qdy7c0=; b=YzfqQ+WFs+sSP4kAaar7NXatCRAxMalGABFPkMjAQaLV1hHOFkyCXB0u FNDzWmnShbiMgkpyEFCI8myd1ONkk0PuTJrGLcc5laCaWVvg2Yu1jsmw9 av62uMrHDOYr1VKJpOxs4zPz7DAVK/8pCzAFyX3tc4jz6GHsdzVM0dIfz E=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0DmAADzXCRZ/4ENJK1cGQEBAQEBAQEBAQEBBwEBAQEBgyorYjEBWgeOAJF3lXeCDyELhS5KAoJ/PxgBAgEBAQEBAQFrKIUYAQEBAQIBAQE4NAsFBwQCAQgOAwQBAQEMAREJBycLFAkIAQEEAQ0FCIoWCA6vLItFAQEBAQEBAQEBAQEBAQEBAQEBAQEBGAWGX4RGNIQ0GoYIBZ4bAZMcgg6PbYkBi0kBHziBCnEVRoR3HIFjdogRgQ0BAQE
X-IronPort-AV: E=Sophos;i="5.38,382,1491264000"; d="scan'208";a="247037018"
Received: from alln-core-9.cisco.com ([173.36.13.129]) by rcdn-iport-7.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 23 May 2017 16:04:00 +0000
Received: from XCH-RTP-015.cisco.com (xch-rtp-015.cisco.com [64.101.220.155]) by alln-core-9.cisco.com (8.14.5/8.14.5) with ESMTP id v4NG3xUn018036 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 23 May 2017 16:04:00 GMT
Received: from xch-rtp-013.cisco.com (64.101.220.153) by XCH-RTP-015.cisco.com (64.101.220.155) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Tue, 23 May 2017 12:03:59 -0400
Received: from xch-rtp-013.cisco.com ([64.101.220.153]) by XCH-RTP-013.cisco.com ([64.101.220.153]) with mapi id 15.00.1210.000; Tue, 23 May 2017 12:03:59 -0400
From: "Eric Voit (evoit)" <evoit@cisco.com>
To: Martin Bjorklund <mbj@tail-f.com>, "alexander.clemm@huawei.com" <alexander.clemm@huawei.com>
CC: "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [Netconf] In an update, when is a delete a delete?
Thread-Index: AdLPVDqN5ppCqKOrQVCrK5qvBNQM2AAiVy4AANCNThAADN/oAAAg/5SA
Date: Tue, 23 May 2017 16:03:59 +0000
Message-ID: <adbaf2b697434bf4b44a1910af6e677c@XCH-RTP-013.cisco.com>
References: <644DA50AFA8C314EA9BDDAC83BD38A2E0DFAE8C1@SJCEML701-CHM.china.huawei.com> <20170518.084938.2164174821851630928.mbj@tail-f.com> <644DA50AFA8C314EA9BDDAC83BD38A2E0DFAFB43@SJCEML701-CHM.china.huawei.com> <20170522.212946.153811938714116755.mbj@tail-f.com>
In-Reply-To: <20170522.212946.153811938714116755.mbj@tail-f.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.118.56.228]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/0AdNs-l7bts7iIFcNYvz3Lmj19o>
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: Tue, 23 May 2017 16:13:16 -0000

> Martin Bjorklund, May 22, 2017 3:30 PM
> 
> Alexander Clemm <alexander.clemm@huawei.com> wrote:
> > Hi Martin,
> >
> > Almost overlooked your question below.  What is meant by the filter is
> > specified in section 3.5 of the YANG-Push document.
> >
> > "Only a single filter can be applied to a subscription at a time.  The
> > following filter types are included in the yang-push data model:
> > [subtree] [xpath]"
> 
> Actually, only "subtree" is defined in yang-push, "xpath" is defined in
> subscribed-notifications.

At the top of yang-push page 7, xpath selection is described.  Is there something you feel missing?

>  [Side note - I think this is wrong, subscribed-notifications should also define "subtree".]
>
> But these filters are used by the server to decide if a certain notification that
> has been generated will be sent to the client or not.

Yes, the filters in subscribed-notification are supposed to give a boolean indication as to whether a specific event should traverse the filter in its entirety. RFC6241 section 6 subtree filters are written to provide a subset of content.   I suppose it would be possible to define an event-based subtree-filter-type where a non-null result of the subtree filter means that a particular event should traverse that filter.  Is this what you are suggesting?

> If you want to define filters to specifify which nodes to subscribe to, I think
> you need to define new filters, not try to reuese these notification filters.

Filtering syntax is hard, so we have been trying to adopt whatever is available for GET.  This way we don't have to educate users on a new universe of what is possible.  I fully expect that lots of learnings are going to come in the industry here over time, and this will be revisited in the future.

> As for your question, I think such a filter should be defined to return a node-
> set to which the client subscribe to changes.  If any node (or subnode to) in
> this node-set changes, the notif will be sent.  Then the question about value
> comparision is not relevant anymore.

Excellent, on-change should only send an update if the results of the subscription filter have changed since the previous push.   It is quite possible that an object has been created and then deleted since the last push.  Representing this was the genesis of Alex's question.

Eric

> /martin
> 
> 
> 
> 
> 
> >
> > In effect, the filter specifies which data nodes to consider when
> > sending updates.
> >
> > ---Alex
> >
> >
> > -----Original Message-----
> > From: Martin Bjorklund [mailto:mbj@tail-f.com]
> > Sent: Wednesday, May 17, 2017 11:50 PM
> > To: Alexander Clemm <alexander.clemm@huawei.com>
> > Cc: netconf@ietf.org
> > Subject: Re: [Netconf] In an update, when is a delete a delete?
> >
> > Hi,
> >
> > Alexander Clemm <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.
> >
> > Hmm, which filter are you talking about?  The only XPath filter I find
> > in the current set of documents is the
> > "ietf-subscribed-notifications:xpath" filter type (which btw is sorely
> > underspecified).  Section 2.2 of
> > draft-ietf-netconf-subscribed-notifications-02 says:
> >
> >    Events which evaluate to "true" as a
> >    result of the evaluation by the filter must traverse the filter in
> >    their entirety.
> >
> > It's not clear what this means, but my guess is that this is supposed
> > to work like the old RFC 5277 filters, where the filter expression is
> > evaluated on the notification contents, and if the expression returns
> > "true" (for XPath filters this means converting the results to a
> > boolean), then the notification is sent, otherwise not.
> >
> > But it seems you are referring to some other filter which would be
> > used to select a node set for which changes are reported?
> >
> > I would like to understand which filter mechanism you mean before
> > having an opinion in this matter.
> >
> >
> > /martin
> >
> >
> >
> >
> > > (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
> https://www.ietf.org/mailman/listinfo/netconf