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

Rohit R Ranade <rohitrranade@huawei.com> Fri, 12 October 2018 11:51 UTC

Return-Path: <rohitrranade@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 A1E73130E0F for <netconf@ietfa.amsl.com>; Fri, 12 Oct 2018 04:51:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.601
X-Spam-Level:
X-Spam-Status: No, score=-2.601 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-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 DXuBwvtCJ24C for <netconf@ietfa.amsl.com>; Fri, 12 Oct 2018 04:51:50 -0700 (PDT)
Received: from huawei.com (lhrrgout.huawei.com [185.176.76.210]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 861EF126F72 for <netconf@ietf.org>; Fri, 12 Oct 2018 04:51:49 -0700 (PDT)
Received: from LHREML712-CAH.china.huawei.com (unknown [172.18.7.107]) by Forcepoint Email with ESMTP id 6C11BC59D05E5 for <netconf@ietf.org>; Fri, 12 Oct 2018 12:51:41 +0100 (IST)
Received: from DGGEML401-HUB.china.huawei.com (10.3.17.32) by LHREML712-CAH.china.huawei.com (10.201.108.35) with Microsoft SMTP Server (TLS) id 14.3.399.0; Fri, 12 Oct 2018 12:40:38 +0100
Received: from DGGEML510-MBX.china.huawei.com ([169.254.2.22]) by DGGEML401-HUB.china.huawei.com ([fe80::89ed:853e:30a9:2a79%31]) with mapi id 14.03.0399.000; Fri, 12 Oct 2018 19:40:23 +0800
From: Rohit R Ranade <rohitrranade@huawei.com>
To: Robert Wilton <rwilton@cisco.com>
CC: Martin Bjorklund <mbj@tail-f.com>, "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [Netconf] the name "checksum" in YANG library
Thread-Index: AQHUYU+r+OxuXa+NZUuar3yMev1i1aUZ5GTQ//9+tICAAbiJgP//2JMAgACIoPA=
Date: Fri, 12 Oct 2018 11:40:23 +0000
Message-ID: <991B70D8B4112A4699D5C00DDBBF878A6BC572E8@dggeml510-mbx.china.huawei.com>
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> <674660c8-13e4-2fad-8a7e-1fef2dd3f572@cisco.com>
In-Reply-To: <674660c8-13e4-2fad-8a7e-1fef2dd3f572@cisco.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.18.150.121]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-CFilter-Loop: Reflected
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/0iIVjBm8mKscDPerwM5X1N6Fj9M>
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:51:56 -0000

Hi Robert,

When I read that the identifier is a "unique implementation-specific identifier", I inferred that this identifier should generate a unique value whenever the contents change.
So I inferred that there should not be a repetition of the identifier values. But the use-cases presented show that to make full use of this leaf, it is better if same content generated the same identifier.

Maybe if we removed the term "unique", then this doubt may not arise.

With Regards,
Rohit

-----Original Message-----
From: Robert Wilton [mailto:rwilton@cisco.com] 
Sent: 12 October 2018 16:57
To: Rohit R Ranade <rohitrranade@huawei.com>
Cc: Martin Bjorklund <mbj@tail-f.com>; netconf@ietf.org
Subject: Re: [Netconf] the name "checksum" in YANG library

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
> .
>