Skip to content

Commit 6a51a6c

Browse files
committed
1
1 parent ec51a5d commit 6a51a6c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/ws-manager/pkg/manager/manager.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ func (m *Manager) StartWorkspace(_ context.Context, req *api.StartWorkspaceReque
314314
return nil, err
315315
}
316316

317-
err = wait.PollWithContext(ctx, 100*time.Millisecond, 10*time.Minute, podRunning(m.Clientset, pod.Name, pod.Namespace))
317+
err = wait.PollImmediateWithContext(ctx, 100*time.Millisecond, 10*time.Minute, podRunning(m.Clientset, pod.Name, pod.Namespace))
318318
if err != nil {
319319
return nil, xerrors.Errorf("workspace pod never reached Running state: %w", err)
320320
}
@@ -326,7 +326,7 @@ func (m *Manager) StartWorkspace(_ context.Context, req *api.StartWorkspaceReque
326326
return nil, xerrors.Errorf("unable to get workspace pod %s: %w", pod.Name, err)
327327
}
328328

329-
err = wait.PollWithContext(ctx, 100*time.Millisecond, 5*time.Minute, pvcRunning(m.Clientset, pvc.Name, pvc.Namespace))
329+
err = wait.PollImmediateWithContext(ctx, 100*time.Millisecond, 5*time.Minute, pvcRunning(m.Clientset, pvc.Name, pvc.Namespace))
330330
if err != nil {
331331
if startContext.VolumeSnapshot != nil && startContext.VolumeSnapshot.VolumeSnapshotName != "" {
332332
m.eventRecorder.Eventf(pod, corev1.EventTypeWarning, "PersistentVolumeClaim", "PVC %q restore from volume snapshot %q failed %v", pvc.Name, startContext.VolumeSnapshot.VolumeSnapshotName, err)

0 commit comments

Comments
 (0)