Merge "Bugfix: Account for consumed space better" into stable/yoga

This commit is contained in:
Zuul 2023-02-17 20:08:03 +00:00 committed by Gerrit Code Review
commit 66b940b661
2 changed files with 9 additions and 2 deletions

View File

@ -585,8 +585,8 @@ class VolumeManager(manager.CleanableManager,
try:
for volume in volumes:
# available volume should also be counted into allocated
if volume['status'] in ['in-use', 'available']:
# Account for volumes that have been provisioned already.
if volume['host']:
# calculate allocated capacity for driver
self._count_allocated_capacity(ctxt, volume)

View File

@ -0,0 +1,7 @@
---
fixes:
- |
`Bug #1910767 <https://bugs.launchpad.net/cinder/+bug/1910767>`_: Fixed
the calculation of the allocated capacity for the volume manager.
The fix takes into account all volumes that have a host setting, not just
volumes with a status of 'in-use' or 'available'.