Skip to content

Commit

Permalink
Merge pull request #14 from mesosphere/fix-krb5-env-var
Browse files Browse the repository at this point in the history
Fix krb5 env var passing
  • Loading branch information
mgummelt committed May 4, 2016
2 parents 445e896 + 14e1110 commit 4b437ee
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bin/spark-class
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,13 @@ if [ -n "${SPARK_MESOS_KRB5_CONF_BASE64}" ]; then
KRB5_TMP_FILE=$(mktemp -t krb5-XXXXX.conf)
echo "Writing krb5.conf to $KRB5_TMP_FILE" 1>&2
echo "${SPARK_MESOS_KRB5_CONF_BASE64}" | ${BASE64_D} > ${KRB5_TMP_FILE}
export SPARK_JAVA_OPTS="${SPARK_JAVA_OPTS} -Djava.security.krb5.conf=${KRB5_TMP_FILE}"

# This was previously set to just SPARK_JAVA_OPTS, but it was
# causing a bug where the value in the driver would get passed to
# the executor, ultimately overriding the executor's value, and
# causing the executor to read from a nonexistent file.
export SPARK_SUBMIT_OPTS="${SPARK_SUBMIT_OPTS} -Djava.security.krb5.conf=${KRB5_TMP_FILE}"
export SPARK_EXECUTOR_OPTS="${SPARK_EXECUTOR_OPTS} -Djava.security.krb5.conf=${KRB5_TMP_FILE}"
fi

# For tests
Expand Down

0 comments on commit 4b437ee

Please sign in to comment.