mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-10 00:10:20 +00:00
rbd: improve logging in deleteImage()
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
99da92cfd7
commit
92b2e08adf
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user