-
Notifications
You must be signed in to change notification settings - Fork 14.6k
KAFKA-19501: Update OpenJDK base image from buster to bullseye #20165
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
KAFKA-19501: Update OpenJDK base image from buster to bullseye #20165
Conversation
Signed-off-by: Tsung-Han Ho (Miles Ho) <mystes3016@gmail.com>
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.
@dalaoqi
Could you run a random e2e test locally and paste the result?
Thanks
@frankvicky |
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.
@dalaoqi: LGTM
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.
LGTM. Left one comment for you to consider. Thanks.
I would also like to mention that, currently, the image build is broken due to stale apt-get sources list in the openjdk:17-buster base image:
> [stage-1 3/60] RUN apt update && apt install -y sudo git netcat iptables rsync unzip wget curl jq coreutils openssh-server net-tools vim python3-pip python3-dev libffi-dev libssl-dev cmake pkg-config libfuse-dev iperf traceroute iproute2 iputils-ping && apt-get -y clean:
0.267
0.267 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
0.267
0.362 Ign:1 http://deb.debian.org/debian buster InRelease
0.362 Ign:2 http://security.debian.org/debian-security buster/updates InRelease
0.367 Ign:3 http://deb.debian.org/debian buster-updates InRelease
0.369 Err:4 http://security.debian.org/debian-security buster/updates Release
0.369 404 Not Found [IP: 151.101.66.132 80]
0.375 Err:5 http://deb.debian.org/debian buster Release
0.375 404 Not Found [IP: 151.101.2.132 80]
0.380 Err:6 http://deb.debian.org/debian buster-updates Release
0.380 404 Not Found [IP: 151.101.2.132 80]
0.384 Reading package lists...
0.391 E: The repository 'http://security.debian.org/debian-security buster/updates Release' does not have a Release file.
0.391 E: The repository 'http://deb.debian.org/debian buster Release' does not have a Release file.
0.391 E: The repository 'http://deb.debian.org/debian buster-updates Release' does not have a Release file.
tests/docker/Dockerfile
Outdated
# Therefore, use openjdk:17-buster instead. | ||
ARG jdk_version=openjdk:17-buster | ||
# Therefore, use openjdk:17-bullseye instead. | ||
ARG jdk_version=openjdk:17-bullseye |
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 we remove the default value here since we are taking that from the build script where we also have a default value?
If we also update the README.md using a placeholder (e.g. <JDK_IMAGE>), in the next base image update we would only need to update the default image name in one place. Wdyt?
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.
sounds good
Yes, that's why I created this ticket 😄 |
Oh yeah, sorry. I searched directly in open PRs, and wasn't clear we were updating to address the issue. |
Signed-off-by: Tsung-Han Ho (Miles Ho) <mystes3016@gmail.com>
@@ -301,7 +301,7 @@ public void checkArgs() { | |||
CommandLineUtils.checkInvalidArgs(parser, options, createOpt, Set.of(hmacOpt, renewTimePeriodOpt, expiryTimePeriodOpt)); | |||
CommandLineUtils.checkInvalidArgs(parser, options, renewOpt, Set.of(renewPrincipalsOpt, maxLifeTimeOpt, expiryTimePeriodOpt, ownerPrincipalsOpt)); | |||
CommandLineUtils.checkInvalidArgs(parser, options, expiryOpt, Set.of(renewOpt, maxLifeTimeOpt, renewTimePeriodOpt, ownerPrincipalsOpt)); | |||
CommandLineUtils.checkInvalidArgs(parser, options, describeOpt, Set.of(renewTimePeriodOpt, maxLifeTimeOpt, hmacOpt, renewTimePeriodOpt, expiryTimePeriodOpt)); | |||
CommandLineUtils.checkInvalidArgs(parser, options, describeOpt, Set.of(renewTimePeriodOpt, maxLifeTimeOpt, hmacOpt, expiryTimePeriodOpt)); |
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.
please revert this unrelated change
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.
It seems that this will cause the e2e error.
The duplicate arguments will cause Set.of
throws IllegalArgumentException
.
We could open another patch to fix it.
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.
I mean it would be great to create another PR to fix it with extra unit test.
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.
open #20177
… validation" This reverts commit 5d62424.
Signed-off-by: Tsung-Han Ho (Miles Ho) <mystes3016@gmail.com>
tests/README.md
Outdated
@@ -49,11 +49,11 @@ TC_PATHS="tests/kafkatest/tests/streams/streams_upgrade_test.py::StreamsUpgradeT | |||
``` | |||
* Run tests with a specific image name | |||
``` | |||
image_name="ducker-ak-openjdk:17-buster" bash tests/docker/run_tests.sh | |||
image_name="ducker-ak-<JDK_IMAGE>" bash tests/docker/run_tests.sh |
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.
I think @fvaleri's suggestion is to add an example for the usage of jdk_version
@@ -49,11 +49,11 @@ TC_PATHS="tests/kafkatest/tests/streams/streams_upgrade_test.py::StreamsUpgradeT | |||
``` | |||
* Run tests with a specific image name | |||
``` | |||
image_name="ducker-ak-openjdk:17-buster" bash tests/docker/run_tests.sh |
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.
for another, perhaps we could use openjdk:17
for this example to avoid using the explicit os version.
tests/docker/Dockerfile
Outdated
@@ -14,8 +14,8 @@ | |||
# limitations under the License. | |||
|
|||
# The base image of openjdk:17 is typically oraclelinux:8-slim, which doesn't include apt-get. |
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 comment should be moved to ducker-ak
Signed-off-by: Tsung-Han Ho (Miles Ho) <mystes3016@gmail.com>
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.
LGTM
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.
@dalaoqi thanks for the changes, just left a small improvement suggestion.
tests/README.md
Outdated
``` | ||
* Run tests with a different JVM | ||
``` | ||
bash tests/docker/ducker-ak up -j '<JDK_IMAGE>'; tests/docker/run_tests.sh | ||
``` | ||
You can customize the OpenJDK base image using the `-j` or `--jdk` parameter. The default is `openjdk:17-bullseye`. |
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.
What about rewriting like this:
You can customize the OpenJDK base image using the
-j
or--jdk
parameter, otherwise a default value will be used.
Signed-off-by: Tsung-Han Ho (Miles Ho) <mystes3016@gmail.com>
tests/docker/ducker-ak
Outdated
@@ -84,6 +86,9 @@ up [-n|--num-nodes NUM_NODES] [-f|--force] [docker-image] | |||
or a combination of port/port-range separated by comma (like 2181,9092 or 2181,5005-5008). | |||
By default no port is exposed. See README.md for more detail on this option. | |||
|
|||
If -j|--jdk is specified, you can customize the OpenJDK base image used for building | |||
the ducker container. Defaults to ${default_jdk}. Example: -j openjdk:11-bullseye |
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.
Since current Kafka versions no longer support JDK 11, it would be better to use JDK 17 in this example.
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.
Thanks.
Signed-off-by: Tsung-Han Ho (Miles Ho) <mystes3016@gmail.com>
the failed test is traced by https://issues.apache.org/jira/browse/KAFKA-19513 |
We probably want to backport this as we now can't run system tests anymore on the existing release branches: 4.1, 4.0, etc With buster we get the following error message when running
|
The changes update the OpenJDK base image from 17-buster to 17-bullseye: - Updates tests/docker/Dockerfile to use openjdk:17-bullseye instead of openjdk:17-buster - Updates tests/docker/ducker-ak script to use the new default image - Updates documentation in tests/README.md with the new image name examples Reviewers: Federico Valeri <fedevaleri@gmail.com>, TengYao Chi <kitingiao@gmail.com>, Ken Huang <s7133700@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
…#20165) The changes update the OpenJDK base image from 17-buster to 17-bullseye: - Updates tests/docker/Dockerfile to use openjdk:17-bullseye instead of openjdk:17-buster - Updates tests/docker/ducker-ak script to use the new default image - Updates documentation in tests/README.md with the new image name examples Reviewers: Federico Valeri <fedevaleri@gmail.com>, TengYao Chi <kitingiao@gmail.com>, Ken Huang <s7133700@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
@mimaison yes, you are right. Should I backport it to 4.1 after the 4.1.0 release? |
I've just backported it to 4.1, otherwise we can't run the system tests. We'll also need to backport it to 4.0 for the 4.0.1 release, and possibly to 3.9 in case we ever to another bugfix release. |
…#20165) The changes update the OpenJDK base image from 17-buster to 17-bullseye: - Updates tests/docker/Dockerfile to use openjdk:17-bullseye instead of openjdk:17-buster - Updates tests/docker/ducker-ak script to use the new default image - Updates documentation in tests/README.md with the new image name examples Reviewers: Federico Valeri <fedevaleri@gmail.com>, TengYao Chi <kitingiao@gmail.com>, Ken Huang <s7133700@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
ok, I will backport it to 4.0 and 3.9 after fixing the conflicts on my local. |
backport to 74d93ad 3.9 has no such issue. |
…#20165) The changes update the OpenJDK base image from 17-buster to 17-bullseye: - Updates tests/docker/Dockerfile to use openjdk:17-bullseye instead of openjdk:17-buster - Updates tests/docker/ducker-ak script to use the new default image - Updates documentation in tests/README.md with the new image name examples Reviewers: Federico Valeri <fedevaleri@gmail.com>, TengYao Chi <kitingiao@gmail.com>, Ken Huang <s7133700@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
…#20165) The changes update the OpenJDK base image from 17-buster to 17-bullseye: - Updates tests/docker/Dockerfile to use openjdk:17-bullseye instead of openjdk:17-buster - Updates tests/docker/ducker-ak script to use the new default image - Updates documentation in tests/README.md with the new image name examples Reviewers: Federico Valeri <fedevaleri@gmail.com>, TengYao Chi <kitingiao@gmail.com>, Ken Huang <s7133700@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
The changes update the OpenJDK base image from 17-buster to 17-bullseye:
openjdk:17-buster - Updates tests/docker/ducker-ak script to use the
new default image - Updates documentation in tests/README.md with the
new image name examples
Reviewers: Federico Valeri fedevaleri@gmail.com, TengYao Chi
kitingiao@gmail.com, Ken Huang s7133700@gmail.com, Chia-Ping Tsai
chia7712@gmail.com