[INFRAUTILS-10] infrautils-features4 cannot be added to karaf4 distribution Created: 03/May/17  Updated: 19/Oct/17  Resolved: 08/May/17

Status: Resolved
Project: infrautils
Component/s: General
Affects Version/s: Carbon
Fix Version/s: None

Type: Bug
Reporter: Luis Gomez Assignee: Michael Vorburger
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 8355
Priority: High

 Description   

Following ERROR is thrown when doing so:

20:46:34 -------------------------------------------------------
20:46:34 T E S T S
20:46:34 -------------------------------------------------------
20:46:36 Running org.opendaylight.odlparent.featuretest.SingleFeatureTest
20:47:54 Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 76.864 sec <<< FAILURE! - in org.opendaylight.odlparent.featuretest.SingleFeatureTest
20:47:54 installFeatureCatchAndLog(org.opendaylight.odlparent.featuretest.SingleFeatureTest)[repoUrl: file:/w/workspace/distribution-verify-carbon/features/repos/index/target/feature/feature.xml, Feature: features-index 0.6.0.SNAPSHOT] Time elapsed: 76.01 sec <<< FAILURE!
20:47:54 java.lang.AssertionError: diag: Failure

{Installed=0, GracePeriod=0, Failure=1, Unknown=0, Starting=0, Stopping=0, Active=432, Resolved=4, Waiting=0}

20:47:54 1. NOK org.opendaylight.infrautils.jobcoordinator-impl: OSGi state = Active, Karaf bundleState = Failure, due to: Blueprint
20:47:54 5/2/17 8:47 PM
20:47:54 Exception:
20:47:54 Unresolved ref/idref to component: jobCoordinator
20:47:54 org.osgi.service.blueprint.container.ComponentDefinitionException: Unresolved ref/idref to component: jobCoordinator
20:47:54 at org.apache.aries.blueprint.container.BlueprintRepository.validate(BlueprintRepository.java:271)
20:47:54 at org.apache.aries.blueprint.container.RecipeBuilder.createRepository(RecipeBuilder.java:96)
20:47:54 at org.apache.aries.blueprint.container.BlueprintContainerImpl.getRepository(BlueprintContainerImpl.java:520)
20:47:54 at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:359)
20:47:54 at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:276)
20:47:54 at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:300)
20:47:54 at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:269)
20:47:54 at org.apache.aries.blueprint.container.BlueprintExtender.access$900(BlueprintExtender.java:68)
20:47:54 at org.apache.aries.blueprint.container.BlueprintExtender$BlueprintContainerServiceImpl.createContainer(BlueprintExtender.java:602)
20:47:54 at org.opendaylight.controller.blueprint.BlueprintBundleTracker.modifiedBundle(BlueprintBundleTracker.java:210)
20:47:54 at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:191)
20:47:54 at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:51)
20:47:54 at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
20:47:54 at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:415)
20:47:54 at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
20:47:54 at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
20:47:54 at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
20:47:54 at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:902)
20:47:54 at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
20:47:54 at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
20:47:54 at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)
20:47:54 at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)
20:47:54 at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)
20:47:54 at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)
20:47:54 at org.eclipse.osgi.container.Module.publishEvent(Module.java:466)
20:47:54 at org.eclipse.osgi.container.Module.start(Module.java:457)
20:47:54 at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:392)
20:47:54 at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:411)
20:47:54 at org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1287)
20:47:54 at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:860)
20:47:54 at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1176)
20:47:54 at org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:1074)
20:47:54 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
20:47:54 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
20:47:54 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
20:47:54 at java.lang.Thread.run(Thread.java:745)
20:47:54
20:47:54
20:47:54 at org.opendaylight.odlparent.bundles4test.TestBundleDiag.checkBundleDiagInfos(TestBundleDiag.java:86)
20:47:54 at org.opendaylight.odlparent.bundles4test.TestBundleDiag.checkBundleDiagInfos(TestBundleDiag.java:50)
20:47:54 at org.opendaylight.odlparent.featuretest.SingleFeatureTest.installFeature(SingleFeatureTest.java:387)
20:47:54 at org.opendaylight.odlparent.featuretest.SingleFeatureTest.installFeatureCatchAndLog(SingleFeatureTest.java:338)
20:47:54 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
20:47:54 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
20:47:54 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
20:47:54 at java.lang.reflect.Method.invoke(Method.java:498)
20:47:54 at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
20:47:54 at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
20:47:54 at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
20:47:54 at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
20:47:54 at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
20:47:54 at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
20:47:54 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
20:47:54 at java.lang.Thread.run(Thread.java:745)



 Comments   
Comment by Luis Gomez [ 06/May/17 ]

This patch reproduces the issue:

https://git.opendaylight.org/gerrit/#/c/56611/

And this log shows the error:
https://logs.opendaylight.org/releng/jenkins092/distribution-verify-carbon/88/console.log.gz

Comment by Michael Vorburger [ 08/May/17 ]

Yakir Dorani has analysed that this may have been caused by https://git.opendaylight.org/gerrit/#/c/54419/. (I'm not sure I agree with that analysis - but it doesn't matter, we just have to fix it whatever caused it.)

To be me the problem seems to be that the jobcoordinator-impl/src/main/resources/org/opendaylight/blueprint/jobcoordinator.xml has <service ref="jobCoordinator" ...> (even before c/54419) but jobcoordinator-impl/target/generated-resources/org/opendaylight/blueprint/autowire.xml has <bean id="jobCoordinatorImpl" ...> derived from JobCoordinatorImpl, so should be renamed.

I'll now try the fix above if I can locally reproduce the issue using c/56611 (thanks Luis for having created a reproducer).

What I find very curious is that infrautils' own SFT has not caught this! I don't understand how that's possible; that's the whole point of SFT, to catch this in the project, before downstream projects fail. I've just retried it locally, and indeed it does not catch this problem - why?!

Comment by Michael Vorburger [ 08/May/17 ]

> I'll now try the fix above if I can locally reproduce the issue using c/56611

https://git.opendaylight.org/gerrit/#/c/56664/ fixes this for stable/carbon (I've manually locally verified that this fixed https://git.opendaylight.org/gerrit/#/c/56611/)

https://git.opendaylight.org/gerrit/#/c/56663/ fixes this for master (not verified)

> What I find very curious is that infrautils' own SFT has not caught this!

ODLPARENT-91 will investigate this general problem further separately.

Generated at Wed Feb 07 20:02:01 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.