Snapshot reservation sync calls wrong resource.
The snapshot reservations code isn't calling the correct resource on sync (it's calling volumes). There's also some problems with the logic being used on the delete/clean up that are fixed here as well. Fixes bug: 1157506 Fixes bug: 1157982 Change-Id: I91327b8043ab63aa35ea8a91b6de544bf5bf6c61
This commit is contained in:
@@ -491,8 +491,11 @@ class API(base.Base):
|
||||
raise exception.InvalidVolume(reason=msg)
|
||||
|
||||
try:
|
||||
reservations = QUOTAS.reserve(context, snapshots=1,
|
||||
gigabytes=volume['size'])
|
||||
if FLAGS.no_snapshot_gb_quota:
|
||||
reservations = QUOTAS.reserve(context, snapshots=1)
|
||||
else:
|
||||
reservations = QUOTAS.reserve(context, snapshots=1,
|
||||
gigabytes=volume['size'])
|
||||
except exception.OverQuota as e:
|
||||
overs = e.kwargs['overs']
|
||||
usages = e.kwargs['usages']
|
||||
|
||||
Reference in New Issue
Block a user