Re: [Netconf] the name "checksum" in YANG library

Robert Wilton <rwilton@cisco.com> Fri, 12 October 2018 11:26 UTC

Return-Path: <rwilton@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 4B8FE12F1A6 for <netconf@ietfa.amsl.com>; Fri, 12 Oct 2018 04:26:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.957
X-Spam-Level:
X-Spam-Status: No, score=-14.957 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.456, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, 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 zyd23wkJAfyL for <netconf@ietfa.amsl.com>; Fri, 12 Oct 2018 04:26:55 -0700 (PDT)
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 9AC671293FB for <netconf@ietf.org>; Fri, 12 Oct 2018 04:26:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=4431; q=dns/txt; s=iport; t=1539343614; x=1540553214; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=NlEkGHfZP5Yeqd50eGB3aaGBRDpYV5g3WcFx2/Wof9U=; b=WJDCxOii4amz7A8ZMf8iDSW/viLGXZ4wWZwpTjmZYt8mtxbtG5NKO7px UG124/x9aNBmpej5hWl/797M1TJmQGTgbTa9gCZGicsR3KPl/tiC7fTXH DIwpZW8hoAhCjCKCGqFrom5OJ2uDnbSOVnaLnaZuKX6gUPxyFYltCdLhJ s=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0A+AACAhMBb/xbLJq1lGQEBAQEBAQEBAQEBAQcBAQEBAQGBZYFVgRVtEiiDdYh1jTotepgHDRgLgVSCL0YChHk4FgEDAQECAQECbRwMhTkBAQEEAQEhDwEFNgsMBAsRBAEBAQICIwMCAicfCQgGDQYCAQGDHAGCAQ+jbRGBIoEuhHeEZQWBC4pSgUE/gRIngjY1gxsBAYFLAoMVglcCiRKFKI9iCZBSBheBT4dahm2JGYZVhjaBWiGBVTMaCBsVO4JsgiUYiFuFPz4wiguCTAEB
X-IronPort-AV: E=Sophos;i="5.54,371,1534809600"; d="scan'208";a="7129313"
Received: from aer-iport-nat.cisco.com (HELO aer-core-3.cisco.com) ([173.38.203.22]) by aer-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Oct 2018 11:26:51 +0000
Received: from [10.63.23.158] (dhcp-ensft1-uk-vla370-10-63-23-158.cisco.com [10.63.23.158]) by aer-core-3.cisco.com (8.15.2/8.15.2) with ESMTP id w9CBQp9q014444; Fri, 12 Oct 2018 11:26:51 GMT
To: Rohit R Ranade <rohitrranade@huawei.com>
Cc: Martin Bjorklund <mbj@tail-f.com>, "netconf@ietf.org" <netconf@ietf.org>
References: <20181011.124600.2085483972062437440.mbj@tail-f.com> <991B70D8B4112A4699D5C00DDBBF878A6BC567C6@dggeml510-mbx.china.huawei.com> <20181011.133113.643945777606446073.mbj@tail-f.com> <991B70D8B4112A4699D5C00DDBBF878A6BC57080@dggeml510-mbx.china.huawei.com>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <674660c8-13e4-2fad-8a7e-1fef2dd3f572@cisco.com>
Date: Fri, 12 Oct 2018 12:26:50 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
MIME-Version: 1.0
In-Reply-To: <991B70D8B4112A4699D5C00DDBBF878A6BC57080@dggeml510-mbx.china.huawei.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Content-Language: en-US
X-Outbound-SMTP-Client: 10.63.23.158, dhcp-ensft1-uk-vla370-10-63-23-158.cisco.com
X-Outbound-Node: aer-core-3.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/cUWkXIQYf1GNyNAtoOcRvxCU5MU>
Subject: Re: [Netconf] the name "checksum" in YANG library
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
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, 12 Oct 2018 11:26:57 -0000

Hi Rohit,

If the server restarts, or the YANG management daemon on the server 
restarts, and the YANG library content is the same then it is less work 
on the client to return the same content-id value.

It isn't the end of the world if it is different because it just forces 
the client to re-download and re-parse YANG library. However, it could 
be a problem for the client if the server returns the same value if the 
server reboots and uses a different set of YANG modules after it has 
rebooted (e.g. after a software upgrade).

Perhaps if you write the counter to persistent storage this can still be 
made to work in a reliable way, but using a robust hash function over 
the contents in YANG library is probably a simpler approach.   I would 
predict that if MurmurHash3, generating a 128 bit hash value, is used 
over the Yang Library contents then the risk of a collision (i.e. where 
the content differs, but hashes to the same value) would be extremely 
low in practice.

Thanks,
Rob


On 12/10/2018 06:59, Rohit R Ranade wrote:
> Hi Martin,
>
> " The value of this leaf MUST change whenever the
>        information in the YANG library changes." ==> This statement in Section 3, indicates that the value must change when content changes.
>
> The draft has also placed a constraint that it is a " unique implementation-specific identifier". When the contents changes, especially if the length of the data which is used for checksum changes, then the resulting checksum values may not be unique.
>
> So I feel it is simpler, if a counter is used.
>
> With Regards,
> Rohit
>
> -----Original Message-----
> From: Martin Bjorklund [mailto:mbj@tail-f.com]
> Sent: 11 October 2018 17:01
> To: Rohit R Ranade <rohitrranade@huawei.com>
> Cc: netconf@ietf.org
> Subject: Re: [Netconf] the name "checksum" in YANG library
>
> Rohit R Ranade <rohitrranade@huawei.com> wrote:
>> Since this leaf has to change every-time the content of YANG library
>> changes, "content-modify-count" can also be used which is simple for a
>> server to implement (just increment when content changes) and also for
>> client or a human reader to understand.
> But it doesn't have to change everytime, it could very well be implemented as a checksum of the contents.
>
>
> /martin
>
>
>>
>> -----Original Message-----
>> From: Netconf [mailto:netconf-bounces@ietf.org] On Behalf Of Martin
>> Bjorklund
>> Sent: 11 October 2018 16:16
>> To: netconf@ietf.org
>> Subject: [Netconf] the name "checksum" in YANG library
>>
>> Hi,
>>
>> Several reviewers in the IESG have commented that the name "checksum"
>> in YANG library is misleading.  It is not really a checksum ('There is
>> no requirement that the same information always results in the same
>> "checksum" value.')
>>
>> So since many people have complained, maybe we should change it.
>>
>> After a quick discussion among (some of the) authors, we suggest that
>> we call it "YANG library content identifier" or "content-id" for
>> short.
>>
>> The changes would be:
>>
>> OLD:
>>
>>     o  YANG library checksum: A server-generated checksum of the contents
>>        of the YANG library.
>>
>> NEW:
>>
>>     o  YANG library content identifier: A server-generated identifier of
>>        the contents of the YANG library.
>>
>>
>> OLD:
>>
>>     o  The "/yang-library/checksum" leaf contains the YANG library
>>        checksum, which is a unique implementation-specific identifier
>>        representing the current information in the YANG library on a
>>        specific server.
>>
>>
>> NEW:
>>
>>     o  The "/yang-library/content-id" leaf contains the YANG library
>>        content identifier, which is a unique implementation-specific
>>        identifier representing the current information in the YANG
>>        library on a specific server.
>>
>>
>> .... and various simpler search&replaces.
>>
>>
>> We would also update the schema-mount and netconf-nmda documents to
>> use the new term.
>>
>>
>> Does anyone object to this change?
>>
>>
>>
>> /martin
>>
>> _______________________________________________
>> Netconf mailing list
>> Netconf@ietf.org
>> https://www.ietf.org/mailman/listinfo/netconf
>>
> _______________________________________________
> Netconf mailing list
> Netconf@ietf.org
> https://www.ietf.org/mailman/listinfo/netconf
> .
>