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

Kent Watsen <kwatsen@juniper.net> Thu, 18 May 2017 21:21 UTC

Return-Path: <kwatsen@juniper.net>
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 58EAB12EAB4 for <netconf@ietfa.amsl.com>; Thu, 18 May 2017 14:21:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.8
X-Spam-Level:
X-Spam-Status: No, score=-4.8 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_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=juniper.net
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 NnIYe4ckrq1U for <netconf@ietfa.amsl.com>; Thu, 18 May 2017 14:21:51 -0700 (PDT)
Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0123.outbound.protection.outlook.com [104.47.41.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5D81A129420 for <netconf@ietf.org>; Thu, 18 May 2017 14:15:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=AcRH6nJeWwkx2oSTDEHoNKv988S0bYS2eQVcEtbLYrM=; b=PwQjXjaT717DcN9vIlcgIOxgEAKHazDBUc1VmL0r15ZvqjynsAIp2m66ckcK0OVK9g7uaHXMC9xi3sGI5zqPoHtbQIe3Cf/ODnQBWwwCQPszex9BZ01R7Uf8MtOoZHm7V4lYDdgNeIsIzw/d3sBeWHHh2N5SxAfZrDcAXMrKeik=
Received: from BN3PR0501MB1442.namprd05.prod.outlook.com (10.160.117.151) by BN3PR0501MB1443.namprd05.prod.outlook.com (10.160.117.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.8; Thu, 18 May 2017 21:15:48 +0000
Received: from BN3PR0501MB1442.namprd05.prod.outlook.com ([10.160.117.151]) by BN3PR0501MB1442.namprd05.prod.outlook.com ([10.160.117.151]) with mapi id 15.01.1101.019; Thu, 18 May 2017 21:15:48 +0000
From: Kent Watsen <kwatsen@juniper.net>
To: Alexander Clemm <alexander.clemm@huawei.com>, Netconf <netconf@ietf.org>
Thread-Topic: [Netconf] In an update, when is a delete a delete?
Thread-Index: AQHS0Bvr5ppCqKOrQVCrK5qvBNQM2A==
Date: Thu, 18 May 2017 21:15:48 +0000
Message-ID: <8340AFB7-350A-4641-A130-4114E39C73E1@juniper.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/f.20.0.170309
authentication-results: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=juniper.net;
x-originating-ip: [66.129.241.10]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; BN3PR0501MB1443; 7:+YL8W614rsSgbQW9EWxMHBnK9iS5ngW40kfegGp1AnUY3/GNFLUUO5cYbmJXQsFtlpQyBLQnq4qgL679B/8/yHO++3z44attPDeKzpm5fHzxOs2U8Wq2ARAHD75faaN1qsSBUoizP8kjWah9JHxHrHk+4bHmfLn1tSDiPqIJTShYyHj3DUDH0w0FT6WWluBqn++eQH9zvAz5hfuun6lWuWOtyHdDElSIV2Cf2JzhD8gwcwzVFOswgHJz8Uhn7YfUvxQuYj5ryQnMqVKcFisdJIao10ZPnsiL2NO9Ic8tmD31wapXyjInUJsnxuSXbVqUINSqVz31SJ8z1RJoMFUtqw==
x-ms-traffictypediagnostic: BN3PR0501MB1443:
x-ms-office365-filtering-correlation-id: f7761d78-d052-46cd-6a2e-08d49e330e57
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081)(201702281549075); SRVR:BN3PR0501MB1443;
x-microsoft-antispam-prvs: <BN3PR0501MB144306BA7B36F0FAEE14F6EDA5E40@BN3PR0501MB1443.namprd05.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(50582790962513)(21748063052155)(211171220733660);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(20161123562025)(20161123558100)(20161123555025)(6072148); SRVR:BN3PR0501MB1443; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0501MB1443;
x-forefront-prvs: 0311124FA9
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39450400003)(39860400002)(39850400002)(39400400002)(39840400002)(24454002)(377454003)(53754006)(38730400002)(229853002)(46360400001)(53936002)(54896002)(6512007)(102836003)(189998001)(6116002)(36756003)(6306002)(99286003)(77096006)(6486002)(122556002)(6246003)(5660300001)(2420400007)(6436002)(15650500001)(7736002)(6506006)(3846002)(2906002)(10710500007)(8676002)(81166006)(66066001)(7110500001)(33656002)(478600001)(25786009)(8936002)(54356999)(50986999)(86362001)(3660700001)(3280700002); DIR:OUT; SFP:1102; SCL:1; SRVR:BN3PR0501MB1443; H:BN3PR0501MB1442.namprd05.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en;
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_8340AFB7350A4641A1304114E39C73E1junipernet_"
MIME-Version: 1.0
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-originalarrivaltime: 18 May 2017 21:15:48.6362 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: bea78b3c-4cdb-4130-854a-1d193232e5f4
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0501MB1443
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/6XzxRQy6m6gmrnS-5jywwEUmnQ8>
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: Thu, 18 May 2017 21:21:54 -0000

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"
  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
  T5: "x" deleted notification

I think that this is your #2.

Kent  // as a contributor



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