Skip to content

Commit

Permalink
[SAP] Replace CapacityFilter
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hemna committed Sep 13, 2023
1 parent fa53970 commit 767aaad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cinder/scheduler/filters/capacity_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@ def backend_passes(self, backend_state, filter_properties):
if not res:
LOG.warning("Insufficient free virtual space "
"(%(available)sGB) to accommodate thin "
"provisioned %(requested)sGB volume on "
"%(grouping)s %(grouping_name)s."
" %(provisioning_type)s).",
"provisioned %(requested)sGB volume on"
" %(grouping)s %(grouping_name)s"
" %(provisioning_type)s.",
msg_args)
else:
LOG.debug("Space information for volume creation "
Expand Down

0 comments on commit 767aaad

Please sign in to comment.