[CONTROLLER-1389] Leveldbjni not available on ARM Created: 09/Jul/15  Updated: 25/Jul/23  Resolved: 15/Mar/19

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

Type: Bug
Reporter: Jan-Simon Moeller Assignee: Unassigned
Resolution: Duplicate 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
is blocked by CONTROLLER-1591 Make it possible to use LevelDB nativ... Resolved
is blocked by ODLPARENT-23 Milestone: Upgrade karaf to 4.0.1 or ... Resolved
Relates
relates to CONTROLLER-1884 Custom Akka Persistence Journal imple... Resolved
relates to CONTROLLER-1411 Make H2 or some pure javadb the defau... Resolved
External issue ID: 3973

 Description   

odl-akka-leveldb pulls in leveldb which pulls in

mvn:org.fusesource.leveldbjni/leveldbjni-all/1.8

This dependency fails with:
Error executing command: Can't install feature odl-l2switch-switch/0.0.0:
Could not start bundle mvn:org.fusesource.leveldbjni/leveldbjni-all/1.8 in feature(s) odl-akka-leveldb-0.7: The bundle "org.fusesource.leveldbjni.leveldbjni-all_1.8.0 [355]" could not be resolved. Reason: No match found for native code: META-INF/native/windows32/leveldbjni.dll; processor=x86; osname=Win32, META-INF/native/windows64/leveldbjni.dll; processor=x86-64; osname=Win32, META-INF/native/osx/libleveldbjni.jnilib; processor=x86; osname=macosx, META-INF/native/osx/libleveldbjni.jnilib; processor=x86-64; osname=macosx, META-INF/native/linux32/libleveldbjni.so; processor=x86; osname=Linux, META-INF/native/linux64/libleveldbjni.so; processor=x86-64; osname=Linux

As there is no nativ build for arm 32 and 64 bit available. This blocks deployment on non x86 machines like ARM 64 bit servers.

See this entry:
https://ask.opendaylight.org/question/4114/lithium-rc2-feature-install-error-on-armv8-platform/

And this ML post:
https://lists.opendaylight.org/pipermail/controller-dev/2015-June/009797.html

It is possible to compile for arm as this page shows:
http://arm.koji.fedoraproject.org/koji/rpminfo?rpmID=1282603

Its a feature request in the end - and for a external dependency. But it shows that we need to be careful with our dependencies!



 Comments   
Comment by Florin Dumitrascu [ 06/Oct/15 ]

Hi Jan and all,

Thanks for filling in this entry.
I have raised the question originally on ODL forum.
I have access to several ARM 64bit server platforms, from various vendors including AppliedMicro (APM), Freescale, Cavium.

Since then I have been able to build leveldb and corresponding JNI library on aarch64 target. It has been successfully tested in the last couple of months, running ODL Lithium on an APM server as part of a basic ARM 64bit OPNFV test lab (OpenStack controller including ODL + 3 compute nodes).

I would gladly help to upstream this support, however I need some guidance on the release procedure (releasing leveldjni to Maven Central and integration with ODL).
I would like to prioritize this feature request as next release of OPNFV will depend on it.

Looking forward to sync with you on this.

Also, please add me to the CC list (in case Bugzilla will not do it).

Best Regards,
Florin

Comment by Jan-Simon Moeller [ 28/Oct/15 ]

@Florin:

See https://git.opendaylight.org/gerrit/#/c/25693/

The infra is there, ping the RELENG/IT to make it happen.

Comment by Gary Wu [ 03/Nov/15 ]

I've also added a commit that shows how to turn on the Java-only
implementation of leveldb, for those platforms where the native version
is unavailable.

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

Comment by Florin Dumitrascu [ 04/Nov/15 ]

(In reply to Jan-Simon Moeller from comment #2)
> @Florin:
>
> See https://git.opendaylight.org/gerrit/#/c/25693/
>
> The infra is there, ping the RELENG/IT to make it happen.

Many thanks Jan,

I'll have a look at the Solaris example for reference.

Comment by Moiz Raja [ 04/Nov/15 ]

Gary,

To get leveldb java to work in karaf don't we need to also have the leveldb java bundle installed? Were you able to verify that leveldb java was used when we change the configuration?

Comment by Gary Wu [ 04/Nov/15 ]

Hi Moiz,

Yes, I did verify (via stack traces) that the Java-only leveldb was being used when the option is set.

It looks like the Java-only leveldb (https://github.com/dain/leveldb) is already included by the Akka Persistence default plugin for leveldb. So, we don't need to package any additional bundles ourselves.

Comment by Moiz Raja [ 04/Nov/15 ]

Thanks for confirming that Gary.

Comment by Jan-Simon Moeller [ 27/Nov/15 ]

@Florin: just provide the instructions on how to build leveldbjni for arm here. IT can pick it up here and create the package.

@Moiz/Gary:
There is still the dependency to leveldbjni left which fails during feature:install. So there is no way to successfully install something e.g. on arm currently. Even if the java-only version would just pick-up, the installation procedure would fail currently.
So we'd need a weaker dependency or an architecture-dependent dependency on leveldbjni then ?

Comment by Thanh Ha (zxiiro) [ 27/Nov/15 ]

FWIW leveldbjni upstream project recently accepted our Solaris patch [1] which tells me they aren't completely dead. Just really slow. I think it'd be worth providing patches to them in hopes that they'll merge it and release a version we can consume in the future.

To not block our own development though IT can rebuild and publish a custom version on nexus.opendaylight.org we just need instructions on how to build it as well as the source since we have to release source.jars with anything we push to Nexus, please provide that detail here. Once that's done I'd recommend opening a helpdesk ticket by sending email to helpdesk@opendaylight.org with a link back to this bug so that we can see the build instructions and history.

[1] https://github.com/fusesource/leveldbjni/pull/64

Comment by Gary Wu [ 01/Dec/15 ]

We discussed this today at the Clustering Hackers Meeting. The consensus is that the right way to deal with the karaf feature dependency issue is with karaf 4.0 version which has the necessary features to address this type of dependency requirements.

There is a pre-existing bug logged for the karaf upgrade here:
https://bugs.opendaylight.org/show_bug.cgi?id=4219

Due to the time constraint and the potential impact, the karaf upgrade will likely be done in the Boron release.

Comment by Jan-Simon Moeller [ 03/Nov/16 ]

Whats the status of this bug ?

I see there is movement on the karaf front.

Do we have a leveldbjni with arm meantime ?

Comment by Florin Dumitrascu [ 04/Nov/16 ]

Hi Jan,

Unfortunately I did not have the bandwidth to follow up on pushing leveldbjni for ARM (same as it was done for Solaris). In the meantime OPNFV for ARM builds it locally.
Let me see if I can free up some time in the next couple of weeks.

Comment by Michael Vorburger [ 06/Feb/17 ]

CONTROLLER-1591 may help in this regard (if I ever manage to make progress with it).

> I would gladly help to upstream this support, however I need some
> guidance on the release procedure (releasing leveldjni to
> Maven Central and integration with ODL).

Any such work would have to at least initially start via a Pull Request over on https://github.com/fusesource/leveldbjni, not here... You could jump on https://github.com/fusesource/leveldbjni/issues/76. But see also CONTROLLER-1591.

> how to turn on the Java-only implementation of leveldb,
> for those platforms where the native version is unavailable.
> https://git.opendaylight.org/gerrit/#/c/29217/
> the Java-only leveldb (https://github.com/dain/leveldb)

Do any of you actually use this alternative implemementation? To me, both the comment you put in c/29217 and looking myself at "dain/leveldb" doesn't look very serious... "currently the code base is basically functional, but only trivially tested" - if any of you have tested ODL with this, do let us know here please.

Comment by Robert Varga [ 14/Nov/18 ]

I agree, there are a bunch of architectures supported upstream. ariel.adam, is there interest to support ARM on RH? If so, we really need an update to upstream and then we can pull the arches we need.

Comment by Stephen Kitt [ 14/Nov/18 ]

For Red Hat products we rebuild from source anyway, so our downstream support doesn’t depend on the availability of binaries upstream. Currently we ship leveldbjni on ppc64le and x86_64.

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