]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Synchronize extend_volume methods in 3PAR drivers
authorJim Branen <james.branen@hp.com>
Thu, 5 Sep 2013 16:48:43 +0000 (09:48 -0700)
committerJim Branen <james.branen@hp.com>
Thu, 5 Sep 2013 16:48:43 +0000 (09:48 -0700)
The extend_volume methods in the HP3PAR FC and
iSCSI drivers should have been synchronized with
the synchronize annotation, but were not.

Change-Id: Ic7f18b7314e10dfb499b16f43b72367fe3ed1176
Closes-Bug: #1220947

cinder/volume/drivers/san/hp/hp_3par_fc.py
cinder/volume/drivers/san/hp/hp_3par_iscsi.py

index 7562d6a740e4718f52fe260a822aeada35669bcc..d718db18f7d1904f70ed1bf495b66d5186a8903e 100644 (file)
@@ -54,9 +54,10 @@ class HP3PARFCDriver(cinder.volume.driver.FibreChannelDriver):
                 copy volume <--> Image.
         1.2.0 - Updated the use of the hp3parclient to 2.0.0 and refactored
                 the drivers to use the new APIs.
+        1.2.1 - Synchronized extend_volume method.
     """
 
-    VERSION = "1.2.0"
+    VERSION = "1.2.1"
 
     def __init__(self, *args, **kwargs):
         super(HP3PARFCDriver, self).__init__(*args, **kwargs)
@@ -267,5 +268,6 @@ class HP3PARFCDriver(cinder.volume.driver.FibreChannelDriver):
     def remove_export(self, context, volume):
         pass
 
+    @utils.synchronized('3par', external=True)
     def extend_volume(self, volume, new_size):
         self.common.extend_volume(volume, new_size)
index a1d91c174e1aab3497bbae337e5f58148b6a294c..fa74d4bf11d82b8822b156388618c9b6a6a93a11 100644 (file)
@@ -55,10 +55,10 @@ class HP3PARISCSIDriver(cinder.volume.driver.ISCSIDriver):
                 session changes, faster clone, requires 3.1.2 MU2 firmware.
         1.2.0 - Updated the use of the hp3parclient to 2.0.0 and refactored
                 the drivers to use the new APIs.
-
+        1.2.1 - Synchronized extend_volume method.
     """
 
-    VERSION = "1.2.0"
+    VERSION = "1.2.1"
 
     def __init__(self, *args, **kwargs):
         super(HP3PARISCSIDriver, self).__init__(*args, **kwargs)
@@ -393,5 +393,6 @@ class HP3PARISCSIDriver(cinder.volume.driver.ISCSIDriver):
 
         return current_least_used_nsp
 
+    @utils.synchronized('3par', external=True)
     def extend_volume(self, volume, new_size):
         self.common.extend_volume(volume, new_size)