From: Navneet Singh Date: Fri, 28 Feb 2014 10:19:49 +0000 (+0530) Subject: NetApp fix eseries concurrent vol map failure X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=209c09a76f5e90aaa2899804686e6a513703d887;p=openstack-build%2Fcinder-build.git NetApp fix eseries concurrent vol map failure This fixes the issue while mapping volume to host when the requests are very close in time proximity. The map operation has been synchronized. Change-Id: I2e120d84d3b96faa4ab8d4324e70a089bcddeaa5 Closes-bug: #1312685 --- diff --git a/cinder/volume/drivers/netapp/eseries/iscsi.py b/cinder/volume/drivers/netapp/eseries/iscsi.py index 39dd80371..694f882ee 100644 --- a/cinder/volume/drivers/netapp/eseries/iscsi.py +++ b/cinder/volume/drivers/netapp/eseries/iscsi.py @@ -26,6 +26,7 @@ from cinder import exception from cinder.openstack.common import excutils from cinder.openstack.common import log as logging from cinder import units +from cinder import utils as cinder_utils from cinder.volume import driver from cinder.volume.drivers.netapp.eseries import client from cinder.volume.drivers.netapp.options import netapp_basicauth_opts @@ -512,6 +513,7 @@ class Driver(driver.ISCSIDriver): raise exception.NetAppDriverException( msg % self._client.get_system_id()) + @cinder_utils.synchronized('map_es_volume') def _map_volume_to_host(self, vol, initiator): """Maps the e-series volume to host with initiator.""" host = self._get_or_create_host(initiator)