mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
cephfs: correct error code for volumegroupsnapshot
this commit corrects the error code used by groupvolumelocks to acquire snapshots Signed-off-by: yati1998 <ypadia@redhat.com>
This commit is contained in:
parent
29aecd345f
commit
dbd8462bcc
@ -88,9 +88,9 @@ func (cs *ControllerServer) CreateVolumeGroupSnapshot(
|
|||||||
requestName := req.GetName()
|
requestName := req.GetName()
|
||||||
// Existence and conflict checks
|
// Existence and conflict checks
|
||||||
if acquired := cs.VolumeGroupLocks.TryAcquire(requestName); !acquired {
|
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)
|
defer cs.VolumeGroupLocks.Release(requestName)
|
||||||
|
|
||||||
@ -708,9 +708,9 @@ func (cs *ControllerServer) DeleteVolumeGroupSnapshot(ctx context.Context,
|
|||||||
groupSnapshotID := req.GetGroupSnapshotId()
|
groupSnapshotID := req.GetGroupSnapshotId()
|
||||||
// Existence and conflict checks
|
// Existence and conflict checks
|
||||||
if acquired := cs.VolumeGroupLocks.TryAcquire(groupSnapshotID); !acquired {
|
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)
|
defer cs.VolumeGroupLocks.Release(groupSnapshotID)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user