dongjoon-hyun commented on a change in pull request #32752:
URL: https://github.com/apache/spark/pull/32752#discussion_r645206898
##########
File path:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodsAllocator.scala
##########
@@ -99,6 +102,17 @@ private[spark] class ExecutorPodsAllocator(
@volatile private var deletedExecutorIds = Set.empty[Long]
def start(applicationId: String, schedulerBackend:
KubernetesClusterSchedulerBackend): Unit = {
+ // Wait until the driver pod is ready before starting executors, as the
headless service won't
+ // be resolvable by DNS until the driver pod is ready.
+ try {
+ kubernetesClient.pods()
+ .withName(kubernetesDriverPodName.get)
+ .waitUntilReady(driverPodReadinessTimeout, TimeUnit.MINUTES)
+ } catch {
+ case e: InterruptedException =>
+ logWarning(s"Timeout waiting for driver pod
${kubernetesDriverPodName.get} get ready in " +
+ s"namespace $namespace")
+ }
Review comment:
-1 for `SparkException` idea. That is a huge regression.
`UnknownHostException` is not a job blocker because Spark is going to create
the required executors in any way eventually. If you throws SparkException, you
change will be a breaker of the existing Spark pipelines indeed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]