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

Vladimir Vassilev <vladimir@transpacket.com> Sat, 13 October 2018 19:42 UTC

Return-Path: <vladimir@transpacket.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 646C8130E61 for <netconf@ietfa.amsl.com>; Sat, 13 Oct 2018 12:42:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 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 RwFtxPUg14ND for <netconf@ietfa.amsl.com>; Sat, 13 Oct 2018 12:42:50 -0700 (PDT)
Received: from mail.transpacket.com (s91205186171.blix.com [91.205.186.171]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DA30D130E57 for <netconf@ietf.org>; Sat, 13 Oct 2018 12:42:49 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by mail.transpacket.com (Postfix) with ESMTP id 5C96E14445DB; Sat, 13 Oct 2018 21:42:46 +0200 (CEST)
Received: from mail.transpacket.com ([127.0.0.1]) by localhost (mail.transpacket.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ZYYhj-o7VcCg; Sat, 13 Oct 2018 21:42:46 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1]) by mail.transpacket.com (Postfix) with ESMTP id 2F0E714445DD; Sat, 13 Oct 2018 21:42:46 +0200 (CEST)
Received: from mail.transpacket.com ([127.0.0.1]) by localhost (mail.transpacket.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id gFxS-lYFZWQM; Sat, 13 Oct 2018 21:42:46 +0200 (CEST)
Received: from [192.168.209.177] (s1853520235.blix.com [185.35.202.35]) by mail.transpacket.com (Postfix) with ESMTPSA id F0C4914442A4; Sat, 13 Oct 2018 21:42:45 +0200 (CEST)
To: Kent Watsen <kwatsen@juniper.net>, Rohit R Ranade <rohitrranade@huawei.com>, Martin Bjorklund <mbj@tail-f.com>
Cc: "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> <819ba6e3-89f4-63c4-35a5-c54172cc70cd@transpacket.com> <46A50778-6BC2-408B-BE9C-E15BAD49C075@juniper.net>
From: Vladimir Vassilev <vladimir@transpacket.com>
Message-ID: <cadd10e8-fde9-39e2-2db0-de22733ad950@transpacket.com>
Date: Sat, 13 Oct 2018 21:42:45 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0
MIME-Version: 1.0
In-Reply-To: <46A50778-6BC2-408B-BE9C-E15BAD49C075@juniper.net>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: nb
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/CaiKXjMlE4puqn17SUee5ndhqvo>
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: Sat, 13 Oct 2018 19:42:53 -0000

Hi Kent,

On 10/12/18 7:52 PM, Kent Watsen wrote:
> We should not try to ensure that two servers having the same response return the same value.
I do not disagree with that.
>    That would require the definition of a canonical form that we don't have.

IMO this is doable. There are other usecases apart from the yang library 
one that need canonical form representation of YANG data trees. Does 
"Restrictions for canonical form XML representation of YANG data" sound 
like a useful draft? A 1 page text with restrictions - some for the YANG 
data types lexical representation (identityref and instance-identifier) 
and some for the XML encoding format intended to guarantee the XML 
generated will be canonical nevertheless compatible with RFC 7950.

Vladimir

>
> We should (IMO) align the checksum value with HTTP Entity-Tag (ETag) [1] and, in particular, using a strong validator [2].  RESTCONF says that ETag SHOULD be available for each resource [3], including {+restconf}/ds/ietf-datastores:operational/ietf-yang-library:yang-library.  I know that we don't have to conflate these two things, but it makes sense to do so.
>
> PS: just realized that nmda-restconf didn't update [4]. This might be a problem.
>
> [1] https://tools.ietf.org/html/rfc7232#section-2.3
> [2] https://tools.ietf.org/html/rfc7232#section-2.1
> [3] https://tools.ietf.org/html/rfc8040#section-3.5.2
> [4] https://tools.ietf.org/html/rfc8040#section-3.4.1.2
>
> Kent // contributor
>
>
> -----Original Message-----
> From: Netconf <netconf-bounces@ietf.org> on behalf of Vladimir Vassilev <vladimir@transpacket.com>
> Date: Friday, October 12, 2018 at 6:56 AM
> To: Rohit R Ranade <rohitrranade@huawei.com>, Martin Bjorklund <mbj@tail-f.com>
> Cc: "netconf@ietf.org" <netconf@ietf.org>
> Subject: Re: [Netconf] the name "checksum" in YANG library
>
> Hi,
>
> On 10/12/18 7:59 AM, 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.
> There is this usecase where a client can compare the checksum against
> already retrieved checksum or a list of checksums and know that it is
> connected to a device with schema it was designed to work with or not,
> or has already retrieved the yang library contents and compiled and
> cached the schema in case of smarter client etc. I do not think
> replacing this information with the information how many times the
> schema has changed (since the last restart?, has it changed and returned
> back to the same state?) can serve the same purpose as the checksum even
> if the checksum is calculated with implementation dependent algorithm.
>
> That said it is clear that the presented usecase is dependent on what
> the vendor chose to implement as "checksum" algorithm. How probable it
> is that two different yang libraries generate identical checksums etc.
>
> Vladimir
>
>> With Regards,
>> Rohit
> _______________________________________________
> Netconf mailing list
> Netconf@ietf.org
> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.ietf.org_mailman_listinfo_netconf&d=DwICAg&c=HAkYuh63rsuhr6Scbfh0UjBXeMK-ndb3voDTXcWzoCI&r=9zkP0xnJUvZGJ9EPoOH7Yhqn2gsBYaGTvjISlaJdcZo&m=QwcIVKILbN6JGJBCGujvoCFYDuKfhlWPRNXIUv76Wt0&s=FtBu4_qYCzP67ExA8TL8cw1qhrLD6goeVAQMgbOvFTg&e=
>