From: Michael Basnight Date: Wed, 20 Feb 2013 16:12:03 +0000 (-0600) Subject: Better error handling around volume delete. X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=716b67f4790774858ccc9d4b696ac12f7e793b0b;p=openstack-build%2Fcinder-build.git Better error handling around volume delete. fixes bug 1130844 Change-Id: I6886bff24194c2ace3d7719b93b5ab79aa8a0e8d --- diff --git a/cinder/volume/drivers/san/hp_lefthand.py b/cinder/volume/drivers/san/hp_lefthand.py index 1ae1b030f..c4bd6716d 100644 --- a/cinder/volume/drivers/san/hp_lefthand.py +++ b/cinder/volume/drivers/san/hp_lefthand.py @@ -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")