]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Add locking to PureISCSIDriver around creating Purity Host objects.
authorPatrick East <patrick.east@purestorage.com>
Wed, 15 Apr 2015 01:42:19 +0000 (18:42 -0700)
committerPatrick East <patrick.east@purestorage.com>
Wed, 15 Apr 2015 02:24:14 +0000 (19:24 -0700)
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

cinder/volume/drivers/pure.py

index b0a435b9ec8167506b7faee56f1c91134fcffd32..c35b7df1e1f5fb9dd42e01762265d44406ae2eb5 100644 (file)
@@ -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