Skip to content

hammer: rgw: user quota may not adjust on bucket removal#8113

Merged
oritwas merged 1 commit intoceph:hammerfrom
Vicente-Cheng:wip-15023-hammer
Jun 7, 2016
Merged

hammer: rgw: user quota may not adjust on bucket removal#8113
oritwas merged 1 commit intoceph:hammerfrom
Vicente-Cheng:wip-15023-hammer

Conversation

@Vicente-Cheng
Copy link
Contributor

@ghost ghost added bug-fix rgw labels Mar 15, 2016
@ghost ghost added this to the hammer milestone Mar 15, 2016
@ghost ghost self-assigned this Mar 15, 2016
@ghost
Copy link

ghost commented Mar 15, 2016

 CXX      rgw/librgw_la-rgw_tools.lo
rgw/rgw_bucket.cc: In function 'int rgw_remove_bucket(RGWRados*, const string&, rgw_bucket&, bool)':
rgw/rgw_bucket.cc:436:50: error: 'struct rgw_bucket' has no member named 'tenant'
   ret = rgw_bucket_sync_user_stats(store, bucket.tenant, bucket.name);
                                                  ^

@Vicente-Cheng Vicente-Cheng force-pushed the wip-15023-hammer branch 2 times, most recently from cedc30f to 5c5f206 Compare March 15, 2016 12:04
@ghost
Copy link

ghost commented Mar 17, 2016

5c5f206 changes the order of delete_bucket and rgw_bucket_sync_user_stats which the original commit did not 0650799. Is there a reason for that ?

@Vicente-Cheng
Copy link
Contributor Author

@dachary thanks for reminder. Already corrected

@ghost
Copy link

ghost commented Mar 17, 2016

@Vicente-Cheng http://tracker.ceph.com/issues/15023#note-5 shows the conflict resolution was done in a minimal way and matches the conflict resolution comment. 👍

ghost pushed a commit that referenced this pull request Apr 5, 2016
…ucket removal

Reviewed-by: Loic Dachary <ldachary@redhat.com>
Description:
If the user/admin removes a bucket using --force/--purge-objects options with s3cmd/radosgw-admin respectively, the user stats will continue to reflect the deleted objects for quota purposes, and there seems to be no way to reset them. User stats need to be sync'ed prior to bucket removal.

Solution:
Sync user stats before removing a bucket.

Fixes: ceph#14507
Signed-off-by: Edward Yang <eyang@us.fujitsu.com>
(cherry picked from commit 0650799)

Conflicts:

	src/rgw/rgw_op.cc
            reordering the check seqence and replace some op_ret to ret

Backport Change:
We remove the `tenant` parameter because this feature is not introduced on hammer version.
The rgw multi-tenant feature is introduced on pr#6784 (ceph#6784)
This feature is supported from v10.0.2 and later version.
smithfarm added a commit that referenced this pull request Jun 1, 2016
…ucket removal

Reviewed-by: Nathan Cutler <ncutler@suse.com>
@oritwas oritwas merged commit 054a90e into ceph:hammer Jun 7, 2016
@Vicente-Cheng Vicente-Cheng deleted the wip-15023-hammer branch July 29, 2016 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants