From f6665294a101df5ba91e84e8723eba08dd14d12b Mon Sep 17 00:00:00 2001 From: karthik-us Date: Wed, 22 Nov 2023 11:46:50 +0530 Subject: [PATCH 1/2] cephfs: handle cephfs clone limit error This is to pre-emptively add check for EAGAIN error returned from ceph as part of https://github.com/ceph/ceph/pull/52670 if all the clone threads are busy and return csi compatible error. Fixes: #3996 Signed-off-by: karthik-us --- internal/cephfs/controllerserver.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/internal/cephfs/controllerserver.go b/internal/cephfs/controllerserver.go index bd91954ca..9a750f2a4 100644 --- a/internal/cephfs/controllerserver.go +++ b/internal/cephfs/controllerserver.go @@ -20,6 +20,7 @@ import ( "context" "errors" "fmt" + "syscall" "github.com/ceph/ceph-csi/internal/cephfs/core" cerrors "github.com/ceph/ceph-csi/internal/cephfs/errors" @@ -134,6 +135,11 @@ func (cs *ControllerServer) createBackingVolumeFromSnapshotSource( }) if err != nil { 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 } @@ -156,6 +162,11 @@ func (cs *ControllerServer) createBackingVolumeFromVolumeSource( 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) + // 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 } From 65faca0483ab1425df2d77b2c17a9ee18d5b1bdb Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Fri, 24 Nov 2023 17:09:16 +0100 Subject: [PATCH 2/2] ci: update minikube to v1.32.0 No major changes that affect Ceph-CSI testing, see the linked release notes for details. See-also: https://github.com/kubernetes/minikube/releases/tag/v1.32.0 Signed-off-by: Niels de Vos --- build.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.env b/build.env index 627e0dda0..be3d80a14 100644 --- a/build.env +++ b/build.env @@ -44,7 +44,7 @@ HELM_SCRIPT=https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 HELM_VERSION=v3.10.1 # minikube settings -MINIKUBE_VERSION=v1.31.2 +MINIKUBE_VERSION=v1.32.0 VM_DRIVER=none CHANGE_MINIKUBE_NONE_USER=true