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

Explicitly expose ports on driver container, fixes #617 #618

Conversation

adelbertc
Copy link

What changes were proposed in this pull request?

Expose ports explicitly in the driver container. The driver Service created expects to reach the driver Pod at specific ports which before this change, were not explicitly exposed and would likely cause connection issues (see #617).

How was this patch tested?

Failure in #617 reproduced on Kubernetes 1.6.x and 1.8.x. Built the driver image with this patch and observed fixed #617 on Kubernetes 1.6.x.

@liyinan926
Copy link
Member

We have never run into this issue as reported here. @foxish.

@adelbertc
Copy link
Author

I imagine if a K8s cluster is secured with a network policy or something pods are not exposed by default which would make this change necessary.

@rvesse
Copy link

rvesse commented Mar 1, 2018

@liyinan926 Just to confirm that we've seen a very similar issue with specific network overlays - Romana - but not encountered it with others

@liyinan926
Copy link
Member

@rvesse are you able to test this patch and see if it fixes your issue?

@rvesse
Copy link

rvesse commented Mar 2, 2018

@liyinan926 We have a different patch internally which fixes our issue, not sure if it is the exact same problem though clearly closely related. The developer who did the debugging and patch is currently out on jury duty until mid next week so I am waiting for her to get back and take a look at this

@mccheah
Copy link

mccheah commented Mar 7, 2018

Can this be posted against apache/spark instead?

@foxish
Copy link
Member

foxish commented Mar 7, 2018 via email

@jhoole
Copy link

jhoole commented Mar 9, 2018

I'm the developer that works with rvesse. We have the exact same stacktrace, but I think our underlying problem is different. As far as we could figure out, the problem was coming from that Romana relies on entries in the routing table to route traffic from 10. to 192. and the headless service has no IP and doesn't get written to that table. Very long story short I was able to work around it by changing
val driverHostname = s"${driverService.getMetadata.getName}.$namespace.svc.cluster.local"
in resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/submitsteps/DriverServiceBootstrapStep.scala to
val driverHostname = s"${driverService.getMetadata.getName}"
because the driver service name would also resolve to the IP of the driver pod, which is written to the routing table.

We can try this fix, but I'm doubtful it will be a fix as Romana still won't know how to talk to the node.

@adelbertc
Copy link
Author

Superceded by apache#21884

@adelbertc adelbertc closed this Jan 29, 2019
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.

Trouble running SparkPi example on Kubernetes 1.8.x
6 participants