From df3d75a406784f0b9fdf7fd3a7b3615c8bbd0832 Mon Sep 17 00:00:00 2001 From: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Date: Wed, 15 Jan 2025 18:12:17 +0100 Subject: [PATCH 1/3] fix: hbase entry point uses log dir env var --- hbase/stackable/bin/hbase-entrypoint.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hbase/stackable/bin/hbase-entrypoint.sh b/hbase/stackable/bin/hbase-entrypoint.sh index 89b488a21..e3a389fb6 100755 --- a/hbase/stackable/bin/hbase-entrypoint.sh +++ b/hbase/stackable/bin/hbase-entrypoint.sh @@ -69,8 +69,9 @@ cp /stackable/tmp/hdfs/core-site.xml /stackable/conf cp /stackable/tmp/hbase/* /stackable/conf cp /stackable/tmp/log_config/log4j* /stackable/conf -rm -f /stackable/log/_vector/shutdown +rm -f "${STACKABLE_LOG_DIR}/_vector/shutdown" prepare_signal_handlers +/stackable/containerdebug --output="${STACKABLE_LOG_DIR}/containerdebug-state.json" --loop & /stackable/hbase/bin/hbase "${HBASE_ROLE_NAME}" start & wait_for_termination $! -mkdir -p /stackable/log/_vector && touch /stackable/log/_vector/shutdown +mkdir -p "${STACKABLE_LOG_DIR}/_vector" && touch "${STACKABLE_LOG_DIR}/_vector/shutdown" From 4736f217ab1f967e16ef126353d4c8fcea3dff0a Mon Sep 17 00:00:00 2001 From: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Date: Mon, 3 Feb 2025 14:58:19 +0100 Subject: [PATCH 2/3] patch kerberos realm --- hbase/stackable/bin/hbase-entrypoint.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hbase/stackable/bin/hbase-entrypoint.sh b/hbase/stackable/bin/hbase-entrypoint.sh index e3a389fb6..525facc96 100755 --- a/hbase/stackable/bin/hbase-entrypoint.sh +++ b/hbase/stackable/bin/hbase-entrypoint.sh @@ -24,6 +24,9 @@ REGION_MOVER_OPTS="--regionserverhost ${HBASE_ROLE_SERVICE_HOST}:${HBASE_ROLE_SE if [ -f /stackable/kerberos/krb5.conf ]; then KERBEROS_REALM=$(grep -oP 'default_realm = \K.*' /stackable/kerberos/krb5.conf) export KERBEROS_REALM + sed -i -e "s/\$\{env\.KERBEROS_REALM\}/${KERBEROS_REALM}/g" /stackable/conf/core-site.xml + sed -i -e "s/\$\{env\.KERBEROS_REALM\}/${KERBEROS_REALM}/g" /stackable/conf/hbase-site.xml + sed -i -e "s/\$\{env\.KERBEROS_REALM\}/${KERBEROS_REALM}/g" /stackable/conf/hdfs-site.xml fi prepare_signal_handlers() { From a7566103be37fc46688a5a6b2ae07affb16ed714 Mon Sep 17 00:00:00 2001 From: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Date: Mon, 3 Feb 2025 17:17:09 +0100 Subject: [PATCH 3/3] move realm patching to main --- hbase/stackable/bin/hbase-entrypoint.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hbase/stackable/bin/hbase-entrypoint.sh b/hbase/stackable/bin/hbase-entrypoint.sh index 525facc96..3b5192016 100755 --- a/hbase/stackable/bin/hbase-entrypoint.sh +++ b/hbase/stackable/bin/hbase-entrypoint.sh @@ -21,14 +21,6 @@ HBASE_ROLE_SERVICE_HOST="${HOSTNAME}.${HBASE_ROLE_SERVICE_NAME}" REGION_MOVER_OPTS="--regionserverhost ${HBASE_ROLE_SERVICE_HOST}:${HBASE_ROLE_SERVICE_PORT} --operation unload ${REGION_MOVER_OPTS}" -if [ -f /stackable/kerberos/krb5.conf ]; then - KERBEROS_REALM=$(grep -oP 'default_realm = \K.*' /stackable/kerberos/krb5.conf) - export KERBEROS_REALM - sed -i -e "s/\$\{env\.KERBEROS_REALM\}/${KERBEROS_REALM}/g" /stackable/conf/core-site.xml - sed -i -e "s/\$\{env\.KERBEROS_REALM\}/${KERBEROS_REALM}/g" /stackable/conf/hbase-site.xml - sed -i -e "s/\$\{env\.KERBEROS_REALM\}/${KERBEROS_REALM}/g" /stackable/conf/hdfs-site.xml -fi - prepare_signal_handlers() { unset term_child_pid unset term_kill_needed @@ -72,6 +64,14 @@ cp /stackable/tmp/hdfs/core-site.xml /stackable/conf cp /stackable/tmp/hbase/* /stackable/conf cp /stackable/tmp/log_config/log4j* /stackable/conf +if [ -f /stackable/kerberos/krb5.conf ]; then + KERBEROS_REALM=$(grep -oP 'default_realm = \K.*' /stackable/kerberos/krb5.conf) + export KERBEROS_REALM + sed -i -e s/\$\{env\.KERBEROS_REALM\}/"${KERBEROS_REALM}"/g /stackable/conf/core-site.xml + sed -i -e s/\$\{env\.KERBEROS_REALM\}/"${KERBEROS_REALM}"/g /stackable/conf/hbase-site.xml + sed -i -e s/\$\{env\.KERBEROS_REALM\}/"${KERBEROS_REALM}"/g /stackable/conf/hdfs-site.xml +fi + rm -f "${STACKABLE_LOG_DIR}/_vector/shutdown" prepare_signal_handlers /stackable/containerdebug --output="${STACKABLE_LOG_DIR}/containerdebug-state.json" --loop &