Skip to content

Commit a756610

Browse files
committed
move realm patching to main
1 parent 4736f21 commit a756610

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

hbase/stackable/bin/hbase-entrypoint.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +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-
sed -i -e "s/\$\{env\.KERBEROS_REALM\}/${KERBEROS_REALM}/g" /stackable/conf/core-site.xml
28-
sed -i -e "s/\$\{env\.KERBEROS_REALM\}/${KERBEROS_REALM}/g" /stackable/conf/hbase-site.xml
29-
sed -i -e "s/\$\{env\.KERBEROS_REALM\}/${KERBEROS_REALM}/g" /stackable/conf/hdfs-site.xml
30-
fi
31-
3224
prepare_signal_handlers() {
3325
unset term_child_pid
3426
unset term_kill_needed
@@ -72,6 +64,14 @@ cp /stackable/tmp/hdfs/core-site.xml /stackable/conf
7264
cp /stackable/tmp/hbase/* /stackable/conf
7365
cp /stackable/tmp/log_config/log4j* /stackable/conf
7466

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+
7575
rm -f "${STACKABLE_LOG_DIR}/_vector/shutdown"
7676
prepare_signal_handlers
7777
/stackable/containerdebug --output="${STACKABLE_LOG_DIR}/containerdebug-state.json" --loop &

0 commit comments

Comments
 (0)