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-38379][SPARK-37735][K8S][3.2] Fix Kubernetes Client mode when mounting persistent volume with storage class #35804

Closed
wants to merge 1 commit into from

Conversation

tgravescs
Copy link
Contributor

@tgravescs tgravescs commented Mar 10, 2022

What changes were proposed in this pull request?

This is the branch-3.2 PR for #35792. Note I also pulled in 068d53b from [SPARK-37735] to pick up adding appId to KubernetesConf. I don't see that as an issue since its private, this was actually the fix I originally had as I was testing on 3.2 and then realized someone added it on master branch.

Running spark-shell in client mode on Kubernetes cluster when mounting persistent volumes with a storage class results in a big warning being thrown on startup.

https://issues.apache.org/jira/browse/SPARK-38379[](https://github.com/tgravescs)

The issue here is there is a race condition between when spark.app.id is set in SparkContext and when its used, so change to use the KubernetesConf appId, which is what is used to set spark.app.id.

Why are the changes needed?

Throws big warning to user and I believe the label is wrong as well.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Unit test added. The test fails without the fix.
Also manually tested on real k8s cluster.

@tgravescs
Copy link
Contributor Author

@dongjoon-hyun

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1 for your decision to backporting two JIRA issues together.

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-38379][SPARK-37735][K8S][branch-3.2]Fix Kubernetes Client mode when mounting persistent volume with storage class [SPARK-38379][SPARK-37735][K8S][3.2] Fix Kubernetes Client mode when mounting persistent volume with storage class Mar 10, 2022
dongjoon-hyun pushed a commit that referenced this pull request Mar 10, 2022
…mounting persistent volume with storage class

### What changes were proposed in this pull request?

This is the branch-3.2 PR for #35792. Note I also pulled in 068d53b from [SPARK-37735] to pick up adding appId to KubernetesConf. I don't see that as an issue since its private, this was actually the fix I originally had as I was testing on 3.2 and then realized someone added it on master branch.

Running spark-shell in client mode on Kubernetes cluster when mounting persistent volumes with a storage class results in a big warning being thrown on startup.

https://issues.apache.org/jira/browse/SPARK-38379[](https://github.com/tgravescs)

The issue here is there is a race condition between when spark.app.id is set in SparkContext and when its used, so change to use the KubernetesConf appId, which is what is used to set spark.app.id.

### Why are the changes needed?
Throws big warning to user and I believe the label is wrong as well.

### Does this PR introduce any user-facing change?
No

### How was this patch tested?

Unit test added. The test fails without the fix.
Also manually tested on real k8s cluster.

Closes #35804 from tgravescs/k8smount32.

Authored-by: Thomas Graves <tgraves@nvidia.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
kazuyukitanimura pushed a commit to kazuyukitanimura/spark that referenced this pull request Aug 10, 2022
…mounting persistent volume with storage class

### What changes were proposed in this pull request?

This is the branch-3.2 PR for apache#35792. Note I also pulled in apache@068d53b from [SPARK-37735] to pick up adding appId to KubernetesConf. I don't see that as an issue since its private, this was actually the fix I originally had as I was testing on 3.2 and then realized someone added it on master branch.

Running spark-shell in client mode on Kubernetes cluster when mounting persistent volumes with a storage class results in a big warning being thrown on startup.

https://issues.apache.org/jira/browse/SPARK-38379[](https://github.com/tgravescs)

The issue here is there is a race condition between when spark.app.id is set in SparkContext and when its used, so change to use the KubernetesConf appId, which is what is used to set spark.app.id.

### Why are the changes needed?
Throws big warning to user and I believe the label is wrong as well.

### Does this PR introduce any user-facing change?
No

### How was this patch tested?

Unit test added. The test fails without the fix.
Also manually tested on real k8s cluster.

Closes apache#35804 from tgravescs/k8smount32.

Authored-by: Thomas Graves <tgraves@nvidia.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit a35ea15)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants