From 6600b840720f44579bda739531001aefac1f3787 Mon Sep 17 00:00:00 2001 From: Jakub Scholz Date: Wed, 2 Oct 2024 17:08:19 +0200 Subject: [PATCH] Improve the CA not found message Signed-off-by: Jakub Scholz --- .../kafka/scripts/kafka_tls_prepare_certificates.sh | 6 +++--- .../kafka/scripts/zookeeper_tls_prepare_certificates.sh | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docker-images/kafka-based/kafka/scripts/kafka_tls_prepare_certificates.sh b/docker-images/kafka-based/kafka/scripts/kafka_tls_prepare_certificates.sh index 0899cba409c..ccced0a99d8 100755 --- a/docker-images/kafka-based/kafka/scripts/kafka_tls_prepare_certificates.sh +++ b/docker-images/kafka-based/kafka/scripts/kafka_tls_prepare_certificates.sh @@ -15,14 +15,14 @@ for CRT in /opt/kafka/cluster-ca-certs/*.crt; do done echo "Preparing truststore for replication listener is complete" -echo "Looking for the right CA" +echo "Looking for the CA matching the server certificate" CA=$(find_ca /opt/kafka/cluster-ca-certs "/opt/kafka/broker-certs/$HOSTNAME.crt") if [ ! -f "$CA" ]; then - echo "No CA found. Thus exiting." + echo "No CA matching the server certificate found. This process will exit with failure." exit 1 fi -echo "Found the right CA: $CA" +echo "CA matching the server certificate found: $CA" echo "Preparing keystore for replication and clienttls listener" STORE=/tmp/kafka/cluster.keystore.p12 diff --git a/docker-images/kafka-based/kafka/scripts/zookeeper_tls_prepare_certificates.sh b/docker-images/kafka-based/kafka/scripts/zookeeper_tls_prepare_certificates.sh index 51ca7121703..daf130f0cd8 100755 --- a/docker-images/kafka-based/kafka/scripts/zookeeper_tls_prepare_certificates.sh +++ b/docker-images/kafka-based/kafka/scripts/zookeeper_tls_prepare_certificates.sh @@ -15,14 +15,15 @@ for CRT in /opt/kafka/cluster-ca-certs/*.crt; do done echo "Preparing truststore is complete" -echo "Looking for the right CA" +echo "Looking for the CA matching the server certificate" CA=$(find_ca "/opt/kafka/cluster-ca-certs" "/opt/kafka/zookeeper-node-certs/$HOSTNAME.crt") if [ ! -f "$CA" ]; then - echo "No CA found. Thus exiting." + echo "No CA matching the server certificate found. This process will exit with failure." exit 1 fi -echo "Found the right CA: $CA" + +echo "CA matching the server certificate found: $CA" echo "Preparing keystore for client and quorum listeners" STORE=/tmp/zookeeper/cluster.keystore.p12