-
Notifications
You must be signed in to change notification settings - Fork 140
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
[BUILD] otel-webserver add support for arm64 #400
base: main
Are you sure you want to change the base?
Conversation
The failure for centos7 is |
Hey, can you pull the code again and push your changes. Some builds were failing, so changes have been made to the build pipeline. |
058724c
to
c604772
Compare
Would someone be able to run to pipeline to see if it now works? Also please let me know if I should make any changes, e.g. in relation to the questions in my original post. |
c604772
to
bbf18d1
Compare
Sorry I see that docker compose v1 ( |
147cfc4
to
73b96fa
Compare
Thank you for running the workflow. The current GitHub workflow is only building the x64 artifacts. Should I duplicate the jobs so that there is a build for each platform and operating system, i.e. |
No idea, this is a question for the otel-webserver maintainers, who know this area best. I just press the workflow button ;-) |
Thank you @marcalff. I assume that the maintainers would also be reviewing these changes at some point and so be able to advise? I also noticed that the unit tests are currently platform specific, so I'm working on updating gradle to handle this. |
I've gone for having extra jobs for ARM64. The unit tests now work for both platforms, but the integrations tests don't work on my Windows PC for x64 or ARM64. They may work in the GitHub Action. When I run CentOS 7 with ARM64 locally, I run into a problem with QEMU and yum so instead I attempted to have the Ubuntu job build the artifacts. Given that there are difference between the CentOS and Ubuntu Dockerfiles, is there a problem with using Ubuntu for releases? |
@@ -8,6 +8,9 @@ defaultTasks 'build' | |||
ext { | |||
ARCH = '' |
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.
Is this used anywhere? I think I've added a case statement to have it work for ARM64
ENV GOSU_ARCH amd64 | ||
ENV JDK_ARCH x64 | ||
ARG GOSU_ARCH='amd64' | ||
ENV GOSU_ARCH=${GOSU_ARCH} |
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.
Are the GOSU_ARCH
and JDK_ARCH
environment variables used somewhere?
|
||
LABEL NAME=apm/build-image-webserver-agent-centos6-x64 VERSION=$BUILD_NUMBER | ||
LABEL NAME=apm/build-image-webserver-agent-centos6-${BUILD_ARCH} VERSION=$BUILD_NUMBER |
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.
Should this be centos7?
ENV GOSU_ARCH amd64 | ||
ENV JDK_ARCH x64 | ||
ARG GOSU_ARCH='amd64' | ||
ENV GOSU_ARCH=${GOSU_ARCH} |
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.
Are the GOSU_ARCH
and JDK_ARCH
environment variables used somewhere?
I tried using podman 5 instead of docker to build the CentOS 7 ARM release and the build succeeded. Unfortunately it got stuck exporting the layers of the image and so couldn't progress beyond that. However as the integration test failed in the GitHub action with the Ubuntu build, I thought it worth seeing if the GitHub action would get beyond the first yum command (4th command in Dockerfile), unlike my experience with Docker Desktop 4.29.0 (145265). |
Hi @Fydon , I am assuming this is supposed to work on below arch as well, can you please confirm. We thought of instrumenting nginx with otel but it failed there. |
I have only used the apache functionality. Yes aarch64 is ARM64. This is a step to having this work, but it may require more work. Particularly the integration tests may need to be changed if they aren't testing ARM64. If using a clone of the latest version of this pull request is not working for you feel free to make the necessary changes and contribute them once this is merged. |
GitHub has a beta for ARM based runners for GitHub Actions. That should significantly improve the performance of these builds. Perhaps for now the solution is to review the changes, but not run the CentOS ARM64 build? I'm using the Apache ARM64 build on Ubuntu 22.04 to obtain traces, but have not tested Nginx. |
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 need to add a separate dockerfile for arm64 based inside docker directory and generate a artifact out of that and same should be used in workflow. The existing dockerfile should not be touched.
6aba801
to
2f6cd80
Compare
42626ad
to
9ecd1c9
Compare
Okay. I think that is done |
Sorry I realised that I left the build arguments in the CentOS 7 ARM build. I've committed but not pushed removing these as it will cause another need for a build. There will probably be more changes as a part of the review so they will be a part of the next update. |
ARM64 hosted runners have now been released. Could you please set one up so that the workflow can run quicker? If so, please let me know the name so that I can update the workflow. |
9ecd1c9
to
6037a2b
Compare
Build arguments are no longer needed
6037a2b
to
d9eb65e
Compare
there are |
@pl4nty I don't currently use nginx. If you can provide the necessary changes, I can add them. I've use the ARM64 build with Apache so that does work. However this pull request probably needs a maintainer to add a ARM64 host runner so that the build can complete. |
yeah I've been running httpd too, only tested nginx yesterday. not sure if there's a way to do this with variables --- a/instrumentation/otel-webserver-module/src/nginx/Makefile
+++ a/instrumentation/otel-webserver-module/src/nginx/Makefile
@@ -350,6 +350,7 @@ objs/nginx: objs/src/core/nginx.o \
objs/src/http/modules/ngx_http_upstream_zone_module.o \
objs/ngx_modules.o \
-L/root/webserver-agent/build/linux-x64/opentelemetry-webserver-sdk/sdk_lib/lib -lopentelemetry_webserver_sdk -ldl -lrt -lpthread -lcrypt -lpcre -lz \
+ -L/root/webserver-agent/build/linux-arm64/opentelemetry-webserver-sdk/sdk_lib/lib -lopentelemetry_webserver_sdk -ldl -lrt -lpthread -lcrypt -lpcre -lz \
-Wl,-E
@@ -1207,6 +1208,8 @@ objs/ngx_http_opentelemetry_module.so: objs/addon/nginx/ngx_http_opentelemetry_l
objs/addon/nginx/ngx_http_opentelemetry_module.o \
objs/ngx_http_opentelemetry_module_modules.o \
-L../linux-x64/opentelemetry-webserver-sdk/sdk_lib/lib \
+ -lopentelemetry_webserver_sdk \
+ -L../linux-arm64/opentelemetry-webserver-sdk/sdk_lib/lib \
-lopentelemetry_webserver_sdk \
-shared --- a/instrumentation/otel-webserver-module/src/nginx/script.sh
+++ b/instrumentation/otel-webserver-module/src/nginx/script.sh
@@ -2,4 +2,6 @@
fileName=$1
sed -i "s/-L\/otel-webserver-module\/build\/linux-x64\/opentelemetry-webserver-sdk\/sdk_lib\/lib\ -lopentelemetry_webserver_sdk\ -ldl\ -lpthread\ -lcrypt\ -lpcre\ -lz\ \\\/-L\/otel-webserver-module\/build\/linux-x64\/opentelemetry-webserver-sdk\/sdk_lib\/lib\ -lopentelemetry_webserver_sdk\ -ldl\ -lrt\ -lpthread\ -lcrypt\ -lpcre\ -lz\ \\\/g" $fileName
+sed -i "s/-L\/otel-webserver-module\/build\/linux-arm64\/opentelemetry-webserver-sdk\/sdk_lib\/lib\ -lopentelemetry_webserver_sdk\ -ldl\ -lpthread\ -lcrypt\ -lpcre\ -lz\ \\\/-L\/otel-webserver-module\/build\/linux-arm64\/opentelemetry-webserver-sdk\/sdk_lib\/lib\ -lopentelemetry_webserver_sdk\ -ldl\ -lrt\ -lpthread\ -lcrypt\ -lpcre\ -lz\ \\\/g" $fileName
sed -i "s/-L\/otel-webserver-module\/build\/linux-x64\/opentelemetry-webserver-sdk\/sdk_lib\/lib\ \\\/-L\/otel-webserver-module\/build\/linux-x64\/opentelemetry-webserver-sdk\/sdk_lib\/lib\ -lopentelemetry_webserver_sdk\ \\\/g" $fileName
+sed -i "s/-L\/otel-webserver-module\/build\/linux-arm64\/opentelemetry-webserver-sdk\/sdk_lib\/lib\ \\\/-L\/otel-webserver-module\/build\/linux-arm64\/opentelemetry-webserver-sdk\/sdk_lib\/lib\ -lopentelemetry_webserver_sdk\ \\\/g" $fileName |
Fixes #343.
Attempt to enable otel-webserver support for ARM64. The build succeeds and I appear to able to use the webserver module on ARM64.
instrumentation\otel-webserver-module\docker\ubuntu20.04\Dockerfile
be updated to have the platforms in different paths?gccArchFlag
of-march=armv8-a
or should it be one of the others.