-
Notifications
You must be signed in to change notification settings - Fork 552
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
Enable --expire-all-object-versions #4840
Enable --expire-all-object-versions #4840
Conversation
03c9dfe
to
4bc037c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few questions
Signed-off-by: Shubhendu Ram Tripathi <shubhendu@minio.io>
Signed-off-by: Shubhendu Ram Tripathi <shubhendu@minio.io>
Signed-off-by: Shubhendu Ram Tripathi <shubhendu@minio.io>
Signed-off-by: Shubhendu Ram Tripathi <shubhendu@minio.io>
Signed-off-by: Shubhendu Ram Tripathi <shubhendu@minio.io>
4bc037c
to
c13ab49
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested . LGTM 👍
Community Contribution License
All community contributions in this pull request are licensed to the project maintainers
under the terms of the Apache 2 license.
By creating this pull request I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 license.
Description
This PR introduces a new flag
--expire-all-object-versions
to the commandmc ilm rule add
to enabled option to create ILM rule to remove all versions of expired objects.Motivation and Context
Allow setting ILM rule for removing all versions of expired objects from command line.
How to test this PR?
Follow below steps to verify the changes
Step-1: Set your system date to few days older (~3days)
Step-2: Create a MinIO instance, create a bucket and enable versioning for the bucket
Step-3: Set the bucket public using
mc anonymous set public ALIAS/BUCKET
Step-4: Set the MinIO scanner speed to fastest using
mc admin config set ALIAS scanner speed=fastest
Step-5: Load say 100 objects to the bucket using curl command with older mtime value as below
Step-6: Now delete these objects using
mc rm
which would create DEL markers for all the objects. Eventually two versions for all objectsStep-7: Set the date back to current for the system
Step-8: Add bewlo ILM rules for bucket
mc ilm rule add ALIAS/BUCKET --expire-all-object-versions --expire-days 1
Step-9: After few seconds all versions of all objects should be removed and
mc ls ALIAS/BUCKET --versions
should not return any values.Step:10: Also verify prometheus metrics values
minio_s3_requests_total{api="putobject",server="127.0.0.1:9000"}
andminio_node_ilm_action_count_delete_all_versions_action{server="127.0.0.1:9000"}
. They should return 100 and 200 respectively as count values.Note: needs: minio/minio-go#1927 and minio/minio#18954
Types of changes
Checklist:
commit-id
orPR #
here)