From: Kurt Martin Date: Mon, 8 Jun 2015 17:26:20 +0000 (-0700) Subject: Fixes 3PAR snapshot failure with optional params X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=891722fe371b3c518b9dd04c21672202088d49a8;p=openstack-build%2Fcinder-build.git Fixes 3PAR snapshot failure with optional params Create snapshot fails when HP3PAR hp3par_snapshot_retention and/or hp3par_snapshot_expiration parameters were set in cinder.conf. The params were being sent to the backend as strings instead on integers. Change-Id: I24d0bc133c48b47a27f5c112e9cd924dd0fa3bcc Closes-bug: #1461640 --- diff --git a/cinder/volume/drivers/san/hp/hp_3par_common.py b/cinder/volume/drivers/san/hp/hp_3par_common.py index 98fc649f7..ff52768d5 100644 --- a/cinder/volume/drivers/san/hp/hp_3par_common.py +++ b/cinder/volume/drivers/san/hp/hp_3par_common.py @@ -174,10 +174,11 @@ class HP3PARCommon(object): 2.0.39 - Added support for updated detach_volume attachment. 2.0.40 - Make the 3PAR drivers honor the pool in create bug #1432876 2.0.41 - Only log versions at startup. bug #1447697 + 2.0.42 - Fix type for snapshot config settings. bug #1461640 """ - VERSION = "2.0.41" + VERSION = "2.0.42" stats = {} @@ -1495,11 +1496,11 @@ class HP3PARCommon(object): 'readOnly': True} if self.config.hp3par_snapshot_expiration: optional['expirationHours'] = ( - self.config.hp3par_snapshot_expiration) + int(self.config.hp3par_snapshot_expiration)) if self.config.hp3par_snapshot_retention: optional['retentionHours'] = ( - self.config.hp3par_snapshot_retention) + int(self.config.hp3par_snapshot_retention)) self.client.createSnapshot(snap_name, vol_name, optional) except hpexceptions.HTTPForbidden as ex: