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