diff --git a/api/server/sdk/volume_ops.go b/api/server/sdk/volume_ops.go index c941f7d97..2f9e0f195 100644 --- a/api/server/sdk/volume_ops.go +++ b/api/server/sdk/volume_ops.go @@ -63,6 +63,11 @@ func (s *VolumeServer) waitForVolumeReady(ctx context.Context, id string) (*api. return false, nil } + // The volume has entered a state of that might not recover from hence the status might be down and will be in pending state forever. + if v.GetStatus() == api.VolumeStatus_VOLUME_STATUS_DOWN && v.GetState() != api.VolumeState_VOLUME_STATE_PENDING { + return false, status.Errorf(codes.Internal, "Volume id %s got created but due to Internal issues is in Down State. The Volume creation needs to be retried.", v.GetId()) + } + // Continue waiting return true, nil })