This appears to do the wrong thing in the case where
both lvm_mirrors and thin prov are being used, since
the "elif...thin" block won't be hit.
Ensure thin provisioning is always reported correctly.
Change-Id: I3c89af4d86e96ded8208f140928a8f2f8e54937a
total_capacity = 0
free_capacity = 0
- thin_enabled = False
if self.configuration.lvm_mirrors > 0:
total_capacity =\
total_capacity = self.vg.vg_thin_pool_size
free_capacity = self.vg.vg_thin_pool_free_space
provisioned_capacity = self.vg.vg_provisioned_capacity
- thin_enabled = True
else:
total_capacity = self.vg.vg_size
free_capacity = self.vg.vg_free_space
'lvm_type': self.configuration.lvm_type,
'lvm_mirrors': self.configuration.lvm_mirrors})
+ thin_enabled = self.configuration.lvm_type == 'thin'
+
# Skip enabled_pools setting, treat the whole backend as one pool
# XXX FIXME if multipool support is added to LVM driver.
single_pool = {}