linux-on-ibm-z / dockerfile-examples

A collection of examples to show how Dockerfiles could be created and used on Linux on IBM z Systems.
36 stars 62 forks source link

Apache Cassandra Dockerfile is not able to be built #10

Open skriesch opened 4 years ago

skriesch commented 4 years ago

I want to use the Dockerfile for Apache Cassandra to emulate Z systems.

The build process does not run until the end because of failed unit tests:

    [junit] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
    [junit] Testsuite: com.sun.jna.JNALoadTest
    [junit] Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 6.28 sec
   [junit] 
    [junit] Testcase: testLoadAndUnloadFromJar(com.sun.jna.JNALoadTest):    FAILED
    [junit] System property jna.loaded not cleared
    [junit] junit.framework.AssertionFailedError: System property jna.loaded not cleared
    [junit]     at com.sun.jna.JNALoadTest.testLoadAndUnloadFromJar(JNALoadTest.java:140)
    [junit] 
    [junit] 
    [junit] Test com.sun.jna.JNALoadTest FAILED
    [junit] 
    [junit] ------------- Standard Error -----------------
    [junit] JNA Warning: Encoding 'unsupported' is unsupported
    [junit] JNA Warning: Encoding with fallback UTF8
    [junit] ------------- ---------------- ---------------

BUILD FAILED
/root/jna/build.xml:1020: One or more tests failed

Total time: 1 minute 20 seconds

I have used my zVM with Ubuntu for s390x:

# uname -a
Linux m8345045 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:01:38 UTC 2020 s390x s390x s390x GNU/Linux

Docker-Version:

# apt-cache policy docker
docker:
  Installed: 1.5-1build1
  Candidate: 1.5-1build1

Command to build the Docker image inside of the directory of ApacheCassandra: docker build --tag cassandra-s390 .

The build with the Cassandra Dockerfile should run for Z systems.

aborkar-ibm commented 4 years ago

This is an intermittent issue while running jna tests. I have updated the dockerfile to skip tests. Please try now and let me know, incase any issues.

skriesch commented 4 years ago

I can build the Dockerimage now. Thank you!

Here are some hints from the build process, what has been deprecated.

Deprecated API:


 [javac] Note: /root/cassandra/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java uses or overrides a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.

During the compilation:

build-test:
    [javac] Compiling 594 source files to /root/cassandra/build/test/classes
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
     [copy] Copying 25 files to /root/cassandra/build/test/classes

stress-build:
    [mkdir] Created dir: /root/cassandra/build/classes/stress
    [javac] Compiling 120 source files to /root/cassandra/build/classes/stress
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
     [copy] Copying 1 file to /root/cassandra/build/classes/stress

During "removing packages" at the end:

The following packages will be REMOVED:
  ant ant-optional autoconf automake build-essential dpkg-dev git junit make
  patch pkg-config unzip wget
sh: 0: getcwd() failed: No such file or directory