Skip to content

Commit

Permalink
fix: MPIJob worker still running when NotEnoughResources
Browse files Browse the repository at this point in the history
fix

fix
  • Loading branch information
hackerboy01 committed Jun 27, 2022
1 parent cf266e6 commit 769656e
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions pkg/controller.v1/mpi/mpijob_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -638,16 +638,7 @@ func (jc *MPIJobReconciler) UpdateJobStatus(job interface{}, replicas map[common
}
}
}

// Some workers are still running, leave a running condition.
msg := fmt.Sprintf("MPIJob %s is running.", mpiJob.Name)
commonutil.LoggerForJob(mpiJob).Infof(msg)

if err := commonutil.UpdateJobConditions(jobStatus, commonv1.JobRunning, commonutil.JobRunningReason, msg); err != nil {
commonutil.LoggerForJob(mpiJob).Error(err, "failed to update MPIJob conditions")
return err
}

mpiJob.Status = *jobStatus.DeepCopy()
return nil
}

Expand Down

0 comments on commit 769656e

Please sign in to comment.