[ODLPARENT-86] Milestore: upgrade karaf to 4.1.2 or later Created: 20/Apr/17  Updated: 24/Jan/18  Resolved: 24/Jan/18

Status: Verified
Project: odlparent
Component/s: General
Affects Version/s: None
Fix Version/s: 3.0.0

Type: Bug
Reporter: Robert Varga Assignee: Stephen Kitt
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
blocks MDSAL-235 [INFO] Failed to fully assemble schem... Resolved
blocks NETCONF-242 Bump apache mina version from the pre... Resolved
blocks ODLPARENT-113 After hard reset, Robot fails to esta... Resolved
blocks ODLPARENT-119 Milestone: Support build with JDK 9 Resolved
blocks INFRAUTILS-11 Ready service Resolved
blocks ODLPARENT-115 Karaf is slow to start processing fea... Verified
is blocked by ODLPARENT-23 Milestone: Upgrade karaf to 4.0.1 or ... Resolved
External issue ID: 8258

 Description   

This is the next step in the catch-up game. Required to upgrade SSH to newer versions.



 Comments   
Comment by Vratko Polak [ 13/Sep/17 ]

I guess the upgrade will also speed up ODL boot-up process, as described here [0]?

I am not sure if there is an open Bug for ODL being slow to boot (as opposed to invalid claims it gets stuck), so I will list this Bug as a known issue for Integration/Distribution Nitrogen release notes.

[0] https://lists.opendaylight.org/pipermail/odlparent-dev/2017-September/001336.html

Comment by Robert Varga [ 13/Sep/17 ]

It will not, but it will speed up feature.xml generation at build time. Boot up speed improvement will require more work on our side – MDSAL-235 tracks that.

Comment by Vratko Polak [ 13/Sep/17 ]

(In reply to Robert Varga from comment #2)
> It will not, but it will speed up feature.xml generation at build time. Boot
> up speed improvement will require more work on our side – MDSAL-235 tracks
> that.

I do not agree.
If you look into a short-ish karaf log [1] from CSIT you see this:

Sep 09, 2017 11:46:52 PM org.apache.karaf.main.Main$KarafLockCallback lockAquired
INFO: Lock acquired. Setting startlevel to 100
2017-09-09 23:50:33,158 | INFO | pool-1-thread-2 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | Adding features: odl-integration-all/[0.7.0.SNAPSHOT,0.7.0.SNAPSHOT], standard/[4.0.9,4.0.9], wrap/[0,0.0.0]

That is almost 4 minutes to figure out list of bundles to be installed. No chance schema context refreshes apply to that.
Although it is an all job, so the list of bundles is quite long.

But when I was fixing [2] the offline job (mostly because of ODLPARENT-113), I had to add a waiting loop. The result is seen [3] only on Sandbox so far, but it takes almost the same time for the native Karaf ssh server to start responding when there are no ODL features in featuresBoot. The offline job uses feature:install to add the feature to test (odl-integration-all).
I guess the Karaf core was sifting through system/ repository in an ineffective
way.

2017-09-13 15:29:41,785 | INFO | bd4-8e1eaa0a7feb | Main | - - | Karaf started in 0s. Bundle stats: 10 active, 10 total
2017-09-13 15:34:01,050 | INFO | pool-1-thread-2 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | Adding features: standard/[4.0.9,4.0.9], wrap/[0,0.0.0]

Does Karaf project need another contribution to avoid that? Should I open a separate ODL Bug?

[1] https://logs.opendaylight.org/releng/jenkins092/distribution-deploy-nitrogen/46/karaf.log.gz
[2] https://git.opendaylight.org/gerrit/62903
[3] https://jenkins.opendaylight.org/sandbox/job/distribution-offline-nitrogen/5/console

Comment by Vratko Polak [ 14/Sep/17 ]

> Should I open a separate ODL Bug?

ODLPARENT-115 opened.

Comment by Robert Varga [ 19/Sep/17 ]

Preliminary patch: https://git.opendaylight.org/gerrit/63272

Comment by Robert Varga [ 22/Sep/17 ]

This is blocking JDK9 build, as karaf-maven-plugin 4.0.9 fails on JDK9:

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.0.9:assembly (process-resources) on project opendaylight-karaf-resources: Unable to build assembly
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to build assembly
at org.apache.karaf.tooling.AssemblyMojo.execute(AssemblyMojo.java:243)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
Caused by: org.apache.karaf.features.internal.util.MultiException: Error
at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.<init>(MavenDownloadManager.java:84)
at org.apache.karaf.features.internal.download.impl.MavenDownloadManager.createDownloader(MavenDownloadManager.java:72)
at org.apache.karaf.profile.assembly.Builder.loadRepositories(Builder.java:1167)
at org.apache.karaf.profile.assembly.Builder.doGenerateAssembly(Builder.java:448)
at org.apache.karaf.profile.assembly.Builder.generateAssembly(Builder.java:393)
at org.apache.karaf.tooling.AssemblyMojo.doExecute(AssemblyMojo.java:401)
at org.apache.karaf.tooling.AssemblyMojo.execute(AssemblyMojo.java:237)
... 22 more
Suppressed: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
at org.apache.karaf.profile.assembly.Builder$4.downloaded(Builder.java:1184)
at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:133)
at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:127)
at org.apache.karaf.features.internal.download.impl.DefaultFuture.notifyListener(DefaultFuture.java:344)
at org.apache.karaf.features.internal.download.impl.DefaultFuture.notifyListeners(DefaultFuture.java:329)
at org.apache.karaf.features.internal.download.impl.DefaultFuture.setValue(DefaultFuture.java:255)
at org.apache.karaf.features.internal.download.impl.AbstractDownloadTask.setFile(AbstractDownloadTask.java:61)
at org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:61)

According to https://issues.apache.org/jira/browse/KARAF-5029, 4.1.x branch should solve this.

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