From: Flavio Percoco Date: Thu, 5 Dec 2013 15:14:39 +0000 (+0100) Subject: Convert lvm_mirrors to int X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=1dff30492f0ce1df3ef01ccc21353248a7207709;p=openstack-build%2Fcinder-build.git Convert lvm_mirrors to int When the location_info is parsed and `lvm_mirrors` extracted, it is not being converted to int. This causes some boolean checks to return True even when there are not mirrors enabled because of the u'0'. Closes-bug: #1258133 Change-Id: I67c463d9f139fe326bbcab4d193c45459129b514 --- diff --git a/cinder/volume/drivers/lvm.py b/cinder/volume/drivers/lvm.py index 187d05215..40aa62e86 100644 --- a/cinder/volume/drivers/lvm.py +++ b/cinder/volume/drivers/lvm.py @@ -692,6 +692,7 @@ class LVMISCSIDriver(LVMVolumeDriver, driver.ISCSIDriver): try: (dest_type, dest_hostname, dest_vg, lvm_type, lvm_mirrors) =\ info.split(':') + lvm_mirrors = int(lvm_mirrors) except ValueError: return false_ret if (dest_type != 'LVMVolumeDriver' or dest_hostname != self.hostname):