Skip to content

Commit

Permalink
cephfs: return correct error msg
Browse files Browse the repository at this point in the history
return SnapshotOperationAlreadyExistsFmt instead of
VolumeOperationAlreadyExistsFmt incase of delete snapshot
operation.

Signed-off-by: yati1998 <ypadia@redhat.com>
  • Loading branch information
yati padia authored and mergify[bot] committed Sep 23, 2024
1 parent 1edceeb commit 29aecd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/cephfs/controllerserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 29aecd3

Please sign in to comment.