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: add support for noncurrentversion expiration in s3 lifecycle. #13385

Merged
merged 1 commit into from Feb 20, 2017

Conversation

Projects
None yet
6 participants
@zhangsw
Contributor

zhangsw commented Feb 13, 2017

Add the support for the non-current object version's expiration. This works if the bucket's versioning status is enabled or suspended.
S3's doc about the expiration: http://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html

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

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

@idealguo

This comment has been minimized.

idealguo commented Feb 14, 2017

@yehudasa @cbodley @mattbenjamin, please help to review, thanks

@dang

Looks good. Just the one idiom that should be cleaned up.

bool remove_indeed = true;
int expiration;
for (auto obj_iter = objs.begin(); obj_iter != objs.end(); ++obj_iter) {
if ((*obj_iter).is_current()) {

This comment has been minimized.

@dang

dang Feb 16, 2017

Contributor

Rather than (*obj_iter).foo, can you use obj_iter->foo

This comment has been minimized.

@zhangsw

zhangsw Feb 17, 2017

Contributor

@dang Done.

@cbodley

This comment has been minimized.

Contributor

cbodley commented Feb 16, 2017

teuthology run was clean (only failures were selinux related)

rgw: add support for noncurrentversion expiration in s3 lifecycle.
Fixes: http://tracker.ceph.com/issues/18916

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

This comment has been minimized.

Contributor

zhangsw commented Feb 17, 2017

@dang I've changed to '->'.

@dang

dang approved these changes Feb 20, 2017

Looks good.

@dang dang merged commit acd633c into ceph:master Feb 20, 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
@yehudasa

This comment has been minimized.

Member

yehudasa commented Feb 20, 2017

@zhangsw @dang we should make sure to add a test s3-tests to cover this feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment