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. Change-Id: Ibc8b1c5a967d05b3e52f992a1e76e74c9120e3f1 Closes-Bug: 1728457
This commit is contained in:
@@ -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,
|
||||
resource='snapshots',
|
||||
size=volume.size)
|
||||
quota_utils.process_reserve_over_quota(
|
||||
context,
|
||||
e,
|
||||
resource='snapshots',
|
||||
size=total_reserve_opts.get('gigabytes', volume.size))
|
||||
|
||||
return reservations
|
||||
|
||||
|
Reference in New Issue
Block a user