mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
rbd: add extra logging while cleaning up snapshots
Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
parent
ba05c0f5f1
commit
3df396e6f1
@ -1450,12 +1450,16 @@ func (cs *ControllerServer) DeleteSnapshot(
|
|||||||
// or partially complete (snap and snapOMap are garbage collected already), hence return
|
// or partially complete (snap and snapOMap are garbage collected already), hence return
|
||||||
// success as deletion is complete
|
// success as deletion is complete
|
||||||
if errors.Is(err, util.ErrKeyNotFound) {
|
if errors.Is(err, util.ErrKeyNotFound) {
|
||||||
|
log.UsefulLog(ctx, "snapshot %s was been deleted already: %v", snapshotID, err)
|
||||||
|
|
||||||
return &csi.DeleteSnapshotResponse{}, nil
|
return &csi.DeleteSnapshotResponse{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// if the error is ErrImageNotFound, We need to cleanup the image from
|
// if the error is ErrImageNotFound, We need to cleanup the image from
|
||||||
// trash and remove the metadata in OMAP.
|
// trash and remove the metadata in OMAP.
|
||||||
if errors.Is(err, ErrImageNotFound) {
|
if errors.Is(err, ErrImageNotFound) {
|
||||||
|
log.UsefulLog(ctx, "cleaning up leftovers of snapshot %s: %v", snapshotID, err)
|
||||||
|
|
||||||
err = cleanUpImageAndSnapReservation(ctx, rbdSnap, cr)
|
err = cleanUpImageAndSnapReservation(ctx, rbdSnap, cr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, status.Error(codes.Internal, err.Error())
|
return nil, status.Error(codes.Internal, err.Error())
|
||||||
|
Loading…
Reference in New Issue
Block a user