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
(cherry picked from commit 209c09a76f)
This commit is contained in:
Navneet Singh 2014-02-28 15:49:49 +05:30 committed by Tom Barron
parent 390259bb40
commit 0b8455aa99
1 changed files with 2 additions and 0 deletions

View File

@ -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)