New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw: delete non-empty buckets in slave zonegroup works not well #14043

Merged
merged 1 commit into from Mar 24, 2017

Conversation

Projects
None yet
3 participants
@zhangsw
Contributor

zhangsw commented Mar 20, 2017

If users delete non-empty buckets in slave zonegroup, they will get non-empty error but the buckets have actually been deleted. Before we forward the request to meta master, we should check whether the bucket is empty.

Fixes: http://tracker.ceph.com/issues/19313

Signed-off-by: Zhang Shaowen zhangshaowen@cmss.chinamobile.com

rgw: delete non-empty buckets in slave zonegroup returns error but the
buckets have actually been deleted.

Fixes: http://tracker.ceph.com/issues/19313

Signed-off-by: Zhang Shaowen <zhangshaowen@cmss.chinamobile.com>

@cbodley cbodley self-assigned this Mar 21, 2017

@cbodley

This comment has been minimized.

Contributor

cbodley commented Mar 22, 2017

@zhangsw this looks right, but i'll do some testing. i assume that you uploaded some objects to this slave zone right before deleting the bucket, and the master zone succeeded in deleting the bucket because it hadn't synced those objects yet?

@cbodley

i added a unit test for this at #14090, and verified that it a) fails against master, and b) passes against this branch 👍

@cbodley

This comment has been minimized.

Contributor

cbodley commented Mar 22, 2017

jenkins test this please

@zhangsw

This comment has been minimized.

Contributor

zhangsw commented Mar 23, 2017

@cbodley I uploaded some objects to the slave zonegroup. Because slave zonegroup didn't sync data with master zonegroup, so the master zonegroup had no objects. Certainly, this problem also occurs in the situation you mentioned above.

@cbodley

This comment has been minimized.

Contributor

cbodley commented Mar 23, 2017

@zhangsw i spoke with @yehudasa about this today, and he suggested that we only allow buckets to be removed on the zonegroup where they were created. this would help to avoid deleting buckets that are still in use by their original zonegroup. would you be interested in helping to implement this?

(i'm happy to merge this pr once it passes teuthology)

@zhangsw

This comment has been minimized.

Contributor

zhangsw commented Mar 24, 2017

@cbodley Yeah~I'm glad to implement that and I think that is very useful.

@cbodley

This comment has been minimized.

@cbodley cbodley merged commit 433295c into ceph:master Mar 24, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
@cbodley

This comment has been minimized.

Contributor

cbodley commented Mar 24, 2017

@zhangsw thanks, i created a feature request at http://tracker.ceph.com/issues/19373 to track this

@zhangsw zhangsw deleted the zhangsw:fix-rgw-deletebucket branch Mar 27, 2017

@zhangsw

This comment has been minimized.

Contributor

zhangsw commented Mar 27, 2017

@cbodley It seems that the feature has been implemented... If we create a bucket in one zonegroup, and delete it in another, we will get '301 Moved Permanently'. It is checked in 'rgw_build_bucket_policies'.

@cbodley

This comment has been minimized.

Contributor

cbodley commented Mar 27, 2017

ah, thanks! that part of rgw_build_bucket_policies() finally makes sense to me

joke-lee pushed a commit to joke-lee/ceph that referenced this pull request Dec 19, 2017

Merge pull request ceph#14043 from zhangsw/fix-rgw-deletebucket
rgw: delete non-empty buckets in slave zonegroup works not well

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment