[yang-doctors] YANG doctor review of draft-ietf-pim-igmp-mld-yang-02

"Jan Lindblad (jlindbla)" <jlindbla@cisco.com> Fri, 03 March 2017 22:44 UTC

Return-Path: <jlindbla@cisco.com>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0F86E1288B8 for <yang-doctors@ietfa.amsl.com>; Fri, 3 Mar 2017 14:44:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.522
X-Spam-Level:
X-Spam-Status: No, score=-14.522 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_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=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 2Mdw48bq8DnJ for <yang-doctors@ietfa.amsl.com>; Fri, 3 Mar 2017 14:44:37 -0800 (PST)
Received: from alln-iport-8.cisco.com (alln-iport-8.cisco.com [173.37.142.95]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EDC3B127076 for <yang-doctors@ietf.org>; Fri, 3 Mar 2017 14:44:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=16977; q=dns/txt; s=iport; t=1488581076; x=1489790676; h=from:to:cc:subject:date:message-id:mime-version; bh=eMBtTld4K2+Sxtnn/MW4Xn+2Py6VLOn+Ko3NicxtVm0=; b=TfpUiZZcHXQDpP8COr+wcibJZRprC7XfflrnEBoI5IiJSB6E0gsg1Wni VIAswn333LRWQGi50YA8dE2705JaVx5uoCXoSsLXv8dEGNVp8fnPXX9Fq ryNy6JDBW53dPYXruJG0nEbjIlbMGqnOJ2kMIgH426iXwJWX/U30uEKev 4=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0CUAQAN8blY/49dJa1eGgEBAQECAQEBAQgBAQEBg1GBWRmNY6FRgx2CD4INhiKCaD8YAQIBAQEBAQEBYiiFYg4SAYEAJwQBDYoAtXCLAQEBAQEBAQEBAQEBAQEBAQEBAQEBAR2GToIFinKCEh8Fj1aMVgGSMpEfkzoBHziBA1YVUAGGQol3gQ0BAQE
X-IronPort-AV: E=Sophos;i="5.35,239,1484006400"; d="scan'208,217";a="393118091"
Received: from rcdn-core-7.cisco.com ([173.37.93.143]) by alln-iport-8.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Mar 2017 22:44:35 +0000
Received: from XCH-RCD-008.cisco.com (xch-rcd-008.cisco.com [173.37.102.18]) by rcdn-core-7.cisco.com (8.14.5/8.14.5) with ESMTP id v23MiZEx013326 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Fri, 3 Mar 2017 22:44:35 GMT
Received: from xch-aln-004.cisco.com (173.36.7.14) by XCH-RCD-008.cisco.com (173.37.102.18) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Fri, 3 Mar 2017 16:44:35 -0600
Received: from xch-aln-004.cisco.com ([173.36.7.14]) by XCH-ALN-004.cisco.com ([173.36.7.14]) with mapi id 15.00.1210.000; Fri, 3 Mar 2017 16:44:35 -0600
From: "Jan Lindblad (jlindbla)" <jlindbla@cisco.com>
To: "Benoit Claise (bclaise)" <bclaise@cisco.com>, Stig Venaas <stig@cisco.com>
Thread-Topic: YANG doctor review of draft-ietf-pim-igmp-mld-yang-02
Thread-Index: AQHSlG+7E+BjPqISM0WvOL6ltv9f4w==
Date: Fri, 03 Mar 2017 22:44:35 +0000
Message-ID: <9185E63A-484F-46E9-A999-D90B0B39C38F@cisco.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-messagesentrepresentingtype: 1
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.61.226.185]
Content-Type: multipart/alternative; boundary="_000_9185E63A484F46E9A999D90B0B39C38Fciscocom_"
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/vqsnJBVxd_6_FJw8D3O5qRSVJhU>
Cc: YANG Doctors <yang-doctors@ietf.org>
Subject: [yang-doctors] YANG doctor review of draft-ietf-pim-igmp-mld-yang-02
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 03 Mar 2017 22:44:39 -0000

I am the assigned YANG doctor for the document in the subject. My primary focus has been the YANG model itself, and I'm far from an expert at IGMP or MLD.

Here are my comments:

- In section 2.2, it is stated that:

   For the same reason, wide constant ranges (for example, timer
   maximum and minimum) will be used in the model.  It is expected that
   vendors will augment the model with any specific restrictions that
   might be required.

The above statement is false, YANG augmentations can never restrict a base model. If vendor restrictions of ranges etc are needed, YANG deviations could be used. Each such deviation significantly reduces the interoperability and thus value of this model, however, so for places where variation is expected even before hand, I would much rather prefer that this variability is built right into the model. One possible way of doing that for leafs with possible variations in range is described further down.

- In section 2.3, it is stated:

   The current draft contains IGMP and MLD as separate schema branches
   in the structure. The reason for this is to make it easier for
   implementations which may optionally choose to support specific
   address families. And the names of objects may be different between
   the ipv4 (IGMP) and ipv6 (MLD) address families.


The current YANG file organization causes a lot of repetition, which is tiring for model author and reader alike. A testament of this is that pretty much all mistakes in the model occur twice, i.e. a clear sign of copy-paste modeling. The cited paragraph also mentions the possibility for a device to implement only IGMP or only MLD. The current YANG model do not make either of them optional by e.g. an if-feature statement. Another possibility that comes to mind would be to separate the IGMP and MLD documents into separate modules. Implementations could then choose which one(s) to implement.

- Section 3.1 specifies a global level, interface-global level and an interface-specific level of shadowing attributes for an interface. Can't say I understand the difference between the global and interface-global level really. Also when it comes to the YANG manifestation of this, the grouping interfaces-config-attributes overlaps quite a bit with grouping interfaces-config-attributes-igmp-mld. Why are both these levels needed, and if they are, why don't they use the same grouping? Supposing there's a reason, why is much of the content duplicated in two groupings?

- Section 3.1 also states:

   Where fields are not genuinely essential to protocol operation, they
   are marked as optional. Some fields will be essential but have a
   default specified, so that they need not be configured explicitly.
   The module structure also applies, where applicable, to the
   operational state and notifications as well.


In fact, no leafs are marked mandatory anywhere in the model. Apart from keys, this means they are all optional. There are two sides to examine around this:
+ Configuration leafs: There is no description of what happens if a leaf isn't set. E.g if the igmp/global/enable leaf is true or false, I know how to intepret that. But what does it mean if it doesn't have a value? This is a general concern for more or less every leaf.
+ Operational leafs: Since no leafs are mandatory, there is no requirement to include any particular leaf in a reply. This will make it hard for implementations reading the igmp/mld status, since they will have to be coded to cope with any and every leaf not being present in the query result. It would be good if some core leafs were defined as mandatory, so that applications could count on them being present.

- At the end, section 3.1 says:

   The IGMP and MLD model augments "/rt:routing/rt:control-plane-
   protocols" as opposed to augmenting "/rt:routing/rt:control-plane-
   protocols/ rt:control-plane-protocol" as the latter would allow
   multiple protocol instances per VRF, which does not make sense for
   IGMP and MLD.

It would certainly be possible to locate the igmp and mld containers under /routing/control-plane-protocols/control-plane-protocol and still keep the requirement with a single instance of these containers, if desired. I'm not opposed to the current design, but I'd just like to point out that the statement above is not necessarily true.

Then on a more detailed level, I'd like to see (line numbers according to rfcstrip):

- Leaf last-member-query-interval on line 315, 447: Add a units statement

- Leaf robustness-variable on line 353, 491: What do these values mean?

- Leaf group-policy on line 393, 431, 544: Is any string value ok, or what would be a valid value?

- Leaf dr on line 577: Maybe a slightly more verbose name would be easier for operators?

- Leaf interface on line 780, 820: Maybe "name" would be a better name?

- Line 825, 917: This is an ipv6 leaf, but the description talks about IPv4.

- Leaf group on line 407, 558, 951, 985: Is any ipv4/6 address ok, or only a multicast address?

- Many description statements are missing or blank. I'm sure the authors are aware, but for completeness I include this comment here

- There are no notifications in the model. Aren't there any relevant events to be notified about?


Finally, an example of how a leaf with potentially different ranges could be handled in a reasonably interoperable way. So instead of this:

module std-inflexible {
  ..
  leaf some-property {
    range "1..1000"; // Large range to be sure everyone's use case is covered
  }
}

We could model this variability like this:

module std-flexible {
  ..
  choice property-variants {
    leaf some-property-basic {
      range "1..100"; // All implementations must be able to handle this
    }
    leaf some-property-extended {
      if-feature some-property-extended;
      range "1..200"; // Many implementations can do this
    }
  }
}

module vendor-x {
  ..
  augment /std-flexible:property-variants {
    leaf some-propery-vendor-x {
      range "10..700";
      must "current() mod 10 = 0"; // In steps of 10 using this variant
    }
  }
}

The application can now choose to use some-property-basic (any device), some-propery-extended (only on devices that announce feature some-property-extended) or some-property-vendor-x (only on devices that announe the vendor-x namespace).

/jan