Skip to content

Commit e3d9622

Browse files
committed
[pvc] potential workaround for mount volume failure
1 parent b40cc92 commit e3d9622

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,12 @@ func podRunning(clientset client.Client, podName, namespace string) wait.Conditi
671671
return true, nil
672672
}
673673
}
674+
// if we failed to mount volume, we need to re-create the pod
675+
// ref: https://github.com/gitpod-io/gitpod/issues/13353
676+
// ref: https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/issues/608
677+
if strings.Contains(pod.Status.Reason, "MountVolume.MountDevice failed for volume") {
678+
return false, xerrors.Errorf("failed mounting volume, reason: %s", pod.Status.Reason)
679+
}
674680

675681
// if pod is pending, wait for it to get scheduled
676682
return false, nil

0 commit comments

Comments
 (0)