From 65c8e566ddf6b7e939f958396619e3249bb39937 Mon Sep 17 00:00:00 2001 From: Emilien Kenler Date: Sat, 6 Jul 2019 01:32:41 +0900 Subject: [PATCH] Use credentials when describing keyspaces in cassandra schema builder (#1655) This follows #1635 in order to solve https://github.com/jaegertracing/jaeger-operator/issues/469 Signed-off-by: Emilien Kenler --- plugin/storage/cassandra/schema/docker.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin/storage/cassandra/schema/docker.sh b/plugin/storage/cassandra/schema/docker.sh index 6dcb380f893..4a55902c330 100755 --- a/plugin/storage/cassandra/schema/docker.sh +++ b/plugin/storage/cassandra/schema/docker.sh @@ -17,7 +17,11 @@ PASSWORD=${CASSANDRA_PASSWORD:-""} total_wait=0 while true do - ${CQLSH} ${CQLSH_SSL} ${CQLSH_HOST} -e "describe keyspaces" + if [ -z "$PASSWORD" ]; then + ${CQLSH} ${CQLSH_SSL} ${CQLSH_HOST} -e "describe keyspaces" + else + ${CQLSH} ${CQLSH_SSL} ${CQLSH_HOST} -u ${USER} -p ${PASSWORD} -e "describe keyspaces" + fi if (( $? == 0 )); then break else