Subject: [DNSOP] Benjamin Kaduk's No Objection on draft-ietf-dnsop-iana-class-type-yang-03: (with COMMENT)

From: Benjamin Kaduk via Datatracker <[email-masked]>
Date: Wed, 02 Jun 2021 20:07:26 -0700

Benjamin Kaduk has entered the following ballot position for
draft-ietf-dnsop-iana-class-type-yang-03: No Objection

When responding, please keep the subject line intact and reply to all
email addresses included in the To and CC lines. (Feel free to cut this
introductory paragraph, however.)

Please refer to https://www.ietf.org/iesg/statement/discuss-criteria.html
for more information about DISCUSS and COMMENT positions.

The document, along with other ballot positions, can be found here:
https://datatracker.ietf.org/doc/draft-ietf-dnsop-iana-class-type-yang/

----------------------------------------------------------------------
COMMENT:
----------------------------------------------------------------------

Like Roman, I applaud the use of XSLT to avoid specifying redundant information
and allow for reasonably automated updates. Some other comments below.

Section 3

   The IANA document "Domain Name System (DNS) Parameters"
   [IANA-DNS-PARAMETERS] contains altogether thirteen registries.  The

I suggest "at the time of this writing" just in case we add or remove
some registries.

Section 4

   Upon publication of this document, the initial revision of the "iana-
   dns-class-rr-type" YANG module SHALL be created by applying the XSLT
   stylesheet from Appendix A to the XML version of
   [IANA-DNS-PARAMETERS].

This is just a random observation from a bystander, but my understanding
is that IANA is gradually moving registries to a database backend, so
that the XML version may in some sense not be the "most authoritative"
version (or the "preferred form for modification" to use the open-source
software jargon).  The XML format mand XSLT are both quite well-defined,
and the database backend might not be, though, so it's not clear that
moving to a procedure to generate YANG directly from the database would
be an advantage over taking a detour via XML.

   "status":  Include only if a class or type registration has been
      deprecated or obsoleted.  In both cases, use the value "obsolete"
      as the argument of the "status" statement.

I don't see any logic in the XSLT that looks for "deprecated", just
"OBSOLETE".  (This may be fine, given that there's not currently
anything listed as deprecated in the live registry...)

Section 5

The XSLT is only run over trusted input, so it is safe to ignore the
risk of any issues due to improper escaping or input validation.
Whether or not we need to note this property in the RFC is not entirely
clear, though.

Appendix A

   This appendix contains an XSLT 1.0 stylesheet [W3C.REC-xslt-19991116]
   that is intended to be used for generating the initial revision of
   the "iana-dns-class-rr-type" YANG module.  This is achieved by

Is this only going to be used for the initial revision, or for updates
as well?

     <variable name="lf">&#xA;</variable>

This seems unused (and instead we have a lot of &#xA; literals).

     contact
       "        Internet Assigned Numbers Authority

The leading spaces seem a little out of place in the rendered output, to
me.

     description
       "This YANG module translates IANA registries 'DNS CLASSes' and
        'Resource Record (RR) TYPEs' to YANG derived types.
        [...]
        This initial version of this YANG module was generated from
        the corresponding IANA registries using a XSLT stylesheet

Though I guess this part might not work well for a non-initial revision.

       "IANA 'Domain Name System (DNS) Parameters' registry
        https://www.iana.org/assignments/dns-parameters";</text>
        <text>&#xA;&#xA;</text>

I may be missing something, but why two <text> children of the
<variable>?

       <apply-templates
           select="iana:registry[@id='dns-parameters-2']"/>
       <apply-templates
           select="iana:registry[@id='dns-parameters-4']"/>

Hardcoding the names "dns-parameters-2" and "dns-parameters-4" is in the
class of things that (if I understand correctly) IANA is not always keen
on people doing.  In this case it's probably not a big issue, since the
output of the transformation will be looked at by a human before it's
published, and we can modify the template if needed, but I do wonder if
any identifier more closely aligned to the registry's role is available.

---

From: Ladislav Lhotka <[email-masked]>
Date: Fri, 04 Jun 2021 10:46:09 +0200

Hi Benjamin,

thanks for the review, please see below.

Benjamin Kaduk via Datatracker <[email-masked]> writes:

...

OK, added.

> be an advantage over taking a detour via XML.

That's why this document only deals with the initial revision of the module. Whilst it is perfectly possible that IANA will use the stylesheet for subsequent revisions, it is officially out of scope for this document.

> anything listed as deprecated in the live registry...)

Right, the XSLT stylesheet is expected to work on those two registries in their current state. The registry XML is loose in some respects and it is not clear (to me at least) how a deprecated entry will exactly look like. It would be certainly better to indicate the status e.g. with an XML attribute. Searching for magic words like "OBSOLETE" in the entry text is brittle, but it's currently the only way.

> Whether or not we need to note this property in the RFC is not entirely

I assume that the resulting YANG module will also be validated, e.g. with pyang, so any unintentional translation errors should be discovered.

> Is this only going to be used for the initial revision, or for updates

As I wrote, the official target is only the initial revision.

> This seems unused (and instead we have a lot of &#xA; literals).

Correct, I first used this variable but then realized its use is in fact clumsier that the literal character entity. Will remove the definition.

> The leading spaces seem a little out of place in the rendered output, to

This tries to follow the usual formatting conventions used e.g. in the iana-if-type module (RFC 7224). Unfortunately, YANG doesn't support any markup in the description text.

> Though I guess this part might not work well for a non-initial revision.

Right, the descriptions of subsequent revisions will have to be edited manually because the registries themselves contain no revision info, only revision date.

> I may be missing something, but why two <text> children of the

The resulting line would exceed 72 characters, if the two LF entities were inserted directly after the semicolon. 

> any identifier more closely aligned to the registry's role is available.

Again, it is only required to work for the initial revision. I would be happy to work with IANA on a more "durable" version of the stylesheet but, as you wrote, the XML format may not be maintained for long.

Thanks, Lada

-- 
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67

---

From: Benjamin Kaduk <[email-masked]>
Date: Fri, 4 Jun 2021 11:34:09 -0700

Hi Lada,

> Right, the XSLT stylesheet is expected to work on those two registries in their current state. The registry XML is loose in some respects and it is not clear (to me at least) how a deprecated entry…

Understood about the current way being brittle but nothing better being
available (yet).

My comment here was intended more along the lines of an apparent
inconsistency between the text and the code -- the text says that we will
set "status obsolete" if the registration is deprecated, but the XSLT
doesn't do that.  IMO it would be better to either drop the text about
deprecated or add code to look for it (but this is just a non-blocking
comment so my opinion doesn't count for too much).

> I assume that the resulting YANG module will also be validated, e.g. with pyang, so any unintentional translation errors should be discovered.

I guess that gets a bit into Francesca's point about how involved the DEs
or other parties will be when (new) output is generated.  I don't think we
need to say more in this subthread, though.

> Correct, I first used this variable but then realized its use is in fact clumsier that the literal character entity. Will remove the definition.

Makes sense that actually using it is clumsier than the literal.

> The resulting line would exceed 72 characters, if the two LF entities were inserted directly after the semicolon. 

Ah!  Thanks for the explanation.

> Again, it is only required to work for the initial revision. I would be happy to work with IANA on a more "durable" version of the stylesheet but, as you wrote, the XML format may not be maintained…

I feel pretty confident that IANA will continue to publish an XML version
even if it ends up being generated from some other source.  Anyway, there's
no urgency for getting a more "durable" version, so we should probably just
wait and react if any issues arise in the future.

Thanks,

Ben

---

From: Ladislav Lhotka <[email-masked]>
Date: Mon, 07 Jun 2021 14:09:59 +0200

Benjamin Kaduk <[email-masked]> writes:

...

> comment so my opinion doesn't count for too much).

These are instructions for IANA regarding future updates, where registry-deprecated items might come into play. They can choose how to deal with it:

- either via manual updates of the YANG module, exactly as it is done for, e.g., iana-if-type [RFC7224]
- or by extending the XSLT stylesheet, and possibly also fixing the flaws in the XML

...

> wait and react if any issues arise in the future.

+1

Thanks, Lada