mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +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.
|
// deleteImage deletes a ceph image with provision and volume options.
|
||||||
func deleteImage(ctx context.Context, pOpts *rbdVolume, cr *util.Credentials) error {
|
func deleteImage(ctx context.Context, pOpts *rbdVolume, cr *util.Credentials) error {
|
||||||
image := pOpts.RbdImageName
|
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
|
// Support deleting the older rbd images whose imageID is not stored in omap
|
||||||
err := pOpts.getImageID()
|
err := pOpts.getImageID()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
util.DebugLog(ctx, "rbd: delete %s using mon %s, pool %s", image, pOpts.Monitors, pOpts.Pool)
|
|
||||||
|
|
||||||
if pOpts.isEncrypted() {
|
if pOpts.isEncrypted() {
|
||||||
|
util.DebugLog(ctx, "rbd: going to remove DEK for %q", pOpts.String())
|
||||||
if err = pOpts.encryption.RemoveDEK(pOpts.VolID); err != nil {
|
if err = pOpts.encryption.RemoveDEK(pOpts.VolID); err != nil {
|
||||||
util.WarningLog(ctx, "failed to clean the passphrase for volume %s: %s", pOpts.VolID, err)
|
util.WarningLog(ctx, "failed to clean the passphrase for volume %s: %s", pOpts.VolID, err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user