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

Can't set lock or retention on docker installed minio #9236

Closed
roycec opened this issue Mar 31, 2020 · 4 comments
Closed

Can't set lock or retention on docker installed minio #9236

roycec opened this issue Mar 31, 2020 · 4 comments

Comments

@roycec
Copy link

roycec commented Mar 31, 2020

I set up an S3 storage via docker/docker-compose. Everything works so far, data ist stored in the correct bucket/directory. Now I tried to set a policy on this storage (either a lock on the bucket or a retention policy on the files). I use the mc client binary for that, configuring and accessing the storage backend also works. But trying to set the policy ends up with errors like

mc: <ERROR> Cannot enable object lock configuration on the specified bucket. Object Lock configuration cannot be enabled on existing buckets.

I also deleted an existing bucket and tried to set the policy/lock on an empty one, but with the same result. In the case of the compliance policy on single files

Cannot set object retention on /backup/myfolder/2020-03-28T04:27:45Z_backup.zip .Bucket is missing ObjectLockConfiguration

Should the mc binary work with the docker setup? According to issue #5184, I think it should. But what I am doing wrong here?

Expected Behavior

It should be possible to use the minio client to set locks/policies on (existing?) buckets or files.

Current Behavior

Setting these policies is not possible (see error messages above)

Possible Solution

Steps to Reproduce (for bugs)

  1. Set up minio (single server) with docker-compose
  2. Create bucket via UI or minio client
  3. Set retention policy/lock on bucket

Context

Using s3/minio for etcd snapshots. RKE in this case should handle the retention and delete files after a configured period. Due to a bug in RKE (rancher/rancher#24544) I tried to solve this via Minio retention in the meanwhile.

Regression

unknown

Your Environment

  • Version used (minio version): RELEASE.2020-03-09T18-26-53Z
  • Environment name and version (e.g. nginx 1.9.1):
  • Server type and version: Single server install
  • Operating System and version (uname -a): Linux ........ 3.10.0-1062.el7.x86_64 Full restructure in accordance with #1 SMP Thu Jul 18 20:25:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  • Link to your project:
@harshavardhana
Copy link
Member

It should be possible to use the minio client to set locks/policies on (existing?) buckets or files.

Existing buckets it's not possible as per AWS S3 API @roycec - so it is not possible to set this on existing buckets.

@roycec
Copy link
Author

roycec commented Mar 31, 2020

How is it then possible in general?

@harshavardhana
Copy link
Member

How is it then possible in general?

All documented here https://github.com/minio/minio/tree/master/docs/retention

@kannappanr
Copy link
Contributor

@royec Bucket should be created with lock enabled

mc mb play/test4 -l

Closing this issue as answered. Please feel free to reach out to us at https://slack.min.io

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants