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
(cherry picked from commit 1dff30492f
)
Change-Id: I67c463d9f139fe326bbcab4d193c45459129b514
This commit is contained in:
parent
f39441662d
commit
a61b9678f1
|
@ -697,6 +697,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):
|
||||
|
|
Loading…
Reference in New Issue