Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ppc64le (Cassandra 3.x+ only) #116

Merged
merged 2 commits into from
Sep 1, 2017

Conversation

tianon
Copy link
Member

@tianon tianon commented Sep 1, 2017

This is conceptually similar to docker-library/postgres#330, but instead of building, we simply download upstream's packages as-is to create a usable repo (since their repo's Architectures does not include ppc64el, but their packages are Architecture: all).

I also tested this on s390x, but it fails with The native library could not be initialized properly. (looking for libjnidispatch.so).

@tianon
Copy link
Member Author

tianon commented Sep 1, 2017

Here's some decent proof that ppc64le working is intentional (and s390x not working might actually be an unintentional bug):

$ docker run -it --rm cassandra:3.11 ls -l /usr/share/cassandra/lib/sigar-bin
total 6780
-rw-r--r-- 1 root root 210641 Jun 19 22:47 libsigar-amd64-freebsd-6.so
-rw-r--r-- 1 root root 246605 Jun 19 22:47 libsigar-amd64-linux.so
-rw-r--r-- 1 root root 251360 Jun 19 22:47 libsigar-amd64-solaris.so
-rw-r--r-- 1 root root 577452 Jun 19 22:47 libsigar-ia64-hpux-11.sl
-rw-r--r-- 1 root root 494929 Jun 19 22:47 libsigar-ia64-linux.so
-rw-r--r-- 1 root root 516096 Jun 19 22:47 libsigar-pa-hpux-11.sl
-rw-r--r-- 1 root root 400925 Jun 19 22:47 libsigar-ppc-aix-5.so
-rw-r--r-- 1 root root 258547 Jun 19 22:47 libsigar-ppc-linux.so
-rw-r--r-- 1 root root 425077 Jun 19 22:47 libsigar-ppc64-aix-5.so
-rw-r--r-- 1 root root 330767 Jun 19 22:47 libsigar-ppc64-linux.so
-rw-r--r-- 1 root root 269932 Jun 19 22:47 libsigar-s390x-linux.so
-rw-r--r-- 1 root root 285004 Jun 19 22:47 libsigar-sparc-solaris.so
-rw-r--r-- 1 root root 261896 Jun 19 22:47 libsigar-sparc64-solaris.so
-rw-r--r-- 1 root root 377668 Jun 19 22:47 libsigar-universal-macosx.dylib
-rw-r--r-- 1 root root 397440 Jun 19 22:47 libsigar-universal64-macosx.dylib
-rw-r--r-- 1 root root 179751 Jun 19 22:47 libsigar-x86-freebsd-5.so
-rw-r--r-- 1 root root 179379 Jun 19 22:47 libsigar-x86-freebsd-6.so
-rw-r--r-- 1 root root 233385 Jun 19 22:47 libsigar-x86-linux.so
-rw-r--r-- 1 root root 242880 Jun 19 22:47 libsigar-x86-solaris.so
-rw-r--r-- 1 root root 402432 Jun 19 22:47 sigar-amd64-winnt.dll
-rw-r--r-- 1 root root 266240 Jun 19 22:47 sigar-x86-winnt.dll
-rw-r--r-- 1 root root  99584 Jun 19 22:47 sigar-x86-winnt.lib

Although this doesn't list anything ARM-related at all, so I'm not 100% sure how/why arm64v8 works yet. Guess more digging is required. 😅

@tianon
Copy link
Member Author

tianon commented Sep 1, 2017

Ahh, here's a better list:

root@b2ed0b36a48a:/usr/share/cassandra/lib# unzip -l jna-4.4.0.jar | grep '.so'
   105688  2016-09-24 10:20   com/sun/jna/linux-x86/libjnidispatch.so
   111408  2016-09-24 10:00   com/sun/jna/linux-x86-64/libjnidispatch.so
   106984  2017-01-07 20:12   com/sun/jna/linux-arm/libjnidispatch.so
   111116  2017-02-01 18:03   com/sun/jna/linux-armel/libjnidispatch.so
   104480  2016-09-24 10:39   com/sun/jna/linux-aarch64/libjnidispatch.so
   123256  2016-09-24 10:24   com/sun/jna/linux-ppc/libjnidispatch.so
   132960  2016-09-24 12:45   com/sun/jna/linux-ppc64le/libjnidispatch.so
   131344  2017-02-10 23:22   com/sun/jna/sunos-x86-64/libjnidispatch.so

@tianon
Copy link
Member Author

tianon commented Sep 1, 2017

I've managed to get it working on s390x, but it's very hacky:

  • install libjna-java (https://packages.debian.org/jessie/libjna-java), which in Debian has s390x support
  • adjust -Xss from 256 up to 512 (same as ppc64le)
  • replace /usr/share/cassandra/lib/jna-4.4.0.jar with a symlink to /usr/share/java/jna.jar

(so IMO we shouldn't support it until upstream does)

@tianon
Copy link
Member Author

tianon commented Sep 1, 2017

(For posterity: the reason I have explicitly excluded support for 2.x here is that they fail with bigger JNA errors on both arches, which come to think of it might be solvable with the same hacky workaround I've used to get s390x working, but we should instead wait for upstream to decide 2.x is worth supporting on these arches, or wait for 2.x to go EOL instead.)

@yosifkit yosifkit merged commit 03f9ffb into docker-library:master Sep 1, 2017
@yosifkit yosifkit deleted the ppc64le branch September 1, 2017 18:22
@tianon
Copy link
Member Author

tianon commented Sep 1, 2017

So, s390x is intended to be supported: https://issues.apache.org/jira/browse/CASSANDRA-11054

(but still no JNA love, so hopefully upstream will turn that back around at some point so we can add s390x here! 👍)

See also https://issues.apache.org/jira/browse/CASSANDRA-11214?focusedCommentId=15171931&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15171931 for the following note from an upstream committer:

I want to emphasis that we don't official support this System-Z architecture: no active committer has access to this architecture as far as I can tell and no test for it is done whatsoever. So I committed this patch because there is really no reason to, but don't take this as official support. If you have other problems specific to that architecture, you're likely on your own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants