From 716b67f4790774858ccc9d4b696ac12f7e793b0b Mon Sep 17 00:00:00 2001 From: Michael Basnight Date: Wed, 20 Feb 2013 10:12:03 -0600 Subject: [PATCH] Better error handling around volume delete. fixes bug 1130844 Change-Id: I6886bff24194c2ace3d7719b93b5ab79aa8a0e8d --- cinder/volume/drivers/san/hp_lefthand.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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") -- 2.45.2