From 5a452389d94d0a0b1ea4ba1b486e9f30740d698b Mon Sep 17 00:00:00 2001 From: Mike Perez Date: Mon, 2 Dec 2013 13:42:52 -0800 Subject: [PATCH] Adjust RBD delete log level Set notice of volume no longer existing in RBD backend when attempting to delete to log INFO level. Also move a comment next to related code. This is a follow-up to suggestions from 3de7da12d1098ef777305099e5f4a039e536bf99. Change-Id: I3ff854e0ead79e208106a371e14ec6ac7603d387 --- cinder/volume/drivers/rbd.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cinder/volume/drivers/rbd.py b/cinder/volume/drivers/rbd.py index a6445d63a..23cad1686 100644 --- a/cinder/volume/drivers/rbd.py +++ b/cinder/volume/drivers/rbd.py @@ -587,13 +587,11 @@ class RBDDriver(driver.VolumeDriver): """Deletes a logical volume.""" volume_name = str(volume['name']) with RADOSClient(self) as client: - # If the volume has non-clone snapshots this delete is expected to - # raise VolumeIsBusy so do so straight away. try: rbd_image = self.rbd.Image(client.ioctx, volume_name) except self.rbd.ImageNotFound: - LOG.debug(_("volume %s no longer exists in backend") - % (volume_name)) + LOG.info(_("volume %s no longer exists in backend") + % (volume_name)) return clone_snap = None @@ -602,13 +600,15 @@ class RBDDriver(driver.VolumeDriver): # Ensure any backup snapshots are deleted self._delete_backup_snaps(client, volume_name) + # If the volume has non-clone snapshots this delete is expected to + # raise VolumeIsBusy so do so straight away. try: snaps = rbd_image.list_snaps() for snap in snaps: if snap['name'].endswith('.clone_snap'): LOG.debug(_("volume has clone snapshot(s)")) # We grab one of these and use it when fetching parent - # info in case the this volume has been flattened. + # info in case the volume has been flattened. clone_snap = snap['name'] break -- 2.45.2