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 linux/s390x architecture #384

Merged

Conversation

bwalk-at-ibm
Copy link
Contributor

The s390x CPU architecture is the base for IBM zSeries (aka mainframe) systems. It is beneficial for users of this platform to have a supported way to install pre-compiled binaries for the OpenTelemetry collector in a Linux environment. This issue and associated pull requests will enable the building of all relevant binary artifacts for linux/s390x as part of the regular CI pipeline.

IBM has performed tests internally to ensure successful build (via cross-compilation) and runtime (on native platform) integrity of the OpenTelemetry collector (core and contrib) via the unit test suites and specific use-cases.

For more information and discussion please refer to the initial feature request issue (#378).

@bwalk-at-ibm bwalk-at-ibm requested review from a team and MovieStoreGuy August 10, 2023 07:32
@jpkrohling
Copy link
Member

We need this done before on the core and contrib repositories before adding to -releases, so that we are sure the code at least compiles once we are ready to perform a release.

@bwalk-at-ibm
Copy link
Contributor Author

IIUC, we wait for the merge until the PRs for core and contrib have been merged, right? Or is there anything else required from my side?

@jpkrohling
Copy link
Member

Looks like EasyCLA is still not happy about this one.

@bwalk-at-ibm
Copy link
Contributor Author

Looks like EasyCLA is still not happy about this one.

I have refreshed it, don't know why it expired(?).

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bwalk-at-ibm
Copy link
Contributor Author

bwalk-at-ibm commented Sep 13, 2023

Hmm, I'm not that familiar with goreleaser but I can dig into it. But from what I understand in the error message, the build fails with installing ca-certificates in the Docker build image, which I can not reproduce on a native s390x machine:

$ podman run -it --rm alpine:3.16
Resolved "alpine" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf)
Trying to pull docker.io/library/alpine:3.16...
Getting image source signatures
Copying blob e5761c1ed80a done
Copying config 16c78d841b done
Writing manifest to image destination
Storing signatures
/ # apk --update add ca-certificates
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/s390x/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/s390x/APKINDEX.tar.gz
(1/1) Installing ca-certificates (20230506-r0)
Executing busybox-1.35.0-r17.trigger
Executing ca-certificates-20230506-r0.trigger
OK: 6 MiB in 15 packages
/ # uname -m
s390x

I also didn't hit this when testing the cross-compile/build on x86 prior to sending the PR but let me verify this.

On second thought, looks like something went wrong with the cross-compile setup:

#6 ERROR: process "/bin/sh -c apk --update add ca-certificates" did not complete successfully: exit code: 1
------
 > [certs 2/2] RUN apk --update add ca-certificates:
0.618 exec /bin/sh: exec format error
------

That looks like it's trying to execute an s390x-executable in a non-s390x environment.

Seems we don't install the s390x version for QEMU in the pipeline:

opentelemetry-collector-releases-build-failure

Found it. Let's try again.

This commit enables platform support for the `linux/s390x` architecture
in the CI pipeline.

Signed-off-by: Bjoern Walk <[email protected]>
Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing @bwalk-at-ibm, to return to @jpkrohling's comment, is the plan to add this platform to the list of platforms in the contrib repo as well?

@bwalk-at-ibm
Copy link
Contributor Author

Thanks for fixing @bwalk-at-ibm, to return to @jpkrohling's comment, is the plan to add this platform to the list of platforms in the contrib repo as well?

That's the idea. Here's the PR open-telemetry/opentelemetry-collector-contrib#25139.

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The contrib & core PRs have been merged. Thanks @bwalk-at-ibm 👍🏻

@codeboten codeboten merged commit bf8002e into open-telemetry:main Sep 20, 2023
14 checks passed
@bwalk-at-ibm
Copy link
Contributor Author

Thanks a lot!

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.

3 participants