]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Elevate volume/snap "is busy" log message for volume/snap_delete
authorEric Harney <eharney@redhat.com>
Wed, 12 Jun 2013 21:20:52 +0000 (17:20 -0400)
committerEric Harney <eharney@redhat.com>
Wed, 12 Jun 2013 22:16:31 +0000 (18:16 -0400)
If deletion fails because the volume is busy, log at "error" level
rather than "debug" to ensure that the error is logged and visible
to a user.

Change-Id: I04031ee6b1f6647a126baa8a29c15a00b84b27b1

cinder/volume/manager.py

index 97bcd958e25c99b72313d6a1097399b264987670..e986b7cd0ee671690b8abe263cfca79deb52efb1 100644 (file)
@@ -424,7 +424,8 @@ class VolumeManager(manager.SchedulerDependentManager):
             LOG.debug(_("volume %s: deleting"), volume_ref['name'])
             self.driver.delete_volume(volume_ref)
         except exception.VolumeIsBusy:
-            LOG.debug(_("volume %s: volume is busy"), volume_ref['name'])
+            LOG.error(_("Cannot delete volume %s: volume is busy"),
+                      volume_ref['name'])
             self.driver.ensure_export(context, volume_ref)
             self.db.volume_update(context, volume_ref['id'],
                                   {'status': 'available'})
@@ -507,7 +508,8 @@ class VolumeManager(manager.SchedulerDependentManager):
             LOG.debug(_("snapshot %s: deleting"), snapshot_ref['name'])
             self.driver.delete_snapshot(snapshot_ref)
         except exception.SnapshotIsBusy:
-            LOG.debug(_("snapshot %s: snapshot is busy"), snapshot_ref['name'])
+            LOG.error(_("Cannot delete snapshot %s: snapshot is busy"),
+                      snapshot_ref['name'])
             self.db.snapshot_update(context,
                                     snapshot_ref['id'],
                                     {'status': 'available'})