Use total reserved quota value instead of partial
While reserving snapshot we reserve gigabytes too. In case of
group snapshot we reserve the total gigabytes but in case of an
exception we print just the last volume gb info which needs to be
changed.
Closes-Bug:
@@ -979,9 +979,11 @@ class API(base.Base):
total_reserve_opts[key] + value
reservations = QUOTAS.reserve(context, **total_reserve_opts)
except exception.OverQuota as e:
- quota_utils.process_reserve_over_quota(context, e,
+ quota_utils.process_reserve_over_quota(
+ context,
+ e,
resource='snapshots',
- size=volume.size)
+ size=total_reserve_opts.get('gigabytes', volume.size))
return reservations
