Skip to content

Commit

Permalink
Elevate acceptors context on accept reserve udpate
Browse files Browse the repository at this point in the history
When accepting a transfer we need to update the
quota data for both the donor and the acceptor's.
The acceptor is easy enough (as that's the context
we currently are using) however to update the donor's
quota data we need an elevated context.

Fixes bug: 1187538

Change-Id: I1fb9e7726830dce2c3de23d3446de5bbe9a1fd24
  • Loading branch information
j-griffith committed Jun 4, 2013
1 parent d0c1110 commit e02cf9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cinder/transfer/api.py
Expand Up @@ -166,7 +166,7 @@ def _consumed(name):
raise exception.VolumeLimitExceeded(allowed=quotas['volumes'])
try:
donor_id = vol_ref['project_id']
donor_reservations = QUOTAS.reserve(context,
donor_reservations = QUOTAS.reserve(context.elevated(),
project_id=donor_id,
volumes=-1,
gigabytes=-vol_ref['size'])
Expand Down

0 comments on commit e02cf9c

Please sign in to comment.