From 209c09a76f5e90aaa2899804686e6a513703d887 Mon Sep 17 00:00:00 2001 From: Navneet Singh Date: Fri, 28 Feb 2014 15:49:49 +0530 Subject: [PATCH] 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 --- cinder/volume/drivers/netapp/eseries/iscsi.py | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.45.2