dongjoon-hyun commented on a change in pull request #32752:
URL: https://github.com/apache/spark/pull/32752#discussion_r645257919



##########
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:
       I don't think the error report is correct because Apache Spark doesn't 
use `restart` executor at all. The driver will keep creating new executors 
because the executors with `UnknownHostException` will be dead on the failure. 
I'm currently describing the Apache Spark behavior, not 3rd party operator 
behavior.




-- 
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]

Reply via email to