Skip to content

Commit

Permalink
fix pvc crash
Browse files Browse the repository at this point in the history
  • Loading branch information
sagor999 committed Jun 17, 2022
1 parent 12031ec commit 1ff6b6d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions components/ws-manager/pkg/manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func (m *Manager) StartWorkspace(ctx context.Context, req *api.StartWorkspaceReq
return nil, err
}
}
pvc, err := m.createPVCForWorkspacePod(startContext)
pvc, err = m.createPVCForWorkspacePod(startContext)
if err != nil {
return nil, xerrors.Errorf("cannot create pvc for workspace pod: %w", err)
}
Expand Down Expand Up @@ -288,7 +288,6 @@ func (m *Manager) StartWorkspace(ctx context.Context, req *api.StartWorkspaceReq

// we only calculate the time that PVC restoring from VolumeSnapshot
if createPVC && startContext.VolumeSnapshot != nil && startContext.VolumeSnapshot.VolumeSnapshotName != "" {
log.Infof("test: %v, %v", m, pvc)
err = wait.PollWithContext(ctx, 100*time.Millisecond, time.Minute, pvcRunning(m.Clientset, pvc.Name, pvc.Namespace))
if err != nil {
return false, nil
Expand Down

0 comments on commit 1ff6b6d

Please sign in to comment.