summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick East <patrick.east@purestorage.com>2015-04-14 18:42:19 -0700
committerDoug Hellmann <doug@doughellmann.com>2015-04-15 19:49:29 +0000
commit3c3e1d8db5ff64156ab345c375549021db55b8a2 (patch)
treef6d82b656300ef82b12e19197808d4cc7d33d273
parent672a1d4362268cd614adb2b424c982d6555d1629 (diff)
downloadcinder-3c3e1d8db5ff64156ab345c375549021db55b8a2.tar.gz
Add locking to PureISCSIDriver around creating Purity Host objects.
This will prevent us from getting conflicting credentials for connection methods which will result in iSCSI attach operations to fail. Change-Id: Ia206e7b5ff330c8fccb49ed23a31b120a5c04eb3 Closes-Bug: 1444224 (cherry picked from commit a712afe42833443878898bb42851376cd8615ff9)
-rw-r--r--cinder/volume/drivers/pure.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/cinder/volume/drivers/pure.py b/cinder/volume/drivers/pure.py
index b0a435b9e..c35b7df1e 100644
--- a/cinder/volume/drivers/pure.py
+++ b/cinder/volume/drivers/pure.py
@@ -329,6 +329,7 @@ class PureISCSIDriver(san.SanISCSIDriver):
}
return username, password, initiator_updates
+ @utils.synchronized('PureISCSIDriver._connect', external=True)
def _connect(self, volume, connector, initiator_data):
"""Connect the host and volume; return dict describing connection."""
connection = None