Skip to content

[SPARK-27996][WEBUI][2.4] Send HTTP redirect using the correct protocol when Spark History server is deployed behind the reverse proxy#27083

Closed
ishikin wants to merge 1 commit intoapache:branch-2.4from
ishikin:branch-2.4
Closed

[SPARK-27996][WEBUI][2.4] Send HTTP redirect using the correct protocol when Spark History server is deployed behind the reverse proxy#27083
ishikin wants to merge 1 commit intoapache:branch-2.4from
ishikin:branch-2.4

Conversation

@ishikin
Copy link

@ishikin ishikin commented Jan 2, 2020

What changes were proposed in this pull request?

This PR adds method updateProtocolFromHeader(request: HttpServletRequest, url: String): String to JettyUtils.scala and calls this method from when Spark History Server is generating a redirect response.

Why are the changes needed?

This change is needed to address bug SPARK-27996 in History Server. Please note that similar change is likely needed in Spark UI. The scope of this PR is only to address the problem in History Server.

Does this PR introduce any user-facing change?

Yes, the Spark History server deployed in Kubernetes now correctly opens the job page.

How was this patch tested?

The patch was tested by building and deploying Spark History Server to Kubernetes cluster and then observing the behavior of the History Server UI. The regression testing was not performed. I will appreciate is someone can can confirm the Spark History Server still works when deployed on regular infrastructure (e.g. not behind the reverse proxy).

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@vanzin
Copy link
Contributor

vanzin commented Jan 3, 2020

Changes need to be made first in the master branch; this PR is against branch-2.4.

Also this looks at least partially covered by my fix for SPARK-30240; my change doesn't support the header approach, but you could add that to master instead.

@ishikin
Copy link
Author

ishikin commented Jan 21, 2020

Hi @vanzin
I have opened PR against master: #27311
Thanks!

@ishikin ishikin changed the title [SPARK-27996][K8S] Send HTTP redirect using the correct protocol when Spark History server is deployed behind the reverse proxy [SPARK-27996][K8S] Send HTTP redirect using the correct protocol when Spark History server is deployed behind the reverse proxy - 2.4 backport Jan 21, 2020
@dongjoon-hyun dongjoon-hyun changed the title [SPARK-27996][K8S] Send HTTP redirect using the correct protocol when Spark History server is deployed behind the reverse proxy - 2.4 backport [SPARK-27996][K8S][2.4] Send HTTP redirect using the correct protocol when Spark History server is deployed behind the reverse proxy Jan 23, 2020
@ishikin ishikin changed the title [SPARK-27996][K8S][2.4] Send HTTP redirect using the correct protocol when Spark History server is deployed behind the reverse proxy [SPARK-27996][WEBUI][2.4] Send HTTP redirect using the correct protocol when Spark History server is deployed behind the reverse proxy Jan 28, 2020
@srowen
Copy link
Member

srowen commented Mar 16, 2020

#27311

@srowen srowen closed this Mar 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants