Skip to content

Commit 6ae0eb5

Browse files
committed
Add message to event when job fails
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
1 parent fd3bb60 commit 6ae0eb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/upgrade/handle_batch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func (ctl *Controller) handleJobs(ctx context.Context) error {
8585
if failedTime.IsZero() {
8686
return obj, fmt.Errorf("condition %q missing field %q", upgradejob.ConditionFailed, "LastTransitionTime")
8787
}
88-
ctl.recorder.Eventf(plan, corev1.EventTypeWarning, "JobFailed", "Job failed on Node %s", node.Name)
88+
ctl.recorder.Eventf(plan, corev1.EventTypeWarning, "JobFailed", "Job failed on Node %s: %s", node.Name, upgradejob.ConditionFailed.GetMessage(obj))
8989
return obj, enqueueOrDelete(jobs, obj, failedTime)
9090
}
9191
// if the job has completed tag the node then enqueue-or-delete depending on the TTL window

0 commit comments

Comments
 (0)