-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-22860] [SPARK-24621] [Core] [WebUI] - hide key password from linux ps listing and masterwebui point to https if ssl enabled #21514
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
Changes from all commits
380d97d
f38de2b
825380a
050b226
bc8a833
39bb2a0
d4de123
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -99,8 +99,11 @@ private[spark] class StandaloneSchedulerBackend( | |
| // Start executors with a few necessary configs for registering with the scheduler | ||
| val sparkJavaOpts = Utils.sparkJavaOpts(conf, SparkConf.isExecutorStartupConf) | ||
| val javaOpts = sparkJavaOpts ++ extraJavaOpts | ||
| val command = Command("org.apache.spark.executor.CoarseGrainedExecutorBackend", | ||
| args, sc.executorEnvs, classPathEntries ++ testingClassPath, libraryPathEntries, javaOpts) | ||
| val javaOptsFiltered = javaOpts.filterNot { opt => | ||
| opt.startsWith("-Dspark.ssl.keyStorePassword") || opt.startsWith("-Dspark.ssl.keyPassword") | ||
| } | ||
| val command = Command("org.apache.spark.executor.CoarseGrainedExecutorBackend", args, | ||
| sc.executorEnvs, classPathEntries ++ testingClassPath, libraryPathEntries, javaOptsFiltered) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wrong indentation here too, missing 2 spaces. Moreover, in such cases, we usually put one argument per line, so: |
||
| val webUrl = sc.ui.map(_.webUrl).getOrElse("") | ||
| val coresPerExecutor = conf.getOption("spark.executor.cores").map(_.toInt) | ||
| // If we're using dynamic allocation, set our initial executor limit to 0 for now. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -282,6 +282,40 @@ class MasterSuite extends SparkFunSuite | |
| } | ||
| } | ||
|
|
||
| test("SPARK-24621: https urls when ssl enabled") { | ||
| implicit val formats = org.json4s.DefaultFormats | ||
| val conf = new SparkConf() | ||
| conf.set("spark.ssl.enabled", "true") | ||
| val localCluster = new LocalSparkCluster(2, 2, 512, conf) | ||
| localCluster.start() | ||
| try { | ||
| eventually(timeout(5 seconds), interval(100 milliseconds)) { | ||
| val json = Source.fromURL(s"https://localhost:${localCluster.masterWebUIPort}/json") | ||
| .getLines().mkString("\n") | ||
| assert(json.contains('<a href="https://')) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| } | ||
| } finally { | ||
| localCluster.stop() | ||
| } | ||
| } | ||
|
|
||
| test("SPARK-24621: http urls when ssl disabled") { | ||
| implicit val formats = org.json4s.DefaultFormats | ||
| val conf = new SparkConf() | ||
| conf.set("spark.ssl.enabled", "false") | ||
| val localCluster = new LocalSparkCluster(2, 2, 512, conf) | ||
| localCluster.start() | ||
| try { | ||
| eventually(timeout(5 seconds), interval(100 milliseconds)) { | ||
| val json = Source.fromURL(s"http://localhost:${localCluster.masterWebUIPort}/json") | ||
| .getLines().mkString("\n") | ||
| assert(!json.contains('<a href="https://')) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto |
||
| } | ||
| } finally { | ||
| localCluster.stop() | ||
| } | ||
| } | ||
|
|
||
| test("master/worker web ui available with reverseProxy") { | ||
| implicit val formats = org.json4s.DefaultFormats | ||
| val reverseProxyUrl = "http://localhost:8080" | ||
|
|
||
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.
wrong indentation: missing 2 spaces.