From 0b0835e4fc371be80b0b7ab61bd25bddd46e0178 Mon Sep 17 00:00:00 2001 From: Victor Rodionov Date: Fri, 2 Aug 2013 00:17:32 +0400 Subject: [PATCH] Ignore "volume does not exist error" Patch to ignore "volume does not exist error" when driver is deleting volume. Change-Id: I31645182e5495c44e67fe1add0a2e6c8222534b0 --- cinder/volume/drivers/nexenta/volume.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cinder/volume/drivers/nexenta/volume.py b/cinder/volume/drivers/nexenta/volume.py index d18136186..ef5069777 100644 --- a/cinder/volume/drivers/nexenta/volume.py +++ b/cinder/volume/drivers/nexenta/volume.py @@ -132,10 +132,13 @@ class NexentaDriver(driver.ISCSIDriver): # pylint: disable=R0921 try: self.nms.zvol.destroy(self._get_zvol_name(volume['name']), '') except nexenta.NexentaException as exc: + if "does not exist" in exc.args[1]: + LOG.info(_('Volume %s does not exist, it seems it was already ' + 'deleted'), volume['name']) + return if "zvol has children" in exc.args[1]: raise exception.VolumeIsBusy(volume_name=volume['name']) - else: - raise + raise def create_snapshot(self, snapshot): """Create snapshot of existing zvol on appliance. -- 2.45.2