-
Bug
-
Resolution: Done
-
Medium
-
None
-
None
-
None
-
None
When mounting peer, user is supposed to provide list of modules supported by given mount point. There is mechanism in place that allow to recursively resolve module dependencies using governance service.
Problem can occur if user provide module (that is without revision) and same module is resolved as a part of dependency tree. Result is that 2 different entries are created in schema context (with same YANG source) and error is thrown:
Caused by: org.opendaylight.yangtools.yang.parser.spi.source.SourceException: Module namespace collision: http://openconfig.net/yang/types/yang. At [ByteSource.wrap(6D6F64756C65206F70656E636F6...)]:1:0 [at [ByteSource.wrap(6D6F64756C65206F70656E636F6...)]:1:0]
at org.opendaylight.yangtools.yang.parser.rfc7950.stmt.module.AbstractModuleStatementSupport.onLinkageDeclared(AbstractModuleStatementSupport.java:104) ~[480:org.opendaylight.yangtools.yang-parser-rfc7950:3.0.4]
at org.opendaylight.yangtools.yang.parser.stmt.reactor.StatementDefinitionContext.onDeclarationFinished(StatementDefinitionContext.java:78) ~[479:org.opendaylight.yangtools.yang-parser-reactor:3.0.4]
at org.opendaylight.yangtools.yang.parser.stmt.reactor.StatementContextBase.endDeclared(StatementContextBase.java:595) ~[479:org.opendaylight.yangtools.yang-parser-reactor:3.0.4]
This can be easily eliminated by ignoring revision field of module when doing dependnecy resolution.