From bbdbb1658a912cebb7d333e472deb35f4cd297f6 Mon Sep 17 00:00:00 2001 From: Anant Aneja <1797669+aaneja@users.noreply.github.com> Date: Thu, 19 Dec 2024 17:37:37 +0530 Subject: [PATCH] Product tests fix for kerberized tests - Uses new image 'aaneja/hdp2.6-hive-kerberized-jdk17' that is the base `hdp2.6-hive-kerberized` with JDK 17 added to `/opt/java` - presto-launcher-wrapper.sh was updated to use Java from `/opt/java` if present - New add-opens for Keberos classes --- presto-product-tests/conf/docker/common/kerberos.yml | 2 +- .../conf/docker/files/presto-launcher-wrapper.sh | 11 ++++++++++- presto-product-tests/conf/presto/etc/jvm.config | 1 + .../conf/presto/etc/multinode-master-jvm.config | 3 ++- .../conf/presto/etc/multinode-worker-jvm.config | 3 ++- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/presto-product-tests/conf/docker/common/kerberos.yml b/presto-product-tests/conf/docker/common/kerberos.yml index 8737347a9c3e..8c1c9fdaa12c 100644 --- a/presto-product-tests/conf/docker/common/kerberos.yml +++ b/presto-product-tests/conf/docker/common/kerberos.yml @@ -10,7 +10,7 @@ services: presto-master: domainname: docker.cluster hostname: presto-master - image: '${HADOOP_BASE_IMAGE}-kerberized:${DOCKER_IMAGES_VERSION}' + image: 'aaneja/hdp2.6-hive-kerberized-jdk17' command: /docker/volumes/conf/docker/files/presto-launcher-wrapper.sh singlenode-kerberized run networks: default: diff --git a/presto-product-tests/conf/docker/files/presto-launcher-wrapper.sh b/presto-product-tests/conf/docker/files/presto-launcher-wrapper.sh index b804cba48461..641581ed7222 100755 --- a/presto-product-tests/conf/docker/files/presto-launcher-wrapper.sh +++ b/presto-product-tests/conf/docker/files/presto-launcher-wrapper.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -euo pipefail +set -euxo pipefail CONFIG="$1" @@ -14,6 +14,15 @@ if [[ ! -f "${CONFIG_PROPERTIES_LOCATION}" ]]; then exit 1 fi +# If we have an updated JDK for Presto in a specific path, use it +if [ -d /opt/java/openjdk ]; then + export JAVA_HOME=/opt/java/openjdk + export PATH=$JAVA_HOME/bin:$PATH +fi + +echo "Starting Presto with java set to -" +java -version + /docker/volumes/presto-server/bin/launcher \ -Dnode.id="${HOSTNAME}" \ --etc-dir="${PRESTO_CONFIG_DIRECTORY}" \ diff --git a/presto-product-tests/conf/presto/etc/jvm.config b/presto-product-tests/conf/presto/etc/jvm.config index 73079e971d28..d1b67b63931b 100644 --- a/presto-product-tests/conf/presto/etc/jvm.config +++ b/presto-product-tests/conf/presto/etc/jvm.config @@ -37,3 +37,4 @@ --add-opens=java.base/java.util.regex=ALL-UNNAMED --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED --add-opens=java.base/sun.security.action=ALL-UNNAMED +--add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED \ No newline at end of file diff --git a/presto-product-tests/conf/presto/etc/multinode-master-jvm.config b/presto-product-tests/conf/presto/etc/multinode-master-jvm.config index 0570168ce47a..137e8df6ec13 100644 --- a/presto-product-tests/conf/presto/etc/multinode-master-jvm.config +++ b/presto-product-tests/conf/presto/etc/multinode-master-jvm.config @@ -39,4 +39,5 @@ --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED ---add-opens=java.base/sun.security.action=ALL-UNNAMED \ No newline at end of file +--add-opens=java.base/sun.security.action=ALL-UNNAMED +--add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED \ No newline at end of file diff --git a/presto-product-tests/conf/presto/etc/multinode-worker-jvm.config b/presto-product-tests/conf/presto/etc/multinode-worker-jvm.config index 5ed097f05cf7..479b5521c0c9 100644 --- a/presto-product-tests/conf/presto/etc/multinode-worker-jvm.config +++ b/presto-product-tests/conf/presto/etc/multinode-worker-jvm.config @@ -38,4 +38,5 @@ --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED ---add-opens=java.base/sun.security.action=ALL-UNNAMED \ No newline at end of file +--add-opens=java.base/sun.security.action=ALL-UNNAMED +--add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED \ No newline at end of file