Skip to content
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

[SPARK-12345] [CORE] Do not send SPARK_HOME through Spark submit REST interface #10329

Closed
wants to merge 1 commit into from
Closed

[SPARK-12345] [CORE] Do not send SPARK_HOME through Spark submit REST interface #10329

wants to merge 1 commit into from

Conversation

skyluc
Copy link

@skyluc skyluc commented Dec 16, 2015

It is usually an invalid location on the remote machine executing the job.
It is picked up by the Mesos support in cluster mode, and most of the time causes
the job to fail.

Fixes SPARK-12345

@andrewor14
Copy link
Contributor

add to whitelist

@andrewor14
Copy link
Contributor

This seems like a better place to filter it out. My only concern is that this one also affects standalone cluster mode, whereas #10332 is totally a Mesos thing.

@andrewor14
Copy link
Contributor

I will go ahead and do a quick test on standalone cluster mode with this fix and report back. If there are no problems, we can just go ahead and merge this to unblock the release, since you guys already ran the tests.

@@ -429,7 +429,7 @@ private[spark] object RestSubmissionClient {
*/
private[rest] def filterSystemEnvironment(env: Map[String, String]): Map[String, String] = {
env.filter { case (k, _) =>
(k.startsWith("SPARK_") && k != "SPARK_ENV_LOADED") || k.startsWith("MESOS_")
(k.startsWith("SPARK_") && k != "SPARK_ENV_LOADED" && k != "SPARK_HOME") || k.startsWith("MESOS_")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should add a comment here to explain why we need to filter out SPARK_HOME, and point to the JIRA. (though we can always do that in a separate patch so as to unblock the release)

@tnachen
Copy link
Contributor

tnachen commented Dec 16, 2015

I have a fix that only affects Mesos cluster mode #10332
If standalone never had a problem then I suggest we don't affect it.

@andrewor14
Copy link
Contributor

retest this please

@andrewor14
Copy link
Contributor

Though we should probably never pass SPARK_HOME of the client machine to the cluster. For master I think this is the better fix, though it's a little late to merge this into 1.6.

@tnachen
Copy link
Contributor

tnachen commented Dec 16, 2015

SGTM, I don't think we ever should either.

@andrewor14
Copy link
Contributor

retest this please

@SparkQA
Copy link

SparkQA commented Dec 16, 2015

Test build #2221 has finished for PR 10329 at commit f75815b.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@andrewor14
Copy link
Contributor

@skyluc looks like there is a style violation with this patch

@SparkQA
Copy link

SparkQA commented Dec 16, 2015

Test build #47845 has finished for PR 10329 at commit f75815b.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

It is usually an invalid location on the remote machine executing the job.
It is picked up by the Mesos support in cluster mode, and most of the time causes
the job to fail.

Fixes SPARK-12345
@skyluc
Copy link
Author

skyluc commented Dec 17, 2015

Fixed the 'style', added a comment, and switch to filterKeys.

@SparkQA
Copy link

SparkQA commented Dec 17, 2015

Test build #47926 has finished for PR 10329 at commit 62f4d2f.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@andrewor14
Copy link
Contributor

This is a better place to filter out SPARK_HOME than #10332. I'm going to merge this into master and revert the following patches in master:

Note: I'm only reverting these patches in master, but not in branch-1.6.

@tnachen
Copy link
Contributor

tnachen commented Dec 19, 2015

@andrewor14 thanks a lot for the patience on this, this validates we need to really invest in automated testing a lot of these things and hopefully don't repeat again the same mistakes. Hopefully soon every Mesos tagged patch runs through these tests as well.

@andrewor14
Copy link
Contributor

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants