From dbd8462bcc28b712d649905d1096486a8fb2ea13 Mon Sep 17 00:00:00 2001 From: yati1998 Date: Tue, 24 Sep 2024 17:25:13 +0530 Subject: [PATCH] cephfs: correct error code for volumegroupsnapshot this commit corrects the error code used by groupvolumelocks to acquire snapshots Signed-off-by: yati1998 --- internal/cephfs/groupcontrollerserver.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/cephfs/groupcontrollerserver.go b/internal/cephfs/groupcontrollerserver.go index 2a38645f68d..e808a055b3f 100644 --- a/internal/cephfs/groupcontrollerserver.go +++ b/internal/cephfs/groupcontrollerserver.go @@ -88,9 +88,9 @@ func (cs *ControllerServer) CreateVolumeGroupSnapshot( requestName := req.GetName() // Existence and conflict checks if acquired := cs.VolumeGroupLocks.TryAcquire(requestName); !acquired { - log.ErrorLog(ctx, util.VolumeOperationAlreadyExistsFmt, requestName) + log.ErrorLog(ctx, util.SnapshotOperationAlreadyExistsFmt, requestName) - return nil, status.Errorf(codes.Aborted, util.VolumeOperationAlreadyExistsFmt, requestName) + return nil, status.Errorf(codes.Aborted, util.SnapshotOperationAlreadyExistsFmt, requestName) } defer cs.VolumeGroupLocks.Release(requestName) @@ -708,9 +708,9 @@ func (cs *ControllerServer) DeleteVolumeGroupSnapshot(ctx context.Context, groupSnapshotID := req.GetGroupSnapshotId() // Existence and conflict checks if acquired := cs.VolumeGroupLocks.TryAcquire(groupSnapshotID); !acquired { - log.ErrorLog(ctx, util.VolumeOperationAlreadyExistsFmt, groupSnapshotID) + log.ErrorLog(ctx, util.SnapshotOperationAlreadyExistsFmt, groupSnapshotID) - return nil, status.Errorf(codes.Aborted, util.VolumeOperationAlreadyExistsFmt, groupSnapshotID) + return nil, status.Errorf(codes.Aborted, util.SnapshotOperationAlreadyExistsFmt, groupSnapshotID) } defer cs.VolumeGroupLocks.Release(groupSnapshotID)