From: Patrick East Date: Wed, 15 Apr 2015 01:42:19 +0000 (-0700) Subject: Add locking to PureISCSIDriver around creating Purity Host objects. X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=3c3e1d8db5ff64156ab345c375549021db55b8a2;p=openstack-build%2Fcinder-build.git 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) --- 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