-
Notifications
You must be signed in to change notification settings - Fork 2.8k
ZEPPELIN-1701: User impersonation not work with SPARK_HOME set. #1672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…h SPARK_HOME set.
|
CC: @zjffdu can you help review this. |
|
It still doesn't work for me. |
|
can you try
|
|
I can do that, but it doesn't make sense to force user to do that. |
|
I assumed this log file should have group permission to log into this file. What do you recommend ? |
|
I found another crtitical issue is that all the enviroment variables defined in zeppelin-env.sh (like HADOOP_CONF_DIR) won't be passed to the interpreter process because you use ssh. This will cause interpreter process fail to start. |
|
I think that should be fine; https://github.com/apache/zeppelin/blob/master/bin/interpreter.sh#L171 |
|
Actually it doesn't work for spark interpreter if you try that. https://github.com/apache/zeppelin/blob/master/bin/interpreter.sh#L171 is for pig. And it is not safe if we add other enviroment variables that is not in classpath. Could we run zeppelin-env.sh after ssh ? |
|
I see your point, let me check that. |
|
@zjffdu Here is what I've done
Can you review this and/or suggest more changes. |
|
as an aside, I'd update the JIRA/PR - it might not be obvious what "when SPARK_HOME is set" means. If external Spark is broken then I think it is a much much serious problem :) |
|
This is ready for review, have checked this in few flavours of linux, and it was working as expected. I'll add more documentation in a while. |
|
@prabhjyotsingh It works now, but log file permission issue is still here which make the spark interpreter fail to run unless user manually set permission |
|
@zjffdu did you try it again, as this is working for me, or if you can let me know your environment I can try on the same. |
|
LGTM 👍 |
|
#1704 changes the filename processenduser.md to userimpersonation.md. Could you resolve conflict? |
|
@Leemoonsoo resolved conflict. Thank you for the quick fix. |
| CLASSPATH+=":${ZEPPELIN_INTP_CLASSPATH}" | ||
|
|
||
| if [[ ! -z "$ZEPPELIN_IMPERSONATE_USER" ]]; then | ||
| INTERPRETER_RUN_COMMAND=${ZEPPELIN_IMPERSONATE_RUN_CMD}" '" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seem tricky so maybe I'm missing something, we are appending ' here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and this follows immediately with source in L195, so it will be 'source - no space between ' and source?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes the ' starts here (L193) and ends at L206. I can add a space between ' and source but since it was working I didn't do it.
|
Merging this if no more discussion. |
|
@prabhjyotsingh I can not run pyspark interpreter. Can you try that in your enviroment ? |
|
Please ignore it,I can ran it successfully now. |
|
Thank you for the verification. |
What is this PR for?
User impersonation of front end user does not work with SPARK_HOME set.
What type of PR is it?
[Bug Fix | Hot Fix]
Todos
What is the Jira issue?
How should this be tested?
set SPARK_HOME zeppelin-env.sh and then try to run
Screenshots (if appropriate)
Questions: