From edbde8caeb09c4d778761c8a1b1307474f832bef Mon Sep 17 00:00:00 2001 From: wang-mask <2018091609006@std.uestc.edu.cn> Date: Fri, 26 Jan 2024 19:56:32 +0800 Subject: [PATCH] fix the condition Signed-off-by: wang-mask <2018091609006@std.uestc.edu.cn> --- pkg/controller/mpi_job_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/mpi_job_controller.go b/pkg/controller/mpi_job_controller.go index da3f16f0f..44e2aeb3f 100644 --- a/pkg/controller/mpi_job_controller.go +++ b/pkg/controller/mpi_job_controller.go @@ -639,7 +639,7 @@ func (c *MPIJobController) syncHandler(key string) error { } } if launcher == nil { - if mpiJob.Spec.LauncherCreationPolicy == kubeflow.LauncherCreationPolicyAtStartup || c.countReadyWorkerPods(worker) == len(worker) { + if mpiJob.Spec.LauncherCreationPolicy == kubeflow.LauncherCreationPolicyAtStartup || (!isMPIJobSuspended(mpiJob) && c.countReadyWorkerPods(worker) == len(worker)) { launcher, err = c.kubeClient.BatchV1().Jobs(namespace).Create(context.TODO(), c.newLauncherJob(mpiJob), metav1.CreateOptions{}) if err != nil { c.recorder.Eventf(mpiJob, corev1.EventTypeWarning, mpiJobFailedReason, "launcher pod created failed: %v", err)