Subject: [netmod] bug in RFC 6020

From: Andy Bierman <[email-masked]>
Date: Sat, 27 Aug 2011 10:20:40 -0700

Hi,

I was looking into a yuma bug report on leafrefs, so I re-read RFC 6020,
and I can't believe we missed this...

The ABNF clearly shows that the 'require-instance' statement is allowed
in a leafref definition:

    leafref-specification =
                          ;; these stmts can appear in any order
                          path-stmt stmtsep
                          [require-instance-stmt stmtsep]

Yet in sec 9.9 (leafref builtin type):

9.9.1.  Restrictions

    A leafref cannot be restricted.

Compare that with the instance-identifier (9.13.1 and 9.13.2) for the correct text.

I remember from interim meetings and mailing list discussion that the intent of the NETMOD WG
is reflected in the ABNF, not the normative definition.  Does anybody remember it differently?
Which is correct? The ABNF or section 9.9.1?

Andy

---

From: Martin Bjorklund <[email-masked]>
Date: Sun, 28 Aug 2011 22:43:52 +0200 (CEST)

Hi,

> Which is correct? The ABNF or section 9.9.1?

(Unfortunatley) section 9.9.1 is correct and the ABNF is wrong.

require-instance on leafrefs was there, but removed in WG draft -06.
There are a couple of ML threads around April-June 2009, e.g., one
called "leafref issues" discussing the semantics of leafrefs, and
after that, the consensus was to remove require-instance for leafrefs.

/martin

---

From: Andy Bierman <[email-masked]>
Date: Sun, 28 Aug 2011 16:02:14 -0700

On 08/28/2011 01:43 PM, Martin Bjorklund wrote:
> Hi,
>
> Andy Bierman<[email-masked]>  wrote:

That explains why there is a field for it in the yuma code
but the parser code never sets it -- because YANG doesn't allow
require-instance for a leafref.

Is there an Errata node for the ABNF already?

Also, what about the text that seems to indicate leafref instance checking
is done right away (at edit-config time) even though it clearly is done
when a config is validated? IMO, the leafref builtin type section
could be more clear the constraint refers to a valid datastore, not a data tree.

Andy