From: Victor Rodionov Date: Thu, 1 Aug 2013 20:17:32 +0000 (+0400) Subject: Ignore "volume does not exist error" X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=0b0835e4fc371be80b0b7ab61bd25bddd46e0178;p=openstack-build%2Fcinder-build.git Ignore "volume does not exist error" Patch to ignore "volume does not exist error" when driver is deleting volume. Change-Id: I31645182e5495c44e67fe1add0a2e6c8222534b0 --- 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.