]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Better error handling around volume delete.
authorMichael Basnight <mbasnight@gmail.com>
Wed, 20 Feb 2013 16:12:03 +0000 (10:12 -0600)
committerMichael Basnight <mbasnight@gmail.com>
Wed, 20 Feb 2013 19:06:44 +0000 (13:06 -0600)
fixes bug 1130844

Change-Id: I6886bff24194c2ace3d7719b93b5ab79aa8a0e8d

cinder/volume/drivers/san/hp_lefthand.py

index 1ae1b030f83a0165b87c8cfb9b7001ea5612a344..c4bd6716d7649c2c5891c641eafd3465f0ef1a0f 100644 (file)
@@ -222,9 +222,10 @@ class HpSanISCSIDriver(SanISCSIDriver):
         cliq_args['prompt'] = 'false'  # Don't confirm
         try:
             volume_info = self._cliq_get_volume_info(volume['name'])
-            self._cliq_run_xml("deleteVolume", cliq_args)
-        except Exception:
-            LOG.exception("Volume did not exist. It will not be deleted")
+        except exception.ProcessExecutionError:
+            LOG.error("Volume did not exist. It will not be deleted")
+            return
+        self._cliq_run_xml("deleteVolume", cliq_args)
 
     def local_path(self, volume):
         msg = _("local_path not supported")