mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 10:53:34 +00:00
cleanup: move internal/rbd/errors.go to internal/rbd/errors pacakge
Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
@ -21,6 +21,7 @@ import (
|
||||
"errors"
|
||||
|
||||
"github.com/ceph/ceph-csi/internal/rbd"
|
||||
rbderrors "github.com/ceph/ceph-csi/internal/rbd/errors"
|
||||
"github.com/ceph/ceph-csi/internal/util"
|
||||
"github.com/ceph/ceph-csi/internal/util/log"
|
||||
|
||||
@ -68,7 +69,7 @@ func (ekrs *EncryptionKeyRotationServer) EncryptionKeyRotate(
|
||||
rbdVol, err := mgr.GetVolumeByID(ctx, volID)
|
||||
if err != nil {
|
||||
switch {
|
||||
case errors.Is(err, util.ErrImageNotFound):
|
||||
case errors.Is(err, rbderrors.ErrImageNotFound):
|
||||
err = status.Errorf(codes.NotFound, "volume ID %s not found", volID)
|
||||
case errors.Is(err, util.ErrPoolNotFound):
|
||||
log.ErrorLog(ctx, "failed to get backend volume for %s: %v", volID, err)
|
||||
|
Reference in New Issue
Block a user