Skip to content

Commit

Permalink
Fix confusing message about suspending a job with no matching workload
Browse files Browse the repository at this point in the history
  • Loading branch information
mwysokin committed Aug 8, 2024
1 parent acc4dc2 commit 0b9933f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/jobframework/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,6 @@ func (r *JobReconciler) ensureOneWorkload(ctx context.Context, job GenericJob, o

// If there is no matching workload and the job is running, suspend it.
if match == nil && !job.IsSuspended() {
log.V(2).Info("job with no matching workload, suspending")
var w *kueue.Workload
if len(toDelete) == 1 {
// The job may have been modified and hence the existing workload
Expand All @@ -613,6 +612,7 @@ func (r *JobReconciler) ensureOneWorkload(ctx context.Context, job GenericJob, o
}

if _, _, finished := job.Finished(); !finished {
log.V(2).Info("job with no matching workload, suspending")
var msg string
if w == nil {
msg = "Missing Workload; unable to restore pod templates"
Expand Down

0 comments on commit 0b9933f

Please sign in to comment.