Skip to content

Commit

Permalink
[hbase] Using $(hostname -s) vs ${HOSTNAME} (#1143)
Browse files Browse the repository at this point in the history
Recent change in the hostname implementation has required that we find
short hostname using a different mechanism.  This patch makes that
change.
  • Loading branch information
cjac committed Feb 26, 2024
1 parent 1edc548 commit 4c866eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hbase/hbase.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ EOF
fi

if [ "${ENABLE_KERBEROS}" = true ]; then
if [[ "${HOSTNAME}" == "${DATAPROC_MASTER}" ]]; then
if [[ "$(hostname -s)" == "${DATAPROC_MASTER}" ]]; then
# Master
for m in "${MASTER_HOSTNAMES[@]}"; do
kadmin.local -q "addprinc -randkey hbase/${m}.${DOMAIN}@${REALM}"
Expand Down Expand Up @@ -255,7 +255,7 @@ EOF
fi

# Copy keytab to machine
gsutil cp "${KEYTAB_BUCKET}/keytabs/${CLUSTER_NAME}/hbase-${HOSTNAME}.keytab" $hbase_keytab_path
gsutil cp "${KEYTAB_BUCKET}/keytabs/${CLUSTER_NAME}/hbase-$(hostname -s).keytab" $hbase_keytab_path

# Change owner of keytab to hbase with read only permissions
if [ -f $hbase_keytab_path ]; then
Expand Down

0 comments on commit 4c866eb

Please sign in to comment.