Uh oh!
There was an error while loading. Please reload this page.
[SPARK-20044][UI] Support Spark UI behind front-end reverse proxy using a path prefix Revert proxy url - #29820
[SPARK-20044][UI] Support Spark UI behind front-end reverse proxy using a path prefix Revert proxy url#29820gengliangwang wants to merge 7 commits into
Conversation
gengliangwang
commented
Sep 21, 2020
This PR is to take over #17455. |
SparkQA
commented
Sep 21, 2020
Test build #128938 has finished for PR 29820 at commit
|
SparkQA
commented
Sep 21, 2020
Test build #128946 has finished for PR 29820 at commit
|
tgravescs
commented
Sep 22, 2020
the jira for this is resolved as won't fix, if we are working on it can you reopen the jira. |
gengliangwang
commented
Sep 22, 2020
@tgravescs Thanks for the reminder. I will update the JIRA after investigation. |
gatorsmile
commented
Oct 6, 2020
What is the status of this PR? |
SparkQA
commented
Oct 20, 2020
Kubernetes integration test starting |
SparkQA
commented
Oct 20, 2020
Kubernetes integration test status success |
98687de to
ba05ca0CompareSparkQA
commented
Oct 22, 2020
Test build #130168 has finished for PR 29820 at commit
|
SparkQA
commented
Oct 22, 2020
Kubernetes integration test starting |
SparkQA
commented
Oct 22, 2020
Kubernetes integration test status success |
ba05ca0 to
a38c1d4CompareSparkQA
commented
Oct 26, 2020
Test build #130274 has finished for PR 29820 at commit
|
SparkQA
commented
Oct 26, 2020
Kubernetes integration test starting |
SparkQA
commented
Oct 26, 2020
Kubernetes integration test status success |
SparkQA
commented
Oct 27, 2020
Kubernetes integration test starting |
SparkQA
commented
Oct 27, 2020
Kubernetes integration test status success |
gengliangwang
commented
Oct 27, 2020
This is now ready for review. |
SparkQA
commented
Oct 27, 2020
Test build #130331 has finished for PR 29820 at commit
|
gengliangwang
commented
Oct 30, 2020
cc @srowen@HeartSaVioR@cloud-fan as well |
| // if reverseProxyUrl is not set, then we continue to generate relative URLs | ||
| // starting with "/" throughout the UI and do not use activeMasterWebUiUrl | ||
| val proxyUrl = conf.get(UI_REVERSE_PROXY_URL.key, "").stripSuffix("/") | ||
| System.setProperty("spark.ui.proxyBase", proxyUrl) |
There was a problem hiding this comment.
shall we mention that the /proxy/... will be added in UIUtils.makeHref?
SparkQA
commented
Nov 1, 2020
Kubernetes integration test starting |
SparkQA
commented
Nov 1, 2020
Kubernetes integration test status success |
SparkQA
commented
Nov 1, 2020
Test build #130498 has finished for PR 29820 at commit
|
gengliangwang
commented
Nov 1, 2020
Merging to master |
drauschenbach
commented
Jun 4, 2021
I don't understand this statement:
In an HA Spark Standalone setup, there are always two Spark Masters, and config files are all static, because that is the model. Workers switch from one master to the other during a failover. So how can they be expected to contain a static reference to one or the other master in their static config? I expose both Spark Masters in my Nginx config (/spark-master.0/, /spark-master.1/), and I'm struggling to figure out how to roll out this change. |
gengliangwang
commented
Aug 22, 2021
@drauschenbach We can treat the prefix as the ID of one cluster. For example, let's say the prefix is "cluster1" and the reverse proxy is nginx, and both master 0 and master 1 are configurated with the prefix "/cluster1". |
What changes were proposed in this pull request?
Allow to run the Spark web UI behind a reverse proxy with URLs prefixed by a context root, like www.mydomain.com/spark. In particular, this allows to access multiple Spark clusters through the same virtual host, only distinguishing them by context root, like www.mydomain.com/cluster1, www.mydomain.com/cluster2, and it allows to run the Spark UI in a common cookie domain (for SSO) with other services.
Why are the changes needed?
This PR is to take over #17455.
After changes, Spark allows showing customized prefix URL in all the
hreflinks of the HTML pages.Does this PR introduce any user-facing change?
Yes, all the links of UI pages will be contains the value of
spark.ui.reverseProxyUrlif it is configurated.How was this patch tested?
New HTML Unit tests in MasterSuite
Manual UI testing for master, worker and app UI with an nginx proxy
Spark config:
nginx config: