Skip to content

Commit 767aaad

Browse files
committed
[SAP] Replace CapacityFilter
This patch reworks the CapacityFilter which uses the new utils.calculate_capacity_factors to determine if the virtual free space available. The main issue is that the vmware driver does lazy creates. This causes an issue of over reporting of free space by the backend, because the space hasn't been consumed yet. So the amount of free space is not accurate with respect to how much has been allocated by cinder. This updated calculate capacity factors as well as the SAPCapacityFilter accounts for the virtual free space by using the cinder allocated capacity tracking. If the free space is reported less than what cinder thinks should be available, then the reported free space is used. This relies on an acurate reporting of the allocated capacity by the driver. We know there is an issue with allocated capacity not being reported correctly for migrated volumes, as well as accounting for existing volumes at startup. The startup issue should be solved with this PR: #117 Will have to do a folllow up to account for updating the allocated capacity for migrated volumes.
1 parent fa53970 commit 767aaad

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cinder/scheduler/filters/capacity_filter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,9 @@ def backend_passes(self, backend_state, filter_properties):
181181
if not res:
182182
LOG.warning("Insufficient free virtual space "
183183
"(%(available)sGB) to accommodate thin "
184-
"provisioned %(requested)sGB volume on "
185-
"%(grouping)s %(grouping_name)s."
186-
" %(provisioning_type)s).",
184+
"provisioned %(requested)sGB volume on"
185+
" %(grouping)s %(grouping_name)s"
186+
" %(provisioning_type)s.",
187187
msg_args)
188188
else:
189189
LOG.debug("Space information for volume creation "

0 commit comments

Comments
 (0)