Skip to content
This repository has been archived by the owner on Jan 9, 2020. It is now read-only.

Register executors using pod IPs instead of pod host names #215

Merged

Conversation

kimoonkim
Copy link
Member

@kimoonkim kimoonkim commented Apr 3, 2017

What changes were proposed in this pull request?

cc @foxish @ash211

Fixes #214 by registering executors with pod IPs instead of pod host names that kube-dns does not support. Also fixes a typo in block manager port key.

How was this patch tested?

Ran integration test successfully.

Tested with my k8s cluster.

Copy link

@ash211 ash211 left a comment

Choose a reason for hiding this comment

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

This looks great @kimoonkim ! I think IPs will be more reliable here anyway.

I think this fixes a broader issue we have where shuffle with >1 pod was previously broken due to us incorrectly relying on DNS resolution of pod hostnames, which isn't guaranteed by kube-dns.

@mccheah can you look specifically at the blockmanager change? I'm not sure how important that is but using the same default port on both driver and executor seems sane.

@@ -182,6 +183,12 @@ private[spark] class KubernetesClusterSchedulerBackend(
.withName(env._1)
.withValue(env._2)
.build())
requiredEnv = requiredEnv ++ Seq(new EnvVarBuilder()
Copy link

Choose a reason for hiding this comment

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

can you keep requiredEnv a val by directly concatenating that value with the new item you're appending? Better to keep the final reference if it's that small of a change

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the suggestion. Done in the new diff.

@mccheah
Copy link

mccheah commented Apr 5, 2017

+1 after @ash211 comment. We should cherry-pick this to the branch-2.1-kubernetes-release branch as well and tag that.

@foxish
Copy link
Member

foxish commented Apr 5, 2017

There is also the downward API for exposing PodIP to the container.

@foxish
Copy link
Member

foxish commented Apr 5, 2017

Oh never mind. I just noticed that it's the downward API being used here. LGTM.

@kimoonkim
Copy link
Member Author

Thanks for the reviews. Addressed @ash211 's comment. Maybe ready after Jenkins bless.

@foxish
Copy link
Member

foxish commented Apr 5, 2017

rerun unit tests please

@foxish
Copy link
Member

foxish commented Apr 5, 2017

Merging now. @kimoonkim can you cherrypick this change onto the release branch?

@foxish foxish merged commit 0a13206 into apache-spark-on-k8s:branch-2.1-kubernetes Apr 5, 2017
mccheah pushed a commit that referenced this pull request Apr 5, 2017
* Register executors using pod IPs

* Fix block manager port typo

* Fix import

* Keep requiredEnv to be a val

* Clean up indentation
foxish pushed a commit that referenced this pull request Apr 5, 2017
…ranch) (#217)

* Register executors using pod IPs instead of pod host names (#215)

* Register executors using pod IPs

* Fix block manager port typo

* Fix import

* Keep requiredEnv to be a val

* Clean up indentation

* Resolve conflicts
@kimoonkim
Copy link
Member Author

@foxish Ah. I didn't see the cherrypick ask in time. Thanks @mccheah

@kimoonkim kimoonkim deleted the register-pod-ip branch July 14, 2017 17:28
foxish pushed a commit that referenced this pull request Jul 24, 2017
* Register executors using pod IPs

* Fix block manager port typo

* Fix import

* Keep requiredEnv to be a val

* Clean up indentation
ifilonenko pushed a commit to ifilonenko/spark that referenced this pull request Feb 26, 2019
puneetloya pushed a commit to puneetloya/spark that referenced this pull request Mar 11, 2019
…ark-on-k8s#215)

* Register executors using pod IPs

* Fix block manager port typo

* Fix import

* Keep requiredEnv to be a val

* Clean up indentation
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants