Skip to content

Commit ca933cb

Browse files
authored
[ws-manager-mk2] include nodeName on failure (#20252)
1 parent 972287d commit ca933cb

File tree

1 file changed

+5
-1
lines changed
  • components/ws-manager-mk2/controllers

1 file changed

+5
-1
lines changed

components/ws-manager-mk2/controllers/status.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,12 @@ func (r *WorkspaceReconciler) updateWorkspaceStatus(ctx context.Context, workspa
124124
}
125125

126126
if failure != "" && !workspace.IsConditionTrue(workspacev1.WorkspaceConditionFailed) {
127+
var nodeName string
128+
if workspace.Status.Runtime != nil {
129+
nodeName = workspace.Status.Runtime.NodeName
130+
}
127131
// workspaces can fail only once - once there is a failed condition set, stick with it
128-
log.Info("workspace failed", "workspace", workspace.Name, "reason", failure)
132+
log.Info("workspace failed", "workspace", workspace.Name, "node", nodeName, "reason", failure)
129133
workspace.Status.SetCondition(workspacev1.NewWorkspaceConditionFailed(failure))
130134
r.Recorder.Event(workspace, corev1.EventTypeWarning, "Failed", failure)
131135
}

0 commit comments

Comments
 (0)