-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
docker: fixes native library config #3738
Conversation
Signed-off-by: Adrian Cole <adrian@tetrate.io>
s390x and ppcle aren't built on PR, but I think my logic is sound (delete unless). The easiest way to test this is for me to inspect the images (I use car) post merge for the master tag and post back or do a PR if it didn't work out. My machine is arm64 so I can't build for another arch locally. |
like this is not terrible, but not ideal. post-merge this should be fixed as in nothing returns $ ~/oss/car/build/car_darwin_arm64/car --platform linux/s390x -tvf ghcr.io/openzipkin/zipkin-slim:master 'zipkin/BOOT-INF/lib/*aarch*' 'zipkin/BOOT-INF/lib/*x86*' 'zipkin/BOOT-INF/lib/*a64*'
-rw-r--r-- 426917 Dec 29 13:42:54 zipkin/BOOT-INF/lib/native-linux-x86_64-1.15.0.jar
-rw-r--r-- 19577 Jan 19 20:17:42 zipkin/BOOT-INF/lib/netty-resolver-dns-native-macos-4.1.106.Final-osx-aarch_64.jar
-rw-r--r-- 19310 Jan 19 20:27:40 zipkin/BOOT-INF/lib/netty-resolver-dns-native-macos-4.1.106.Final-osx-x86_64.jar
-rw-r--r-- 41240 Jan 19 19:02:14 zipkin/BOOT-INF/lib/netty-transport-native-epoll-4.1.106.Final-linux-aarch_64.jar
-rw-r--r-- 39722 Jan 19 19:03:06 zipkin/BOOT-INF/lib/netty-transport-native-epoll-4.1.106.Final-linux-x86_64.jar
-rw-r--r-- 25617 Jan 19 20:18:00 zipkin/BOOT-INF/lib/netty-transport-native-kqueue-4.1.106.Final-osx-aarch_64.jar
-rw-r--r-- 25057 Jan 19 20:28:08 zipkin/BOOT-INF/lib/netty-transport-native-kqueue-4.1.106.Final-osx-x86_64.jar
-rw-r--r-- 74633 Jan 19 19:01:28 zipkin/BOOT-INF/lib/netty-transport-native-unix-common-4.1.106.Final-linux-aarch_64.jar
-rw-r--r-- 73403 Jan 19 19:01:12 zipkin/BOOT-INF/lib/netty-transport-native-unix-common-4.1.106.Final-linux-x86_64.jar
-rw-r--r-- 72539 Jan 19 20:16:54 zipkin/BOOT-INF/lib/netty-transport-native-unix-common-4.1.106.Final-osx-aarch_64.jar
-rw-r--r-- 71019 Jan 19 20:26:30 zipkin/BOOT-INF/lib/netty-transport-native-unix-common-4.1.106.Final-osx-x86_64.jar
error: zipkin/BOOT-INF/lib/*a64* not found in layer |
I'm going to merge and then post back each of the image dimension results post push of the docker master tags |
verified $ for image in zipkin zipkin-slim; do for arch in amd64 arm64 s390x ppc64le;do echo $image $arch; ~/oss/car/build/car_darwin_arm64/car --platform linux/$arch -tvf ghcr.io/openzipkin/$image:master 'zipkin/BOOT-INF/lib/*aarch*' 'zipkin/BOOT-INF/lib/*x86*' 'zipkin/BOOT-INF/lib/*a64*';done;done
zipkin amd64
-rw-r--r-- 219943 Apr 7 20:49:22 zipkin/BOOT-INF/lib/jnr-x86asm-1.0.2.jar
-rw-r--r-- 426917 Dec 29 13:42:54 zipkin/BOOT-INF/lib/native-linux-x86_64-1.15.0.jar
-rw-r--r-- 1214744 Feb 20 18:50:36 zipkin/BOOT-INF/lib/netty-tcnative-boringssl-static-2.0.63.Final-linux-x86_64.jar
-rw-r--r-- 39722 Jan 19 19:03:06 zipkin/BOOT-INF/lib/netty-transport-native-epoll-4.1.106.Final-linux-x86_64.jar
-rw-r--r-- 73403 Jan 19 19:01:12 zipkin/BOOT-INF/lib/netty-transport-native-unix-common-4.1.106.Final-linux-x86_64.jar
error: zipkin/BOOT-INF/lib/*aarch*, zipkin/BOOT-INF/lib/*a64* not found in layer
zipkin arm64
-rw-r--r-- 86270 Sep 6 13:05:36 zipkin/BOOT-INF/lib/jnr-a64asm-1.0.0.jar
-rw-r--r-- 1123785 Feb 20 18:48:02 zipkin/BOOT-INF/lib/netty-tcnative-boringssl-static-2.0.63.Final-linux-aarch_64.jar
-rw-r--r-- 41240 Jan 19 19:02:14 zipkin/BOOT-INF/lib/netty-transport-native-epoll-4.1.106.Final-linux-aarch_64.jar
-rw-r--r-- 74633 Jan 19 19:01:28 zipkin/BOOT-INF/lib/netty-transport-native-unix-common-4.1.106.Final-linux-aarch_64.jar
error: zipkin/BOOT-INF/lib/*x86* not found in layer
zipkin s390x
error: zipkin/BOOT-INF/lib/*aarch*, zipkin/BOOT-INF/lib/*x86*, zipkin/BOOT-INF/lib/*a64* not found in layer
zipkin ppc64le
error: zipkin/BOOT-INF/lib/*aarch*, zipkin/BOOT-INF/lib/*x86*, zipkin/BOOT-INF/lib/*a64* not found in layer
zipkin-slim amd64
-rw-r--r-- 426917 Dec 29 13:42:54 zipkin/BOOT-INF/lib/native-linux-x86_64-1.15.0.jar
-rw-r--r-- 1214744 Feb 26 19:21:55 zipkin/BOOT-INF/lib/netty-tcnative-boringssl-static-2.0.63.Final-linux-x86_64.jar
-rw-r--r-- 39722 Jan 19 19:03:06 zipkin/BOOT-INF/lib/netty-transport-native-epoll-4.1.106.Final-linux-x86_64.jar
-rw-r--r-- 73403 Jan 19 19:01:12 zipkin/BOOT-INF/lib/netty-transport-native-unix-common-4.1.106.Final-linux-x86_64.jar
error: zipkin/BOOT-INF/lib/*a64*, zipkin/BOOT-INF/lib/*aarch* not found in layer
zipkin-slim arm64
-rw-r--r-- 1123785 Feb 26 19:22:08 zipkin/BOOT-INF/lib/netty-tcnative-boringssl-static-2.0.63.Final-linux-aarch_64.jar
-rw-r--r-- 41240 Jan 19 19:02:14 zipkin/BOOT-INF/lib/netty-transport-native-epoll-4.1.106.Final-linux-aarch_64.jar
-rw-r--r-- 74633 Jan 19 19:01:28 zipkin/BOOT-INF/lib/netty-transport-native-unix-common-4.1.106.Final-linux-aarch_64.jar
error: zipkin/BOOT-INF/lib/*x86*, zipkin/BOOT-INF/lib/*a64* not found in layer
zipkin-slim s390x
error: zipkin/BOOT-INF/lib/*aarch*, zipkin/BOOT-INF/lib/*x86*, zipkin/BOOT-INF/lib/*a64* not found in layer
zipkin-slim ppc64le
error: zipkin/BOOT-INF/lib/*aarch*, zipkin/BOOT-INF/lib/*x86*, zipkin/BOOT-INF/lib/*a64* not found in layer
$ TAG=master docker-compose -f docker-compose-cassandra.yml -f docker-compose-example.yml up
WARN[0000] Found orphan containers ([eureka]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
[+] Running 6/2
✔ Network examples_default Created 0.0s
✔ Container cassandra Created 0.1s
✔ Container dependencies Created 0.0s
✔ Container zipkin Created 0.0s
✔ Container backend Created 0.0s
✔ Container frontend Created 0.0s
Attaching to backend, cassandra, dependencies, frontend, zipkin
cassandra | Starting Cassandra
cassandra | WARNING: package jdk.internal.util.jar not in java.base
cassandra | [2024-02-26 11:44:22,479] WARN [commitlog_sync_period_in_ms, enable_sasi_indexes] parameters have been deprecated. They have new names and/or value format; For more information, please refer to NEWS.txt (org.apache.cassandra.config.YamlConfigurationLoader)
cassandra | [2024-02-26 11:44:22,817] WARN [commitlog_sync_period_in_ms, enable_sasi_indexes] parameters have been deprecated. They have new names and/or value format; For more information, please refer to NEWS.txt (org.apache.cassandra.config.YamlConfigurationLoader)
cassandra | WARNING: A terminally deprecated method in java.lang.System has been called
cassandra | WARNING: System::setSecurityManager has been called by org.apache.cassandra.security.ThreadAwareSecurityManager (file:/cassandra/lib/cassandra-all-4.1.4.jar)
cassandra | WARNING: Please consider reporting this to the maintainers of org.apache.cassandra.security.ThreadAwareSecurityManager
cassandra | WARNING: System::setSecurityManager will be removed in a future release
cassandra | [2024-02-26 11:44:24,493] WARN [commitlog_sync_period_in_ms, enable_sasi_indexes] parameters have been deprecated. They have new names and/or value format; For more information, please refer to NEWS.txt (org.apache.cassandra.config.YamlConfigurationLoader)
cassandra | [2024-02-26 11:44:24,498] WARN [commitlog_sync_period_in_ms, enable_sasi_indexes] parameters have been deprecated. They have new names and/or value format; For more information, please refer to NEWS.txt (org.apache.cassandra.config.YamlConfigurationLoader)
cassandra | [2024-02-26 11:44:24,528] WARN [commitlog_sync_period_in_ms, enable_sasi_indexes] parameters have been deprecated. They have new names and/or value format; For more information, please refer to NEWS.txt (org.apache.cassandra.config.YamlConfigurationLoader)
backend | 11:44:34.369 [main] [] [/] INFO brave.example.HttpTracingFactory - Using zipkin URI: http://zipkin:9411//api/v2/spans
zipkin |
zipkin | oo
zipkin | oooo
zipkin | oooooo
zipkin | oooooooo
zipkin | oooooooooo
zipkin | oooooooooooo
zipkin | ooooooo ooooooo
zipkin | oooooo ooooooo
zipkin | oooooo ooooooo
zipkin | oooooo o o oooooo
zipkin | oooooo oo oo oooooo
zipkin | ooooooo oooo oooo ooooooo
zipkin | oooooo ooooo ooooo ooooooo
zipkin | oooooo oooooo oooooo ooooooo
zipkin | oooooooo oo oo oooooooo
zipkin | ooooooooooooo oo oo ooooooooooooo
zipkin | oooooooooooo oooooooooooo
zipkin | oooooooo oooooooo
zipkin | oooo oooo
zipkin |
zipkin | ________ ____ _ _____ _ _
zipkin | |__ /_ _| _ \| |/ /_ _| \ | |
zipkin | / / | || |_) | ' / | || \| |
zipkin | / /_ | || __/| . \ | || |\ |
zipkin | |____|___|_| |_|\_\___|_| \_|
zipkin |
zipkin | :: version 3.1.0-SNAPSHOT :: commit 09c523d ::
zipkin |
backend | 11:44:35.410 [armeria-boss-http-*:9000] [] [/] INFO com.linecorp.armeria.server.Server - Serving HTTP at /0.0.0.0:9000 - http://127.0.0.1:9000/
zipkin | 2024-02-26T11:44:36.372Z INFO [/] 1 --- [oss-http-*:9411] c.l.a.s.Server : Serving HTTP at /0.0.0.0:9411 - http://127.0.0.1:9411/
frontend | 11:44:37.019 [main] [] [/] INFO brave.example.HttpTracingFactory - Using zipkin URI: http://zipkin:9411//api/v2/spans
frontend | 11:44:37.490 [main] [] [/] INFO brave.example.Frontend - Using backend endpoint: http://backend:9000/api
frontend | 11:44:37.584 [armeria-boss-http-*:8081] [] [/] INFO com.linecorp.armeria.server.Server - Serving HTTP at /0.0.0.0:8081 - http://127.0.0.1:8081/
zipkin | 2024-02-26T11:44:39.124Z INFO [/] 1 --- [cking-tasks-2-1] c.d.o.d.i.c.c.CqlPrepareAsyncProcessor : Adding handler to invalidate cached prepared statements on type changes
backend | [cb5b799770a7dafb/d9f1bf9de62d7d66] 192.168.160.6 - - 26/Feb/2024:11:44:45 +0000 "GET /api#Backend$$Lambda/0x00000001003323c0 h2c" 200 28
frontend | [cb5b799770a7dafb/cb5b799770a7dafb] 192.168.160.1 - - 26/Feb/2024:11:44:45 +0000 "GET /#Frontend$$Lambda/0x00000001003355e8 h1c" 200 28 |
This pares down the native libraries on our docker zipkin images to only those needed by linux and the target architecture.
This also improves the zipkin-slim image by correcting its accidental inclusion of cassandra dependencies, and enabling netty tcnative
Current zipkin arm64: note: unrelated os and archs
$ docker run --rm --entrypoint=/bin/sh ghcr.io/openzipkin/zipkin:master -c 'cd BOOT-INF/lib && du -sk *aarch* *x86* *a64*' 20 netty-resolver-dns-native-macos-4.1.106.Final-osx-aarch_64.jar 1100 netty-tcnative-boringssl-static-2.0.63.Final-linux-aarch_64.jar 976 netty-tcnative-boringssl-static-2.0.63.Final-osx-aarch_64.jar 44 netty-transport-native-epoll-4.1.106.Final-linux-aarch_64.jar 28 netty-transport-native-kqueue-4.1.106.Final-osx-aarch_64.jar 76 netty-transport-native-unix-common-4.1.106.Final-linux-aarch_64.jar 72 netty-transport-native-unix-common-4.1.106.Final-osx-aarch_64.jar 216 jnr-x86asm-1.0.2.jar 420 native-linux-x86_64-1.15.0.jar 20 netty-resolver-dns-native-macos-4.1.106.Final-osx-x86_64.jar 1188 netty-tcnative-boringssl-static-2.0.63.Final-linux-x86_64.jar 1088 netty-tcnative-boringssl-static-2.0.63.Final-osx-x86_64.jar 976 netty-tcnative-boringssl-static-2.0.63.Final-windows-x86_64.jar 40 netty-transport-native-epoll-4.1.106.Final-linux-x86_64.jar 28 netty-transport-native-kqueue-4.1.106.Final-osx-x86_64.jar 72 netty-transport-native-unix-common-4.1.106.Final-linux-x86_64.jar 72 netty-transport-native-unix-common-4.1.106.Final-osx-x86_64.jar 88 jnr-a64asm-1.0.0.jar
New zipkin arm64:
New zipkin amd64:
Current zipkin-slim (note: no boringssl, also extra junk from cassandra)
New zipkin-slim arm64:
New zipkin-slim amd64: