Skip to content
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

LifeCycle feature #6331

Merged
merged 1 commit into from Dec 9, 2015
Merged

LifeCycle feature #6331

merged 1 commit into from Dec 9, 2015

Conversation

chenji-kael
Copy link
Contributor

As same as amazon S3 interface,"PUT Bucket lifecycle" and
"DELETE Bucket lifecycle" have been implemented,
"GET Bucket lifecycle" not realized yet as S3cmd has not
realize it also.
The feature`s main point is to remove expire file per day.
As ceph does not have a tier concept, so files transfer
from hot layer to cold layer is also not supported.

lifecycle config file format:


sample-rule

enable

1


Signed-off-by: Ji Chen insomnia@139.com

@yehudasa
Copy link
Member

@chenji-kael this is very interesting, looks like a good start. I do see it needs some cleanups, and we'll need to take a closer look at it to make sure it conforms to what we had in mind when thinking about this feature. Assigining it to @dang to take a closer look.

@chenji-kael
Copy link
Contributor Author

@yehudasa ping

@yehudasa
Copy link
Member

@chenji-kael there are a few problems that I see. It still does it using the bucket name, not the bucket instance which is problematic. I also think that modifying the bucket metadata is problematic because it's racy (can race with another change to the bucket metadata). I still think we need to keep the list of bucket instances that need to be scanned in a separate sharded omap. Each gateway will try to grab a lease on a shard, then process it. This way multiple gateways can coordinate the work.

@chenji-kael
Copy link
Contributor Author

@yehudasa OK,I will get it fix soon

@chenji-kael
Copy link
Contributor Author

@yehudasa ping
Hi, I have changed a lot, Now save lc bucket list in shard object. and use "bucket_name:bucket_id" as the key.Please check it, thanks

@chenji-kael
Copy link
Contributor Author

@yehudasa ping

@yehudasa
Copy link
Member

yehudasa commented Dec 2, 2015

@chenji-kael haven't forgotten you. Will try to get it reviewed soon. Thanks!

@dang
Copy link
Contributor

dang commented Dec 4, 2015

@chenji-kael
Can you rebase on master? You can probably resolve conflicts faster than I can.

@chenji-kael
Copy link
Contributor Author

@dang hi,rebase has been done

@ghost
Copy link

ghost commented Dec 7, 2015

@chenji-kael please ignore the bot failure, it is a false negative (see http://tracker.ceph.com/issues/13997 for more information). You can re-schedule a job by rebasing your branch and repushing.

@dang
Copy link
Contributor

dang commented Dec 7, 2015

@chenji-kael The call to get_bucket_info() needs to be updated for tenants from commit f7ca00a this is causing me build failures.

I suspect this will need a new argument, but I'm not sure.

Also, can you add your new files to src/CMakeList.txt?

@chenji-kael
Copy link
Contributor Author

@dang sorry for have not noticed tenant has been merged, now it works fine, please check it, thanks

As same as amazon S3 interface,"PUT Bucket lifecycle" and
"DELETE Bucket lifecycle" have been implemented,
"GET Bucket lifecycle" not realized yet as S3cmd has not
realize it also.
The feature`s main point is to remove expire file per day.
Files transfer from hot layer to cold layer is not supported.
ToDo:Maybe to transfer from replicate pool to EC pool or
from ssd to sata pool will be valuable.

Now put all buckets which should do lifecycle into shard
objects in .rgw.lc pool.

lifecycle config file format:
<LifecycleConfiguration>
    <Rule>
        <ID>sample-rule</ID>
        <Prefix></Prefix>
        <Status>enable</Status>
        <Expiration>
           <Days>1</Days>
        </Expiration>
    </Rule>
</LifecycleConfiguration>

Signed-off-by: Ji Chen <insomnia@139.com>
dang added a commit that referenced this pull request Dec 9, 2015
@dang dang merged commit b63c3fa into ceph:master Dec 9, 2015
@yehudasa
Copy link
Member

yehudasa commented Dec 9, 2015

@chenji-kael @dang I reverted the merge off github for now. There still are some issues that I think will need to be fixed. Note that I pushed some fixes to wip-rgw-lifecycle, but we'll need to do some more work before we can merge it.

@chenji-kael
Copy link
Contributor Author

@yehudasa @dang Glad to hear that, I will do more test, Thanks guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants