Skip to content

Commit 5e2ecc6

Browse files
razvandervoeti
authored andcommitted
fix: hbase entry point uses log dir env var (#974)
* fix: hbase entry point uses log dir env var * patch kerberos realm * move realm patching to main
1 parent 5764b53 commit 5e2ecc6

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

hbase/stackable/bin/hbase-entrypoint.sh

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ HBASE_ROLE_SERVICE_HOST="${HOSTNAME}.${HBASE_ROLE_SERVICE_NAME}"
2121

2222
REGION_MOVER_OPTS="--regionserverhost ${HBASE_ROLE_SERVICE_HOST}:${HBASE_ROLE_SERVICE_PORT} --operation unload ${REGION_MOVER_OPTS}"
2323

24-
if [ -f /stackable/kerberos/krb5.conf ]; then
25-
KERBEROS_REALM=$(grep -oP 'default_realm = \K.*' /stackable/kerberos/krb5.conf)
26-
export KERBEROS_REALM
27-
fi
28-
2924
prepare_signal_handlers() {
3025
unset term_child_pid
3126
unset term_kill_needed
@@ -69,8 +64,17 @@ cp /stackable/tmp/hdfs/core-site.xml /stackable/conf
6964
cp /stackable/tmp/hbase/* /stackable/conf
7065
cp /stackable/tmp/log_config/log4j* /stackable/conf
7166

72-
rm -f /stackable/log/_vector/shutdown
67+
if [ -f /stackable/kerberos/krb5.conf ]; then
68+
KERBEROS_REALM=$(grep -oP 'default_realm = \K.*' /stackable/kerberos/krb5.conf)
69+
export KERBEROS_REALM
70+
sed -i -e s/\$\{env\.KERBEROS_REALM\}/"${KERBEROS_REALM}"/g /stackable/conf/core-site.xml
71+
sed -i -e s/\$\{env\.KERBEROS_REALM\}/"${KERBEROS_REALM}"/g /stackable/conf/hbase-site.xml
72+
sed -i -e s/\$\{env\.KERBEROS_REALM\}/"${KERBEROS_REALM}"/g /stackable/conf/hdfs-site.xml
73+
fi
74+
75+
rm -f "${STACKABLE_LOG_DIR}/_vector/shutdown"
7376
prepare_signal_handlers
77+
/stackable/containerdebug --output="${STACKABLE_LOG_DIR}/containerdebug-state.json" --loop &
7478
/stackable/hbase/bin/hbase "${HBASE_ROLE_NAME}" start &
7579
wait_for_termination $!
76-
mkdir -p /stackable/log/_vector && touch /stackable/log/_vector/shutdown
80+
mkdir -p "${STACKABLE_LOG_DIR}/_vector" && touch "${STACKABLE_LOG_DIR}/_vector/shutdown"

0 commit comments

Comments
 (0)