forked from radanalyticsio/openshift-spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move nss_wrapper setup code to an entrypoint
the goal is to allow users to shell into the cluster pods, or start a container manually, without having to manually setup nss_wrapper in their environment. everyone stumbles on getting the nss_wrapper env setup the first time. the resulting error is about failure to login from within the hadoop code, which is confusing. everyone then struggles with the manual nature of setting up the env after they overcome the strange login error.
- Loading branch information
Showing
4 changed files
with
19 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
# spark likes to be able to lookup a username for the running UID, if | ||
# no name is present fake it. | ||
cat /etc/passwd > /tmp/passwd | ||
echo "$(id -u):x:$(id -u):$(id -g):dynamic uid:$SPARK_HOME:/bin/false" >> /tmp/passwd | ||
|
||
export NSS_WRAPPER_PASSWD=/tmp/passwd | ||
# NSS_WRAPPER_GROUP must be set for NSS_WRAPPER_PASSWD to be used | ||
export NSS_WRAPPER_GROUP=/etc/group | ||
|
||
export LD_PRELOAD=libnss_wrapper.so | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters