mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-01-18 18:59:30 +00:00
Merge pull request #225 from red-hat-storage/sync_us--devel
Syncing latest changes from upstream devel for ceph-csi
This commit is contained in:
commit
788e450160
@ -44,7 +44,7 @@ HELM_SCRIPT=https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
|
|||||||
HELM_VERSION=v3.10.1
|
HELM_VERSION=v3.10.1
|
||||||
|
|
||||||
# minikube settings
|
# minikube settings
|
||||||
MINIKUBE_VERSION=v1.31.2
|
MINIKUBE_VERSION=v1.32.0
|
||||||
VM_DRIVER=none
|
VM_DRIVER=none
|
||||||
CHANGE_MINIKUBE_NONE_USER=true
|
CHANGE_MINIKUBE_NONE_USER=true
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"syscall"
|
||||||
|
|
||||||
"github.com/ceph/ceph-csi/internal/cephfs/core"
|
"github.com/ceph/ceph-csi/internal/cephfs/core"
|
||||||
cerrors "github.com/ceph/ceph-csi/internal/cephfs/errors"
|
cerrors "github.com/ceph/ceph-csi/internal/cephfs/errors"
|
||||||
@ -134,6 +135,11 @@ func (cs *ControllerServer) createBackingVolumeFromSnapshotSource(
|
|||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.ErrorLog(ctx, "failed to create clone from snapshot %s: %v", sID.FsSnapshotName, err)
|
log.ErrorLog(ctx, "failed to create clone from snapshot %s: %v", sID.FsSnapshotName, err)
|
||||||
|
// TODO: Add error handle for EAGAIN in go-ceph and replace the
|
||||||
|
// syscall.EAGAIN check with the go-ceph compatible error.
|
||||||
|
if errors.Is(err, syscall.EAGAIN) {
|
||||||
|
return status.Error(codes.ResourceExhausted, err.Error())
|
||||||
|
}
|
||||||
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -156,6 +162,11 @@ func (cs *ControllerServer) createBackingVolumeFromVolumeSource(
|
|||||||
|
|
||||||
if err := volClient.CreateCloneFromSubvolume(ctx, &parentVolOpt.SubVolume); err != nil {
|
if err := volClient.CreateCloneFromSubvolume(ctx, &parentVolOpt.SubVolume); err != nil {
|
||||||
log.ErrorLog(ctx, "failed to create clone from subvolume %s: %v", fsutil.VolumeID(pvID.FsSubvolName), err)
|
log.ErrorLog(ctx, "failed to create clone from subvolume %s: %v", fsutil.VolumeID(pvID.FsSubvolName), err)
|
||||||
|
// TODO: Add error handle for EAGAIN in go-ceph and replace the
|
||||||
|
// syscall.EAGAIN check with the go-ceph compatible error.
|
||||||
|
if errors.Is(err, syscall.EAGAIN) {
|
||||||
|
return status.Error(codes.ResourceExhausted, err.Error())
|
||||||
|
}
|
||||||
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user