Merge "ScaleIO Driver - include snap usage in provisioned capacity" into stable/pike
This commit is contained in:
commit
7cc8d0ea63
|
@ -67,6 +67,7 @@ class TestMisc(scaleio.TestScaleIODriver):
|
|||
'spareCapacityInKb': 6000000,
|
||||
'thickCapacityInUseInKb': 266,
|
||||
'thinCapacityAllocatedInKm': 0,
|
||||
'snapCapacityInUseInKb': 266,
|
||||
},
|
||||
},
|
||||
'instances/Volume::{}/action/setVolumeName'.format(
|
||||
|
@ -200,6 +201,7 @@ class TestMisc(scaleio.TestScaleIODriver):
|
|||
'capacityLimitInKb': 16000000,
|
||||
'spareCapacityInKb': 6000000,
|
||||
'thickCapacityInUseInKb': 266,
|
||||
'snapCapacityInUseInKb': 266,
|
||||
property: 0,
|
||||
},
|
||||
},
|
||||
|
|
|
@ -318,6 +318,7 @@ class ScaleIODriver(driver.VolumeDriver):
|
|||
def _get_queryable_statistics(self, sio_type, sio_id):
|
||||
if self.statisticProperties is None:
|
||||
self.statisticProperties = [
|
||||
"snapCapacityInUseInKb",
|
||||
"capacityAvailableForVolumeAllocationInKb",
|
||||
"capacityLimitInKb", "spareCapacityInKb",
|
||||
"thickCapacityInUseInKb"]
|
||||
|
@ -971,6 +972,7 @@ class ScaleIODriver(driver.VolumeDriver):
|
|||
# Divide by two because ScaleIO creates a copy for each volume
|
||||
provisioned_capacity = (
|
||||
((res['thickCapacityInUseInKb'] +
|
||||
res['snapCapacityInUseInKb'] +
|
||||
thin_capacity_allocated) / 2) / units.Mi)
|
||||
|
||||
LOG.info("Free capacity of pool %(pool)s is: %(free)s, "
|
||||
|
|
Loading…
Reference in New Issue