From 5ba9734a2166ebfa092c5ea2c8a53502a34abb11 Mon Sep 17 00:00:00 2001 From: yati padia Date: Mon, 23 Sep 2024 16:59:37 +0530 Subject: [PATCH] cephfs: return correct error msg return SnapshotOperationAlreadyExistsFmt instead of VolumeOperationAlreadyExistsFmt incase of delete snapshot operation. Signed-off-by: yati1998 --- internal/cephfs/controllerserver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cephfs/controllerserver.go b/internal/cephfs/controllerserver.go index 7673c278532..f41537b5713 100644 --- a/internal/cephfs/controllerserver.go +++ b/internal/cephfs/controllerserver.go @@ -1067,7 +1067,7 @@ func (cs *ControllerServer) DeleteSnapshot( if acquired := cs.SnapshotLocks.TryAcquire(sid.RequestName); !acquired { log.ErrorLog(ctx, util.SnapshotOperationAlreadyExistsFmt, sid.RequestName) - return nil, status.Errorf(codes.Aborted, util.VolumeOperationAlreadyExistsFmt, sid.RequestName) + return nil, status.Errorf(codes.Aborted, util.SnapshotOperationAlreadyExistsFmt, sid.RequestName) } defer cs.SnapshotLocks.Release(sid.RequestName)