Skip to content

Commit f8baeed

Browse files
wizeninkGregory-Bull-Exasol
authored andcommitted
fix: Send identity as an envvar to workaround exanano parsing failure
1 parent 25db2ff commit f8baeed

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

launcher/assets/init/init-db-test.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,14 @@ VERSION_CHECK_JSON
123123
assert_contains "$run_line" "localhost/exasol-local-db:latest init"
124124
assert_contains "$run_line" "VERSION_CHECK_ENABLED=1"
125125
assert_contains "$run_line" "VERSION_CHECK_ENDPOINT=$expected_url"
126-
assert_contains "$run_line" "VERSION_CHECK_IDENTITY=$expected_identity"
126+
assert_contains "$run_line" "-e VERSION_CHECK_IDENTITY=$expected_identity"
127127
assert_contains "$run_line" "VERSION_CHECK_INTERVAL_SEC=60"
128128
assert_contains "$run_line" "VERSION_CHECK_RETRY_INTERVAL_SEC=60"
129129
assert_contains "$run_line" "VERSION_CHECK_OPERATING_SYSTEM=$expected_operating_system"
130+
local init_args="${run_line#*localhost/exasol-local-db:latest init}"
131+
assert_not_contains "$init_args" "VERSION_CHECK_IDENTITY"
130132
assert_not_contains "$run_line" "version_check_architecture"
131133
assert_not_contains "$run_line" "EXANANO_VERSION_CHECK"
132-
assert_not_contains "$run_line" "-e "
133134
assert_not_contains "$run_line" "--mount type=bind"
134135
}
135136

launcher/assets/init/init-db.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,13 @@ log_msg "Using image: $IMAGE_NAME"
378378
run_db_container() {
379379
if [ "$NANO_VERSION_CHECK_ENABLED" = "1" ]; then
380380
log_msg "Starting DB container with Nano version checks enabled in exasol.conf"
381+
# Exasol Personal identities contain semicolons. AdminI's init parser treats
382+
# semicolons as command separators, so pass this config value via the
383+
# container environment instead of the init command line.
384+
set -- "-e" "VERSION_CHECK_IDENTITY=$NANO_VERSION_CHECK_IDENTITY" "$IMAGE_NAME" "$@"
381385
else
382386
log_msg "Starting DB container with Nano version checks disabled in exasol.conf"
387+
set -- "$IMAGE_NAME" "$@"
383388
fi
384389
podman run -d \
385390
--name "$DB_CONTAINER_NAME" \
@@ -388,7 +393,7 @@ run_db_container() {
388393
--security-opt "$DB_SECURITY_OPT" \
389394
--restart "$DB_RESTART" \
390395
-p "$DB_PORT:$DB_PORT" \
391-
"$IMAGE_NAME" "$@"
396+
"$@"
392397
}
393398
# Start the container
394399
# Append Nano's documented "init" config arguments so version-check settings
@@ -401,7 +406,6 @@ set -- "$@" "VERSION_CHECK_ENABLED=$NANO_VERSION_CHECK_ENABLED"
401406
if [ "$NANO_VERSION_CHECK_ENABLED" = "1" ]; then
402407
set -- "$@" \
403408
"VERSION_CHECK_ENDPOINT=$NANO_VERSION_CHECK_ENDPOINT" \
404-
"VERSION_CHECK_IDENTITY=$NANO_VERSION_CHECK_IDENTITY" \
405409
"VERSION_CHECK_INTERVAL_SEC=$NANO_VERSION_CHECK_INTERVAL_SEC" \
406410
"VERSION_CHECK_RETRY_INTERVAL_SEC=$NANO_VERSION_CHECK_RETRY_INTERVAL_SEC"
407411
if [ -n "$NANO_VERSION_CHECK_OPERATING_SYSTEM" ]; then

0 commit comments

Comments
 (0)