[CONTROLLER-811] Installing ODL-RESTCONF feature causes missing yang file exception Created: 11/Sep/14  Updated: 11/Nov/14  Resolved: 11/Nov/14

Status: Resolved
Project: controller
Component/s: mdsal
Affects Version/s: Helium
Fix Version/s: None

Type: Bug
Reporter: Devin Avery Assignee: Devin Avery
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Mac OS
Platform: PC


External issue ID: 1819

 Description   

It appears that the order of bundles in the feature.xml matters in terms of how the yang files are loaded by the config subsystem.

When I do a feature:install odl-restconf I see the below exception:

2014-09-11 12:34:29,218 | INFO | Local user karaf | SharedSchemaContextFactory | 96 - org.opendaylight.yangtools.yang-parser-impl - 0.6.2.SNAPSHOT | Failed to assemble sources
SchemaResolutionException{unsatisfiedImports={SourceIdentifier [name=sal-remote-augment@2014-7-8]=[ModuleImportImpl [name=sal-remote, revision=2014-01-14]]}}
at org.opendaylight.yangtools.yang.parser.repo.SharedSchemaContextFactory$2.apply(SharedSchemaContextFactory.java:77)
at

== Full Exception @ end ===

When I modify the odl-restconf feature and move the

<bundle>mvn:org.opendaylight.controller/sal-remote/${mdsal.version}</bundle>

above

<bundle>mvn:org.opendaylight.controller/sal-rest-connector/${mdsal.version}</bundle>

the exception goes away.

Unknown what affects this have.

==== Possible Resolution ====

Move the bundle for now, and long term we should look at removing the order dependency.

==== FULL EXCEPTION ====

2014-09-11 12:34:29,218 | INFO | Local user karaf | SharedSchemaContextFactory | 96 - org.opendaylight.yangtools.yang-parser-impl - 0.6.2.SNAPSHOT | Failed to assemble sources
SchemaResolutionException{unsatisfiedImports={SourceIdentifier [name=sal-remote-augment@2014-7-8]=[ModuleImportImpl [name=sal-remote, revision=2014-01-14]]}}
at org.opendaylight.yangtools.yang.parser.repo.SharedSchemaContextFactory$2.apply(SharedSchemaContextFactory.java:77)
at org.opendaylight.yangtools.yang.parser.repo.SharedSchemaContextFactory$2.apply(SharedSchemaContextFactory.java:61)
at com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java:859)
at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:293)
at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:150)
at com.google.common.util.concurrent.ExecutionList.add(ExecutionList.java:106)
at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:170)
at com.google.common.util.concurrent.Futures.transform(Futures.java:613)
at com.google.common.util.concurrent.Futures.transform(Futures.java:565)
at org.opendaylight.yangtools.yang.parser.repo.SharedSchemaContextFactory.createSchemaContext(SharedSchemaContextFactory.java:126)
at org.opendaylight.yangtools.yang.parser.repo.URLSchemaContextResolver.getSchemaContext(URLSchemaContextResolver.java:165)
at org.opendaylight.controller.sal.dom.broker.GlobalBundleScanningSchemaServiceImpl.tryToUpdateSchemaContext(GlobalBundleScanningSchemaServiceImpl.java:236)
at org.opendaylight.controller.sal.dom.broker.GlobalBundleScanningSchemaServiceImpl$BundleScanner.addingBundle(GlobalBundleScanningSchemaServiceImpl.java:191)
at org.opendaylight.controller.sal.dom.broker.GlobalBundleScanningSchemaServiceImpl$BundleScanner.addingBundle(GlobalBundleScanningSchemaServiceImpl.java:165)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:467)[karaf-org.osgi.core.jar:]
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:414)[karaf-org.osgi.core.jar:]
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)[karaf-org.osgi.core.jar:]
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)[karaf-org.osgi.core.jar:]
at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:443)[karaf-org.osgi.core.jar:]
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:847)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
...



 Comments   
Comment by Devin Avery [ 11/Sep/14 ]

Change for temporary fix is in https://git.opendaylight.org/gerrit/11062

Created CONTROLLER-812 to address the long term need.

Comment by Tony Tkacik [ 12/Sep/14 ]

Thrown exception is innocent, MD-SAL only detected incorrect start order report and will reattemt to parse models after another bundle started.

Model will be parsed once all its dependencies are satisfied.

See https://bugs.opendaylight.org/show_bug.cgi?id=1774 for more details about this error report.

Generated at Wed Feb 07 19:53:56 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.