From 92b2e08adf30302fe052f6afe4f0c1b44d7abf37 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Mon, 15 Mar 2021 15:25:01 +0100 Subject: [PATCH] rbd: improve logging in deleteImage() Signed-off-by: Niels de Vos --- internal/rbd/rbd_util.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/rbd/rbd_util.go b/internal/rbd/rbd_util.go index eef2bba1f..2660a3ec9 100644 --- a/internal/rbd/rbd_util.go +++ b/internal/rbd/rbd_util.go @@ -467,15 +467,17 @@ func addRbdManagerTask(ctx context.Context, pOpts *rbdVolume, arg []string) (boo // deleteImage deletes a ceph image with provision and volume options. func deleteImage(ctx context.Context, pOpts *rbdVolume, cr *util.Credentials) error { image := pOpts.RbdImageName + + util.DebugLog(ctx, "rbd: delete %s using mon %s, pool %s", image, pOpts.Monitors, pOpts.Pool) + // Support deleting the older rbd images whose imageID is not stored in omap err := pOpts.getImageID() if err != nil { return err } - util.DebugLog(ctx, "rbd: delete %s using mon %s, pool %s", image, pOpts.Monitors, pOpts.Pool) - if pOpts.isEncrypted() { + util.DebugLog(ctx, "rbd: going to remove DEK for %q", pOpts.String()) if err = pOpts.encryption.RemoveDEK(pOpts.VolID); err != nil { util.WarningLog(ctx, "failed to clean the passphrase for volume %s: %s", pOpts.VolID, err) }