From da2c6a85fa6e44f361f2c2c7e8b35a89300614d7 Mon Sep 17 00:00:00 2001 From: "Tsung-Han Ho (Miles Ho)" Date: Mon, 14 Jul 2025 21:55:21 +0800 Subject: [PATCH 1/7] Update OpenJDK base image from buster to bullseye Signed-off-by: Tsung-Han Ho (Miles Ho) --- tests/README.md | 4 ++-- tests/docker/Dockerfile | 4 ++-- tests/docker/ducker-ak | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/README.md b/tests/README.md index 7a1d4e733945b..56c91ffdb0201 100644 --- a/tests/README.md +++ b/tests/README.md @@ -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-openjdk:17-bullseye" bash tests/docker/run_tests.sh ``` * Run tests with a different JVM ``` -bash tests/docker/ducker-ak up -j 'openjdk:17-buster'; tests/docker/run_tests.sh +bash tests/docker/ducker-ak up -j 'openjdk:17-bullseye'; tests/docker/run_tests.sh ``` * Remove ducker-ak containers ``` diff --git a/tests/docker/Dockerfile b/tests/docker/Dockerfile index 87078db195b92..aa124fe5e3f3b 100644 --- a/tests/docker/Dockerfile +++ b/tests/docker/Dockerfile @@ -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. -# Therefore, use openjdk:17-buster instead. -ARG jdk_version=openjdk:17-buster +# Therefore, use openjdk:17-bullseye instead. +ARG jdk_version=openjdk:17-bullseye FROM $jdk_version AS build-native-image WORKDIR /build diff --git a/tests/docker/ducker-ak b/tests/docker/ducker-ak index 05af5ac9bb122..c89f01d4e2e36 100755 --- a/tests/docker/ducker-ak +++ b/tests/docker/ducker-ak @@ -45,7 +45,7 @@ docker_run_memory_limit="2000m" default_num_nodes=14 # The default OpenJDK base image. -default_jdk="openjdk:17-buster" +default_jdk="openjdk:17-bullseye" # The default ducker-ak image name. default_image_name="ducker-ak" From 5d624248ad01ca31e93c5ba7ab43cf1745f6c9b3 Mon Sep 17 00:00:00 2001 From: "Tsung-Han Ho (Miles Ho)" Date: Wed, 16 Jul 2025 21:14:39 +0800 Subject: [PATCH 2/7] Remove duplicate renewTimePeriodOpt in DelegationTokenCommand validation Signed-off-by: Tsung-Han Ho (Miles Ho) --- .../java/org/apache/kafka/tools/DelegationTokenCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/src/main/java/org/apache/kafka/tools/DelegationTokenCommand.java b/tools/src/main/java/org/apache/kafka/tools/DelegationTokenCommand.java index 04162041f8eac..b6e260b882414 100644 --- a/tools/src/main/java/org/apache/kafka/tools/DelegationTokenCommand.java +++ b/tools/src/main/java/org/apache/kafka/tools/DelegationTokenCommand.java @@ -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)); } } } From 297209b56c330a97c69219e99a22f445c65c9e62 Mon Sep 17 00:00:00 2001 From: "Tsung-Han Ho (Miles Ho)" Date: Wed, 16 Jul 2025 21:18:46 +0800 Subject: [PATCH 3/7] Revert "Remove duplicate renewTimePeriodOpt in DelegationTokenCommand validation" This reverts commit 5d624248ad01ca31e93c5ba7ab43cf1745f6c9b3. --- .../java/org/apache/kafka/tools/DelegationTokenCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/src/main/java/org/apache/kafka/tools/DelegationTokenCommand.java b/tools/src/main/java/org/apache/kafka/tools/DelegationTokenCommand.java index b6e260b882414..04162041f8eac 100644 --- a/tools/src/main/java/org/apache/kafka/tools/DelegationTokenCommand.java +++ b/tools/src/main/java/org/apache/kafka/tools/DelegationTokenCommand.java @@ -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, expiryTimePeriodOpt)); + CommandLineUtils.checkInvalidArgs(parser, options, describeOpt, Set.of(renewTimePeriodOpt, maxLifeTimeOpt, hmacOpt, renewTimePeriodOpt, expiryTimePeriodOpt)); } } } From f6a52197a608b9bf1ad26c2048dc1d3657c325b0 Mon Sep 17 00:00:00 2001 From: "Tsung-Han Ho (Miles Ho)" Date: Wed, 16 Jul 2025 21:39:39 +0800 Subject: [PATCH 4/7] Remove duplicate JDK image defaults Signed-off-by: Tsung-Han Ho (Miles Ho) --- tests/README.md | 4 ++-- tests/docker/Dockerfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/README.md b/tests/README.md index 56c91ffdb0201..74961288a6cae 100644 --- a/tests/README.md +++ b/tests/README.md @@ -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-bullseye" bash tests/docker/run_tests.sh +image_name="ducker-ak-" bash tests/docker/run_tests.sh ``` * Run tests with a different JVM ``` -bash tests/docker/ducker-ak up -j 'openjdk:17-bullseye'; tests/docker/run_tests.sh +bash tests/docker/ducker-ak up -j ''; tests/docker/run_tests.sh ``` * Remove ducker-ak containers ``` diff --git a/tests/docker/Dockerfile b/tests/docker/Dockerfile index aa124fe5e3f3b..5cec40574e4d5 100644 --- a/tests/docker/Dockerfile +++ b/tests/docker/Dockerfile @@ -15,7 +15,7 @@ # The base image of openjdk:17 is typically oraclelinux:8-slim, which doesn't include apt-get. # Therefore, use openjdk:17-bullseye instead. -ARG jdk_version=openjdk:17-bullseye +ARG jdk_version FROM $jdk_version AS build-native-image WORKDIR /build From 4880171fef610ee2d139f7010f59517fd2bdf69a Mon Sep 17 00:00:00 2001 From: "Tsung-Han Ho (Miles Ho)" Date: Wed, 16 Jul 2025 22:09:31 +0800 Subject: [PATCH 5/7] Update documentation Signed-off-by: Tsung-Han Ho (Miles Ho) --- tests/README.md | 3 ++- tests/docker/Dockerfile | 2 -- tests/docker/ducker-ak | 7 ++++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/README.md b/tests/README.md index 74961288a6cae..8701999f74b49 100644 --- a/tests/README.md +++ b/tests/README.md @@ -49,12 +49,13 @@ TC_PATHS="tests/kafkatest/tests/streams/streams_upgrade_test.py::StreamsUpgradeT ``` * Run tests with a specific image name ``` -image_name="ducker-ak-" bash tests/docker/run_tests.sh +image_name="ducker-ak-openjdk:17" bash tests/docker/run_tests.sh ``` * Run tests with a different JVM ``` bash tests/docker/ducker-ak up -j ''; tests/docker/run_tests.sh ``` + You can customize the OpenJDK base image using the `-j` or `--jdk` parameter. The default is `openjdk:17-bullseye`. * Remove ducker-ak containers ``` bash tests/docker/ducker-ak down -f diff --git a/tests/docker/Dockerfile b/tests/docker/Dockerfile index 5cec40574e4d5..01c1a0533d3b1 100644 --- a/tests/docker/Dockerfile +++ b/tests/docker/Dockerfile @@ -13,8 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# The base image of openjdk:17 is typically oraclelinux:8-slim, which doesn't include apt-get. -# Therefore, use openjdk:17-bullseye instead. ARG jdk_version FROM $jdk_version AS build-native-image diff --git a/tests/docker/ducker-ak b/tests/docker/ducker-ak index c89f01d4e2e36..3b92f5bb84a51 100755 --- a/tests/docker/ducker-ak +++ b/tests/docker/ducker-ak @@ -45,6 +45,8 @@ docker_run_memory_limit="2000m" default_num_nodes=14 # The default OpenJDK base image. +# The base image of openjdk:17 is typically oraclelinux:8-slim, which doesn't include apt-get. +# Therefore, use openjdk:17-bullseye instead. default_jdk="openjdk:17-bullseye" # The default ducker-ak image name. @@ -70,7 +72,7 @@ help|-h|--help Display this help message up [-n|--num-nodes NUM_NODES] [-f|--force] [docker-image] - [-C|--custom-ducktape DIR] [-e|--expose-ports ports] [--ipv6] + [-C|--custom-ducktape DIR] [-e|--expose-ports ports] [-j|--jdk JDK_VERSION] [--ipv6] Bring up a cluster with the specified amount of nodes (defaults to ${default_num_nodes}). The docker image name defaults to ${default_image_name}. If --force is specified, we will attempt to bring up an image even some parameters are not valid. @@ -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 + If --ipv6 is specified, we will create a Docker network with IPv6 enabled. Note that port 5678 will be automatically exposed for ducker01 node and will be mapped to 5678 From 3f45d09c4a6a1abf599c3bce6fc06a80f6b1499a Mon Sep 17 00:00:00 2001 From: "Tsung-Han Ho (Miles Ho)" Date: Wed, 16 Jul 2025 22:55:43 +0800 Subject: [PATCH 6/7] Update documentation Signed-off-by: Tsung-Han Ho (Miles Ho) --- tests/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/README.md b/tests/README.md index 8701999f74b49..a64946c892a71 100644 --- a/tests/README.md +++ b/tests/README.md @@ -55,7 +55,7 @@ image_name="ducker-ak-openjdk:17" bash tests/docker/run_tests.sh ``` bash tests/docker/ducker-ak up -j ''; tests/docker/run_tests.sh ``` - You can customize the OpenJDK base image using the `-j` or `--jdk` parameter. The default is `openjdk:17-bullseye`. + You can customize the OpenJDK base image using the `-j` or `--jdk` parameter, otherwise a default value will be used. * Remove ducker-ak containers ``` bash tests/docker/ducker-ak down -f From ebcb35b8fe8e742a25fd3351c5adf9b9bcf9f387 Mon Sep 17 00:00:00 2001 From: "Tsung-Han Ho (Miles Ho)" Date: Thu, 17 Jul 2025 00:16:12 +0800 Subject: [PATCH 7/7] Update documentation Signed-off-by: Tsung-Han Ho (Miles Ho) --- tests/docker/ducker-ak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker/ducker-ak b/tests/docker/ducker-ak index 3b92f5bb84a51..68aed30923f96 100755 --- a/tests/docker/ducker-ak +++ b/tests/docker/ducker-ak @@ -87,7 +87,7 @@ up [-n|--num-nodes NUM_NODES] [-f|--force] [docker-image] 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 + the ducker container. Defaults to ${default_jdk}. Example: -j openjdk:17-bullseye If --ipv6 is specified, we will create a Docker network with IPv6 enabled.