fvaleri opened a new pull request, #17705: URL: https://github.com/apache/kafka/pull/17705
This patch fixes an issue with the Docker image that fails when setting any env var. ```sh $ docker run --rm -it -p 9092:9092 \ -e KAFKA_NUM_NETWORK_THREADS=4 \ apache/kafka:3.8.1 ... Exception in thread "main" org.apache.kafka.common.config.ConfigException: Missing required configuration `zookeeper.connect` which has no default value. at kafka.server.KafkaConfig.validateValues(KafkaConfig.scala:1232) at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1223) at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:545) at kafka.tools.StorageTool$.$anonfun$execute$1(StorageTool.scala:72) at scala.Option.flatMap(Option.scala:283) at kafka.tools.StorageTool$.execute(StorageTool.scala:72) at kafka.tools.StorageTool$.main(StorageTool.scala:53) at kafka.docker.KafkaDockerWrapper$.main(KafkaDockerWrapper.scala:48) at kafka.docker.KafkaDockerWrapper.main(KafkaDockerWrapper.scala) ``` Basically, the KafkaDockerWrapper does not copy the default KRaft config before appending the user env vars as an override. The result is that you end up with a server.properties that contains only the env vars. Additionally, if a user sets a custom empty config by mounting the wrong directory, the image silently runs the default configuration. This patch makes the image fail, so that the user can spot the error early on and correct the mount path. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org