mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +00:00
cleanup: move ErrImageNotFound from rbd/errors to util/errors
Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
@ -82,7 +82,7 @@ func cleanUpSnapshot(
|
||||
) error {
|
||||
err := parentVol.deleteSnapshot(ctx, rbdSnap)
|
||||
if err != nil {
|
||||
if !errors.Is(err, ErrImageNotFound) && !errors.Is(err, ErrSnapNotFound) {
|
||||
if !errors.Is(err, util.ErrImageNotFound) && !errors.Is(err, ErrSnapNotFound) {
|
||||
log.ErrorLog(ctx, "failed to delete snapshot %q: %v", rbdSnap, err)
|
||||
|
||||
return err
|
||||
@ -92,7 +92,7 @@ func cleanUpSnapshot(
|
||||
if rbdVol != nil {
|
||||
err := rbdVol.Delete(ctx)
|
||||
if err != nil {
|
||||
if !errors.Is(err, ErrImageNotFound) {
|
||||
if !errors.Is(err, util.ErrImageNotFound) {
|
||||
log.ErrorLog(ctx, "failed to delete rbd image %q with error: %v", rbdVol, err)
|
||||
|
||||
return err
|
||||
|
Reference in New Issue
Block a user