From 75e39fc7b232ac54422ba6a3b5e58308e54297b1 Mon Sep 17 00:00:00 2001 From: Jim Branen Date: Thu, 5 Sep 2013 09:48:43 -0700 Subject: [PATCH] Synchronize extend_volume methods in 3PAR drivers 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 | 4 +++- cinder/volume/drivers/san/hp/hp_3par_iscsi.py | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cinder/volume/drivers/san/hp/hp_3par_fc.py b/cinder/volume/drivers/san/hp/hp_3par_fc.py index 7562d6a74..d718db18f 100644 --- a/cinder/volume/drivers/san/hp/hp_3par_fc.py +++ b/cinder/volume/drivers/san/hp/hp_3par_fc.py @@ -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) diff --git a/cinder/volume/drivers/san/hp/hp_3par_iscsi.py b/cinder/volume/drivers/san/hp/hp_3par_iscsi.py index a1d91c174..fa74d4bf1 100644 --- a/cinder/volume/drivers/san/hp/hp_3par_iscsi.py +++ b/cinder/volume/drivers/san/hp/hp_3par_iscsi.py @@ -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) -- 2.45.2