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
Added ppc64le support #13499
Added ppc64le support #13499
Conversation
Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla |
@@ -70,7 +70,7 @@ jobs: | |||
run: $MAVEN clean -pl '!:trino-server,!:trino-cli' | |||
- uses: docker/setup-qemu-action@v1 | |||
with: | |||
platforms: arm64 | |||
platforms: arm64,ppc64le |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would only setup qemu, but won't build any additional images. For that, you'd need to modify the defaults here: https://github.com/trinodb/trino/blob/master/core/docker/build.sh#L16
But then again, this only builds and tests images, and doesn't publish them during a release.
Fortunately, I see that the base ubi8 image we're using is available for this architecture.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We’d also need a JDK available for this architecture. Zulu doesn’t have one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Missed adding ppc64le to https://github.com/trinodb/trino/blob/master/core/docker/build.sh#L16 but looks trivial, right?
- What needs to be done in addition for publishing? https://hub.docker.com/r/trinodb/trino/tags already provides multi-arch releases for amd64 and arm64; can't ppc64le simply be added?
- JDK: zulu generally supports ppc64le, however, I think you're right that JDK 17 (as referenced here https://github.com/trinodb/trino/blob/master/core/docker/Dockerfile#L20) is unavailable for it.
Some thoughts on 3.:
- Would it be an option to use an older JDK instead (available for ppc64 via https://cdn.azul.com/zulu/bin/)?
- How about using an additional RPM source like https://rpmfind.net/linux/RPM/centos-stream/9/appstream/ppc64le/java-17-openjdk-17.0.3.0.7-1.el9.ppc64le.html ?
- How about directly basing on a JDK-enabled UBI image, which actually support ppc64le (https://catalog.redhat.com/software/containers/ubi8/openjdk-17/618bdbf34ae3739687568813)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the OpenJDK from RedHat is the best option. The difficulty is that we use docker buildx
for the multi-architecture image and thus need a single Dockerfile
that can build for all architectures. We might switch to Temurin, which has builds for ppc64le.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
POC here: #13522
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To directly answer your first question for option 3, using an older JDK isn't an option for Trino, as we now require JDK 17.
Thanks for starting the discussion on this, which prompted me to look at Temurin. They seem to produce high-quality Docker images, which look like a good option to replace the current UBI / Zulu images we've been using. I created a PR to switch to Temurin and add support for ppc64le: #13522 Unfortunately, there is a qemu-user-static bug which prevents running the JDK under emulation with Docker, so it would be great if you could test this change on the real hardware. |
Building the docker image on ppc64le hardware works now (I checked out master & simply build using 392 artifacts):
Starting looks good as well:
|
I noticed a minor (documentation) bug - ppc64le needs to be added here now: |
The trino client appears to be buggy for my setup - my shell freezes/looses its prompt exactly here:
Something like this is possible, though:
But just starting |
The CLI is using JLine. Could you see if their demo works or has the same problem? |
Try running the CLI with JNA disabled:
Thanks for testing. |
On a ppc64le machine, I went into this container: And essentially build JLine:
This demo, for example, is working:
... the Groovy REPL demos works as well. |
@lehrig can you build last released version and test it? |
This one works:
|
@lehrig Jline. There were couple of changes since last release so I'd like to rule them out |
Sure, so I proceeded as before but did Build was again successful and |
Hmm, I wonder if their demo is using Jansi rather than JNA by default. |
Good point - I found this line here: https://github.com/jline/jline3/blob/jline-parent-3.21.0/demo/jline-gogo.sh#L51 So, I rerun the demo using this: Result:
...and it's frozen from here. Edit: same behavior on |
I have seen that there is the new trino 393 release, however, there are no ppc64le images pushed to docker.io. I thought this would happen now with #13522... So, what else is missing? |
We forgot to include the new architecture in the release scripts: trinodb/release-scripts#5 |
BTW I think we can close this PR now, even if we want to continue the discussion about the CLI here. |
@lehrig how do you test it? By actually running on IBM Power or some sort of virtualization? I could dig into it but I don't have an access to the hardware |
agreed. |
I'm using actual IBM Power hardware. If you need access, I think this is a good overview of options: https://community.ibm.com/community/user/powerdeveloper/blogs/linda-alkire-kinnunen/2022/08/08/accelerate-your-open-source-development-with-acces The best option in this context might be https://openpower.ic.unicamp.br/minicloud/ where you can apply for free via https://docs.google.com/forms/d/e/1FAIpQLSexcyToQSV34i0aLOX82pYrV30JGYPUj86si1aNcmwtmqRbCw/viewform. Not sure, if that fits for you... |
Description
Enabled ppc64le (IBM Power architecture) builds by adding an appropriate entry in ci.yml. The complete code was already ready for ppc64le support, so only this minor change was needed.
New feature (additional architecture support).
No.
Support for running Trino on IBM Power servers.
Documentation
() No documentation is needed.
(X) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
( ) No release notes entries required.
(X) Release notes entries required with the following suggested text:
Added support for running Trino on IBM Power servers (ppc64le architecture).